aboutsummaryrefslogtreecommitdiff
path: root/target/mips/tcg/tx79.decode
blob: 63fbe9694bbdd1e919bcd89cce468b874616c448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Toshiba C790's instruction set
#
# Copyright (C) 2021  Philippe Mathieu-Daudé
#
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Toshiba Appendix B  C790-Specific Instruction Set Details

###########################################################################
# Named attribute sets.  These are used to make nice(er) names
# when creating helpers common to those for the individual
# instruction patterns.

&rtype           rs rt rd sa

###########################################################################
# Named instruction formats.  These are generally used to
# reduce the amount of duplication between instruction patterns.

@rs_rt_rd       ...... rs:5  rt:5  rd:5  ..... ......   &rtype sa=0
@rt_rd          ...... ..... rt:5  rd:5  ..... ......   &rtype rs=0 sa=0
@rs             ...... rs:5  ..... ..........  ......   &rtype rt=0 rd=0 sa=0
@rd             ...... ..........  rd:5  ..... ......   &rtype rs=0 rt=0 sa=0

###########################################################################

MFHI1           011100 0000000000  ..... 00000 010000   @rd
MTHI1           011100 .....  0000000000 00000 010001   @rs
MFLO1           011100 0000000000  ..... 00000 010010   @rd
MTLO1           011100 .....  0000000000 00000 010011   @rs

# MMI0

PSUBW           011100 ..... ..... ..... 00001 001000   @rs_rt_rd
PCGTW           011100 ..... ..... ..... 00010 001000   @rs_rt_rd
PSUBH           011100 ..... ..... ..... 00101 001000   @rs_rt_rd
PCGTH           011100 ..... ..... ..... 00110 001000   @rs_rt_rd
PSUBB           011100 ..... ..... ..... 01001 001000   @rs_rt_rd
PCGTB           011100 ..... ..... ..... 01010 001000   @rs_rt_rd
PEXTLW          011100 ..... ..... ..... 10010 001000   @rs_rt_rd
PEXTLH          011100 ..... ..... ..... 10110 001000   @rs_rt_rd
PEXTLB          011100 ..... ..... ..... 11010 001000   @rs_rt_rd

# MMI1

PCEQW           011100 ..... ..... ..... 00010 101000   @rs_rt_rd
PCEQH           011100 ..... ..... ..... 00110 101000   @rs_rt_rd
PCEQB           011100 ..... ..... ..... 01010 101000   @rs_rt_rd
PEXTUW          011100 ..... ..... ..... 10010 101000   @rs_rt_rd

# MMI2

PCPYLD          011100 ..... ..... ..... 01110 001001   @rs_rt_rd
PAND            011100 ..... ..... ..... 10010 001001   @rs_rt_rd
PXOR            011100 ..... ..... ..... 10011 001001   @rs_rt_rd

# MMI3

PCPYUD          011100 ..... ..... ..... 01110 101001   @rs_rt_rd
POR             011100 ..... ..... ..... 10010 101001   @rs_rt_rd
PNOR            011100 ..... ..... ..... 10011 101001   @rs_rt_rd
PCPYH           011100 00000 ..... ..... 11011 101001   @rt_rd