1 # Toshiba C790's instruction set
3 # Copyright (C) 2021 Philippe Mathieu-Daudé
5 # SPDX-License-Identifier: LGPL-2.1-or-later
7 # Toshiba Appendix B C790-Specific Instruction Set Details
9 ###########################################################################
10 # Named attribute sets. These are used to make nice(er) names
11 # when creating helpers common to those for the individual
12 # instruction patterns.
18 ###########################################################################
19 # Named instruction formats. These are generally used to
20 # reduce the amount of duplication between instruction patterns.
22 @rs_rt_rd ...... rs:5 rt:5 rd:5 ..... ...... &rtype sa=0
23 @rt_rd ...... ..... rt:5 rd:5 ..... ...... &rtype rs=0 sa=0
24 @rs ...... rs:5 ..... .......... ...... &rtype rt=0 rd=0 sa=0
25 @rd ...... .......... rd:5 ..... ...... &rtype rs=0 rt=0 sa=0
27 @ldst ...... base:5 rt:5 offset:16 &itype
29 ###########################################################################
31 MFHI1 011100 0000000000 ..... 00000 010000 @rd
32 MTHI1 011100 ..... 0000000000 00000 010001 @rs
33 MFLO1 011100 0000000000 ..... 00000 010010 @rd
34 MTLO1 011100 ..... 0000000000 00000 010011 @rs
38 PSUBW 011100 ..... ..... ..... 00001 001000 @rs_rt_rd
39 PCGTW 011100 ..... ..... ..... 00010 001000 @rs_rt_rd
40 PSUBH 011100 ..... ..... ..... 00101 001000 @rs_rt_rd
41 PCGTH 011100 ..... ..... ..... 00110 001000 @rs_rt_rd
42 PSUBB 011100 ..... ..... ..... 01001 001000 @rs_rt_rd
43 PCGTB 011100 ..... ..... ..... 01010 001000 @rs_rt_rd
44 PEXTLW 011100 ..... ..... ..... 10010 001000 @rs_rt_rd
45 PPACW 011100 ..... ..... ..... 10011 001000 @rs_rt_rd
46 PEXTLH 011100 ..... ..... ..... 10110 001000 @rs_rt_rd
47 PEXTLB 011100 ..... ..... ..... 11010 001000 @rs_rt_rd
51 PCEQW 011100 ..... ..... ..... 00010 101000 @rs_rt_rd
52 PCEQH 011100 ..... ..... ..... 00110 101000 @rs_rt_rd
53 PCEQB 011100 ..... ..... ..... 01010 101000 @rs_rt_rd
54 PEXTUW 011100 ..... ..... ..... 10010 101000 @rs_rt_rd
58 PCPYLD 011100 ..... ..... ..... 01110 001001 @rs_rt_rd
59 PAND 011100 ..... ..... ..... 10010 001001 @rs_rt_rd
60 PXOR 011100 ..... ..... ..... 10011 001001 @rs_rt_rd
61 PROT3W 011100 00000 ..... ..... 11111 001001 @rt_rd
65 PCPYUD 011100 ..... ..... ..... 01110 101001 @rs_rt_rd
66 POR 011100 ..... ..... ..... 10010 101001 @rs_rt_rd
67 PNOR 011100 ..... ..... ..... 10011 101001 @rs_rt_rd
68 PCPYH 011100 00000 ..... ..... 11011 101001 @rt_rd
72 LQ 011110 ..... ..... ................ @ldst
73 SQ 011111 ..... ..... ................ @ldst