xref: /openbmc/qemu/target/mips/tcg/tx79.decode (revision e9206163)
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
31MFHI1           011100 0000000000  ..... 00000 010000   @rd
32MTHI1           011100 .....  0000000000 00000 010001   @rs
33MFLO1           011100 0000000000  ..... 00000 010010   @rd
34MTLO1           011100 .....  0000000000 00000 010011   @rs
35
36# MMI0
37
38PSUBW           011100 ..... ..... ..... 00001 001000   @rs_rt_rd
39PCGTW           011100 ..... ..... ..... 00010 001000   @rs_rt_rd
40PSUBH           011100 ..... ..... ..... 00101 001000   @rs_rt_rd
41PCGTH           011100 ..... ..... ..... 00110 001000   @rs_rt_rd
42PSUBB           011100 ..... ..... ..... 01001 001000   @rs_rt_rd
43PCGTB           011100 ..... ..... ..... 01010 001000   @rs_rt_rd
44PEXTLW          011100 ..... ..... ..... 10010 001000   @rs_rt_rd
45PPACW           011100 ..... ..... ..... 10011 001000   @rs_rt_rd
46PEXTLH          011100 ..... ..... ..... 10110 001000   @rs_rt_rd
47PEXTLB          011100 ..... ..... ..... 11010 001000   @rs_rt_rd
48
49# MMI1
50
51PCEQW           011100 ..... ..... ..... 00010 101000   @rs_rt_rd
52PCEQH           011100 ..... ..... ..... 00110 101000   @rs_rt_rd
53PCEQB           011100 ..... ..... ..... 01010 101000   @rs_rt_rd
54PEXTUW          011100 ..... ..... ..... 10010 101000   @rs_rt_rd
55
56# MMI2
57
58PCPYLD          011100 ..... ..... ..... 01110 001001   @rs_rt_rd
59PAND            011100 ..... ..... ..... 10010 001001   @rs_rt_rd
60PXOR            011100 ..... ..... ..... 10011 001001   @rs_rt_rd
61PROT3W          011100 00000 ..... ..... 11111 001001   @rt_rd
62
63# MMI3
64
65PCPYUD          011100 ..... ..... ..... 01110 101001   @rs_rt_rd
66POR             011100 ..... ..... ..... 10010 101001   @rs_rt_rd
67PNOR            011100 ..... ..... ..... 10011 101001   @rs_rt_rd
68PCPYH           011100 00000 ..... ..... 11011 101001   @rt_rd
69
70# SPECIAL
71
72LQ              011110 ..... ..... ................     @ldst
73SQ              011111 ..... ..... ................     @ldst
74