| 1 | # Toshiba C790's instruction set |
| 2 | # |
| 3 | # Copyright (C) 2021 Philippe Mathieu-Daudé |
| 4 | # |
| 5 | # SPDX-License-Identifier: LGPL-2.1-or-later |
| 6 | # |
| 7 | # Toshiba Appendix B C790-Specific Instruction Set Details |
| 8 | |
| 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. |
| 13 | |
| 14 | &r rs rt rd sa |
| 15 | |
| 16 | &i base rt offset |
| 17 | |
| 18 | ########################################################################### |
| 19 | # Named instruction formats. These are generally used to |
| 20 | # reduce the amount of duplication between instruction patterns. |
| 21 | |
| 22 | @rs_rt_rd ...... rs:5 rt:5 rd:5 ..... ...... &r sa=0 |
| 23 | @rt_rd ...... ..... rt:5 rd:5 ..... ...... &r sa=0 rs=0 |
| 24 | @rs ...... rs:5 ..... .......... ...... &r sa=0 rt=0 rd=0 |
| 25 | @rd ...... .......... rd:5 ..... ...... &r sa=0 rs=0 rt=0 |
| 26 | |
| 27 | @ldst ...... base:5 rt:5 offset:s16 &i |
| 28 | |
| 29 | ########################################################################### |
| 30 | |
| 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 |
| 35 | |
| 36 | # MMI0 |
| 37 | |
| 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 |
| 48 | |
| 49 | # MMI1 |
| 50 | |
| 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 |
| 55 | |
| 56 | # MMI2 |
| 57 | |
| 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 |
| 62 | |
| 63 | # MMI3 |
| 64 | |
| 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 |
| 69 | |
| 70 | # SPECIAL |
| 71 | |
| 72 | LQ 011110 ..... ..... ................ @ldst |
| 73 | SQ 011111 ..... ..... ................ @ldst |