1*3d8817e4Smiod /* d10v-opc.c -- D10V opcode list
2*3d8817e4Smiod Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3*3d8817e4Smiod Written by Martin Hunt, Cygnus Support
4*3d8817e4Smiod
5*3d8817e4Smiod This file is part of GDB, GAS, and the GNU binutils.
6*3d8817e4Smiod
7*3d8817e4Smiod GDB, GAS, and the GNU binutils are free software; you can redistribute
8*3d8817e4Smiod them and/or modify them under the terms of the GNU General Public
9*3d8817e4Smiod License as published by the Free Software Foundation; either version
10*3d8817e4Smiod 2, or (at your option) any later version.
11*3d8817e4Smiod
12*3d8817e4Smiod GDB, GAS, and the GNU binutils are distributed in the hope that they
13*3d8817e4Smiod will be useful, but WITHOUT ANY WARRANTY; without even the implied
14*3d8817e4Smiod warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
15*3d8817e4Smiod the GNU General Public License for more details.
16*3d8817e4Smiod
17*3d8817e4Smiod You should have received a copy of the GNU General Public License
18*3d8817e4Smiod along with this file; see the file COPYING. If not, write to the Free
19*3d8817e4Smiod Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
20*3d8817e4Smiod
21*3d8817e4Smiod #include <stdio.h>
22*3d8817e4Smiod #include "sysdep.h"
23*3d8817e4Smiod #include "opcode/d10v.h"
24*3d8817e4Smiod
25*3d8817e4Smiod
26*3d8817e4Smiod /* The table is sorted. Suitable for searching by a binary search. */
27*3d8817e4Smiod const struct pd_reg d10v_predefined_registers[] =
28*3d8817e4Smiod {
29*3d8817e4Smiod { "a0", NULL, OPERAND_ACC0+0 },
30*3d8817e4Smiod { "a1", NULL, OPERAND_ACC1+1 },
31*3d8817e4Smiod { "bpc", NULL, OPERAND_CONTROL+3 },
32*3d8817e4Smiod { "bpsw", NULL, OPERAND_CONTROL+1 },
33*3d8817e4Smiod { "c", NULL, OPERAND_CFLAG+3 },
34*3d8817e4Smiod { "cr0", "psw", OPERAND_CONTROL },
35*3d8817e4Smiod { "cr1", "bpsw", OPERAND_CONTROL+1 },
36*3d8817e4Smiod { "cr10", "mod_s", OPERAND_CONTROL+10 },
37*3d8817e4Smiod { "cr11", "mod_e", OPERAND_CONTROL+11 },
38*3d8817e4Smiod { "cr12", NULL, OPERAND_CONTROL+12 },
39*3d8817e4Smiod { "cr13", NULL, OPERAND_CONTROL+13 },
40*3d8817e4Smiod { "cr14", "iba", OPERAND_CONTROL+14 },
41*3d8817e4Smiod { "cr15", NULL, OPERAND_CONTROL+15 },
42*3d8817e4Smiod { "cr2", "pc", OPERAND_CONTROL+2 },
43*3d8817e4Smiod { "cr3", "bpc", OPERAND_CONTROL+3 },
44*3d8817e4Smiod { "cr4", "dpsw", OPERAND_CONTROL+4 },
45*3d8817e4Smiod { "cr5", "dpc", OPERAND_CONTROL+5 },
46*3d8817e4Smiod { "cr6", NULL, OPERAND_CONTROL+6 },
47*3d8817e4Smiod { "cr7", "rpt_c", OPERAND_CONTROL+7 },
48*3d8817e4Smiod { "cr8", "rpt_s", OPERAND_CONTROL+8 },
49*3d8817e4Smiod { "cr9", "rpt_e", OPERAND_CONTROL+9 },
50*3d8817e4Smiod { "dpc", NULL, OPERAND_CONTROL+5 },
51*3d8817e4Smiod { "dpsw", NULL, OPERAND_CONTROL+4 },
52*3d8817e4Smiod { "f0", NULL, OPERAND_FFLAG+0 },
53*3d8817e4Smiod { "f1", NULL, OPERAND_FFLAG+1 },
54*3d8817e4Smiod { "iba", NULL, OPERAND_CONTROL+14 },
55*3d8817e4Smiod { "link", "r13", OPERAND_GPR+13 },
56*3d8817e4Smiod { "mod_e", NULL, OPERAND_CONTROL+11 },
57*3d8817e4Smiod { "mod_s", NULL, OPERAND_CONTROL+10 },
58*3d8817e4Smiod { "pc", NULL, OPERAND_CONTROL+2 },
59*3d8817e4Smiod { "psw", NULL, OPERAND_CONTROL+0 },
60*3d8817e4Smiod { "r0", NULL, OPERAND_GPR+0 },
61*3d8817e4Smiod { "r0-r1", NULL, OPERAND_GPR+0},
62*3d8817e4Smiod { "r1", NULL, OPERAND_GPR+1 },
63*3d8817e4Smiod { "r1", NULL, OPERAND_GPR+1 },
64*3d8817e4Smiod { "r10", NULL, OPERAND_GPR+10 },
65*3d8817e4Smiod { "r10-r11", NULL, OPERAND_GPR+10 },
66*3d8817e4Smiod { "r11", NULL, OPERAND_GPR+11 },
67*3d8817e4Smiod { "r12", NULL, OPERAND_GPR+12 },
68*3d8817e4Smiod { "r12-r13", NULL, OPERAND_GPR+12 },
69*3d8817e4Smiod { "r13", NULL, OPERAND_GPR+13 },
70*3d8817e4Smiod { "r14", NULL, OPERAND_GPR+14 },
71*3d8817e4Smiod { "r14-r15", NULL, OPERAND_GPR+14 },
72*3d8817e4Smiod { "r15", "sp", OPERAND_SP|(OPERAND_GPR+15) },
73*3d8817e4Smiod { "r2", NULL, OPERAND_GPR+2 },
74*3d8817e4Smiod { "r2-r3", NULL, OPERAND_GPR+2 },
75*3d8817e4Smiod { "r3", NULL, OPERAND_GPR+3 },
76*3d8817e4Smiod { "r4", NULL, OPERAND_GPR+4 },
77*3d8817e4Smiod { "r4-r5", NULL, OPERAND_GPR+4 },
78*3d8817e4Smiod { "r5", NULL, OPERAND_GPR+5 },
79*3d8817e4Smiod { "r6", NULL, OPERAND_GPR+6 },
80*3d8817e4Smiod { "r6-r7", NULL, OPERAND_GPR+6 },
81*3d8817e4Smiod { "r7", NULL, OPERAND_GPR+7 },
82*3d8817e4Smiod { "r8", NULL, OPERAND_GPR+8 },
83*3d8817e4Smiod { "r8-r9", NULL, OPERAND_GPR+8 },
84*3d8817e4Smiod { "r9", NULL, OPERAND_GPR+9 },
85*3d8817e4Smiod { "rpt_c", NULL, OPERAND_CONTROL+7 },
86*3d8817e4Smiod { "rpt_e", NULL, OPERAND_CONTROL+9 },
87*3d8817e4Smiod { "rpt_s", NULL, OPERAND_CONTROL+8 },
88*3d8817e4Smiod { "sp", NULL, OPERAND_SP|(OPERAND_GPR+15) },
89*3d8817e4Smiod };
90*3d8817e4Smiod
91*3d8817e4Smiod int
d10v_reg_name_cnt()92*3d8817e4Smiod d10v_reg_name_cnt()
93*3d8817e4Smiod {
94*3d8817e4Smiod return (sizeof(d10v_predefined_registers) / sizeof(struct pd_reg));
95*3d8817e4Smiod }
96*3d8817e4Smiod
97*3d8817e4Smiod const struct d10v_operand d10v_operands[] =
98*3d8817e4Smiod {
99*3d8817e4Smiod #define UNUSED (0)
100*3d8817e4Smiod { 0, 0, 0 },
101*3d8817e4Smiod #define RSRC (UNUSED + 1)
102*3d8817e4Smiod { 4, 1, OPERAND_GPR|OPERAND_REG },
103*3d8817e4Smiod #define RSRC_SP (RSRC + 1)
104*3d8817e4Smiod { 4, 1, OPERAND_SP|OPERAND_GPR|OPERAND_REG },
105*3d8817e4Smiod #define RSRC_NOSP (RSRC_SP + 1)
106*3d8817e4Smiod { 4, 1, OPERAND_NOSP|OPERAND_GPR|OPERAND_REG },
107*3d8817e4Smiod #define RDST (RSRC_NOSP + 1)
108*3d8817e4Smiod { 4, 5, OPERAND_DEST|OPERAND_GPR|OPERAND_REG },
109*3d8817e4Smiod #define ASRC (RDST + 1)
110*3d8817e4Smiod { 1, 4, OPERAND_ACC0|OPERAND_ACC1|OPERAND_REG },
111*3d8817e4Smiod #define ASRC0ONLY (ASRC + 1)
112*3d8817e4Smiod { 1, 4, OPERAND_ACC0|OPERAND_REG },
113*3d8817e4Smiod #define ADST (ASRC0ONLY + 1)
114*3d8817e4Smiod { 1, 8, OPERAND_DEST|OPERAND_ACC0|OPERAND_ACC1|OPERAND_REG },
115*3d8817e4Smiod #define RSRCE (ADST + 1)
116*3d8817e4Smiod { 4, 1, OPERAND_EVEN|OPERAND_GPR|OPERAND_REG },
117*3d8817e4Smiod #define RDSTE (RSRCE + 1)
118*3d8817e4Smiod { 4, 5, OPERAND_EVEN|OPERAND_DEST|OPERAND_GPR|OPERAND_REG },
119*3d8817e4Smiod #define NUM16 (RDSTE + 1)
120*3d8817e4Smiod { 16, 0, OPERAND_NUM|OPERAND_SIGNED },
121*3d8817e4Smiod #define NUM3 (NUM16 + 1) /* rac, rachi */
122*3d8817e4Smiod { 3, 1, OPERAND_NUM|OPERAND_SIGNED|RESTRICTED_NUM3 },
123*3d8817e4Smiod #define NUM4 (NUM3 + 1)
124*3d8817e4Smiod { 4, 1, OPERAND_NUM|OPERAND_SIGNED },
125*3d8817e4Smiod #define UNUM4 (NUM4 + 1)
126*3d8817e4Smiod { 4, 1, OPERAND_NUM },
127*3d8817e4Smiod #define UNUM4S (UNUM4 + 1) /* addi, slli, srai, srli, subi */
128*3d8817e4Smiod { 4, 1, OPERAND_NUM|OPERAND_SHIFT },
129*3d8817e4Smiod #define UNUM8 (UNUM4S + 1) /* repi */
130*3d8817e4Smiod { 8, 16, OPERAND_NUM },
131*3d8817e4Smiod #define UNUM16 (UNUM8 + 1) /* cmpui */
132*3d8817e4Smiod { 16, 0, OPERAND_NUM },
133*3d8817e4Smiod #define ANUM16 (UNUM16 + 1)
134*3d8817e4Smiod { 16, 0, OPERAND_ADDR|OPERAND_SIGNED },
135*3d8817e4Smiod #define ANUM8 (ANUM16 + 1)
136*3d8817e4Smiod { 8, 0, OPERAND_ADDR|OPERAND_SIGNED },
137*3d8817e4Smiod #define ASRC2 (ANUM8 + 1)
138*3d8817e4Smiod { 1, 8, OPERAND_ACC0|OPERAND_ACC1|OPERAND_REG },
139*3d8817e4Smiod #define RSRC2 (ASRC2 + 1)
140*3d8817e4Smiod { 4, 5, OPERAND_GPR|OPERAND_REG },
141*3d8817e4Smiod #define RSRC2E (RSRC2 + 1)
142*3d8817e4Smiod { 4, 5, OPERAND_GPR|OPERAND_REG|OPERAND_EVEN },
143*3d8817e4Smiod #define ASRC0 (RSRC2E + 1)
144*3d8817e4Smiod { 1, 0, OPERAND_ACC0|OPERAND_ACC1|OPERAND_REG },
145*3d8817e4Smiod #define ADST0 (ASRC0 + 1)
146*3d8817e4Smiod { 1, 0, OPERAND_ACC0|OPERAND_ACC1|OPERAND_REG|OPERAND_DEST },
147*3d8817e4Smiod #define FFSRC (ADST0 + 1)
148*3d8817e4Smiod { 2, 1, OPERAND_REG | OPERAND_FFLAG },
149*3d8817e4Smiod #define CFSRC (FFSRC + 1)
150*3d8817e4Smiod { 2, 1, OPERAND_REG | OPERAND_CFLAG },
151*3d8817e4Smiod #define FDST (CFSRC + 1)
152*3d8817e4Smiod { 1, 5, OPERAND_REG | OPERAND_FFLAG | OPERAND_DEST},
153*3d8817e4Smiod #define ATSIGN (FDST + 1)
154*3d8817e4Smiod { 0, 0, OPERAND_ATSIGN},
155*3d8817e4Smiod #define ATPAR (ATSIGN + 1) /* "@(" */
156*3d8817e4Smiod { 0, 0, OPERAND_ATPAR},
157*3d8817e4Smiod #define PLUS (ATPAR + 1) /* postincrement */
158*3d8817e4Smiod { 0, 0, OPERAND_PLUS},
159*3d8817e4Smiod #define MINUS (PLUS + 1) /* postdecrement */
160*3d8817e4Smiod { 0, 0, OPERAND_MINUS},
161*3d8817e4Smiod #define ATMINUS (MINUS + 1) /* predecrement */
162*3d8817e4Smiod { 0, 0, OPERAND_ATMINUS},
163*3d8817e4Smiod #define CSRC (ATMINUS + 1) /* control register */
164*3d8817e4Smiod { 4, 1, OPERAND_REG|OPERAND_CONTROL},
165*3d8817e4Smiod #define CDST (CSRC + 1) /* control register */
166*3d8817e4Smiod { 4, 5, OPERAND_REG|OPERAND_CONTROL|OPERAND_DEST},
167*3d8817e4Smiod };
168*3d8817e4Smiod
169*3d8817e4Smiod const struct d10v_opcode d10v_opcodes[] = {
170*3d8817e4Smiod { "abs", SHORT_2, 1, EITHER, PAR|WF0, 0x4607, 0x7e1f, { RDST } },
171*3d8817e4Smiod { "abs", SHORT_2, 1, IU, PAR|WF0, 0x5607, 0x7eff, { ADST } },
172*3d8817e4Smiod { "add", SHORT_2, 1, EITHER, PAR|WCAR, 0x0200, 0x7e01, { RDST, RSRC } },
173*3d8817e4Smiod { "add", SHORT_2, 1, IU, PAR, 0x1201, 0x7ee3, { ADST, RSRCE } },
174*3d8817e4Smiod { "add", SHORT_2, 1, IU, PAR, 0x1203, 0x7eef, { ADST, ASRC } },
175*3d8817e4Smiod { "add2w", SHORT_2, 2, IU, PAR|WCAR, 0x1200, 0x7e23, { RDSTE, RSRCE } },
176*3d8817e4Smiod { "add3", LONG_L, 1, MU, SEQ|WCAR, 0x1000000, 0x3f000000, { RDST, RSRC, NUM16 } },
177*3d8817e4Smiod { "addac3", LONG_R, 1, IU, SEQ, 0x17000200, 0x3ffffe22, { RDSTE, RSRCE, ASRC0 } },
178*3d8817e4Smiod { "addac3", LONG_R, 1, IU, SEQ, 0x17000202, 0x3ffffe2e, { RDSTE, ASRC, ASRC0 } },
179*3d8817e4Smiod { "addac3s", LONG_R, 1, IU, SEQ, 0x17001200, 0x3ffffe22, { RDSTE, RSRCE, ASRC0 } },
180*3d8817e4Smiod { "addac3s", LONG_R, 1, IU, SEQ, 0x17001202, 0x3ffffe2e, { RDSTE, ASRC, ASRC0 } },
181*3d8817e4Smiod { "addi", SHORT_2, 1, EITHER, PAR|WCAR, 0x201, 0x7e01, { RDST, UNUM4S } },
182*3d8817e4Smiod { "and", SHORT_2, 1, EITHER, PAR, 0xc00, 0x7e01, { RDST, RSRC } },
183*3d8817e4Smiod { "and3", LONG_L, 1, MU, SEQ, 0x6000000, 0x3f000000, { RDST, RSRC, NUM16 } },
184*3d8817e4Smiod { "bclri", SHORT_2, 1, IU, PAR, 0xc01, 0x7e01, { RDST, UNUM4 } },
185*3d8817e4Smiod { "bl", OPCODE_FAKE, 0, 0, 0, 0, 0, { 0, 8, 16, 0 } },
186*3d8817e4Smiod { "bl.s", SHORT_B, 3, MU, ALONE|BRANCH_LINK|PAR, 0x4900, 0x7f00, { ANUM8 } },
187*3d8817e4Smiod { "bl.l", LONG_B, 3, MU, BRANCH_LINK|SEQ, 0x24800000, 0x3fff0000, { ANUM16 } },
188*3d8817e4Smiod { "bnoti", SHORT_2, 1, IU, PAR, 0xa01, 0x7e01, { RDST, UNUM4 } },
189*3d8817e4Smiod { "bra", OPCODE_FAKE, 0, 0, 0, 0, 0, { 0, 8, 16, 0 } },
190*3d8817e4Smiod { "bra.s", SHORT_B, 3, MU, ALONE|BRANCH|PAR, 0x4800, 0x7f00, { ANUM8 } },
191*3d8817e4Smiod { "bra.l", LONG_B, 3, MU, BRANCH|SEQ, 0x24000000, 0x3fff0000, { ANUM16 } },
192*3d8817e4Smiod { "brf0f", OPCODE_FAKE, 0, 0, 0, 0, 0, { 0, 8, 16, 0 } },
193*3d8817e4Smiod { "brf0f.s", SHORT_B, 3, MU, BRANCH|PAR|RF0, 0x4a00, 0x7f00, { ANUM8 } },
194*3d8817e4Smiod { "brf0f.l", LONG_B, 3, MU, SEQ, 0x25000000, 0x3fff0000, { ANUM16 } },
195*3d8817e4Smiod { "brf0t", OPCODE_FAKE, 0, 0, 0, 0, 0, { 0, 8, 16, 0 } },
196*3d8817e4Smiod { "brf0t.s", SHORT_B, 3, MU, BRANCH|PAR|RF0, 0x4b00, 0x7f00, { ANUM8 } },
197*3d8817e4Smiod { "brf0t.l", LONG_B, 3, MU, SEQ, 0x25800000, 0x3fff0000, { ANUM16 } },
198*3d8817e4Smiod { "bseti", SHORT_2, 1, IU, PAR, 0x801, 0x7e01, { RDST, UNUM4 } },
199*3d8817e4Smiod { "btsti", SHORT_2, 1, IU, PAR|WF0, 0xe01, 0x7e01, { RSRC2, UNUM4 } },
200*3d8817e4Smiod { "clrac", SHORT_2, 1, IU, PAR, 0x5601, 0x7eff, { ADST } },
201*3d8817e4Smiod { "cmp", SHORT_2, 1, EITHER, PAR|WF0, 0x600, 0x7e01, { RSRC2, RSRC } },
202*3d8817e4Smiod { "cmp", SHORT_2, 1, IU, PAR|WF0, 0x1603, 0x7eef, { ASRC2, ASRC } },
203*3d8817e4Smiod { "cmpeq", SHORT_2, 1, EITHER, PAR|WF0, 0x400, 0x7e01, { RSRC2, RSRC } },
204*3d8817e4Smiod { "cmpeq", SHORT_2, 1, IU, PAR|WF0, 0x1403, 0x7eef, { ASRC2, ASRC } },
205*3d8817e4Smiod { "cmpeqi", OPCODE_FAKE, 0, 0, 0, 0, 0, { 1, 4, 16, 0 } },
206*3d8817e4Smiod { "cmpeqi.s", SHORT_2, 1, EITHER, PAR|WF0, 0x401, 0x7e01, { RSRC2, NUM4 } },
207*3d8817e4Smiod { "cmpeqi.l", LONG_L, 1, MU, SEQ, 0x2000000, 0x3f0f0000, { RSRC2, NUM16 } },
208*3d8817e4Smiod { "cmpi", OPCODE_FAKE, 0, 0, 0, 0, 0, { 1, 4, 16, 0 } },
209*3d8817e4Smiod { "cmpi.s", SHORT_2, 1, EITHER, PAR|WF0, 0x601, 0x7e01, { RSRC2, NUM4 } },
210*3d8817e4Smiod { "cmpi.l", LONG_L, 1, MU, SEQ, 0x3000000, 0x3f0f0000, { RSRC2, NUM16 } },
211*3d8817e4Smiod { "cmpu", SHORT_2, 1, EITHER, PAR|WF0, 0x4600, 0x7e01, { RSRC2, RSRC } },
212*3d8817e4Smiod { "cmpui", LONG_L, 1, MU, SEQ, 0x23000000, 0x3f0f0000, { RSRC2, UNUM16 } },
213*3d8817e4Smiod { "cpfg", SHORT_2, 1, MU, PAR, 0x4e0f, 0x7fdf, { FDST, CFSRC } },
214*3d8817e4Smiod { "cpfg", SHORT_2, 1, MU, PAR, 0x4e09, 0x7fd9, { FDST, FFSRC } },
215*3d8817e4Smiod { "dbt", SHORT_2, 5, MU, ALONE|PAR, 0x5f20, 0x7fff, { 0 } },
216*3d8817e4Smiod { "divs", LONG_L, 1, BOTH, SEQ, 0x14002800, 0x3f10fe21, { RDSTE, RSRC } },
217*3d8817e4Smiod { "exef0f", SHORT_2, 1, EITHER, PARONLY, 0x4e04, 0x7fff, { 0 } },
218*3d8817e4Smiod { "exef0t", SHORT_2, 1, EITHER, PARONLY, 0x4e24, 0x7fff, { 0 } },
219*3d8817e4Smiod { "exef1f", SHORT_2, 1, EITHER, PARONLY, 0x4e40, 0x7fff, { 0 } },
220*3d8817e4Smiod { "exef1t", SHORT_2, 1, EITHER, PARONLY, 0x4e42, 0x7fff, { 0 } },
221*3d8817e4Smiod { "exefaf", SHORT_2, 1, EITHER, PARONLY, 0x4e00, 0x7fff, { 0 } },
222*3d8817e4Smiod { "exefat", SHORT_2, 1, EITHER, PARONLY, 0x4e02, 0x7fff, { 0 } },
223*3d8817e4Smiod { "exetaf", SHORT_2, 1, EITHER, PARONLY, 0x4e20, 0x7fff, { 0 } },
224*3d8817e4Smiod { "exetat", SHORT_2, 1, EITHER, PARONLY, 0x4e22, 0x7fff, { 0 } },
225*3d8817e4Smiod { "exp", LONG_R, 1, IU, SEQ, 0x15002a00, 0x3ffffe03, { RDST, RSRCE } },
226*3d8817e4Smiod { "exp", LONG_R, 1, IU, SEQ, 0x15002a02, 0x3ffffe0f, { RDST, ASRC } },
227*3d8817e4Smiod { "jl", SHORT_2, 3, MU, ALONE|BRANCH_LINK|PAR, 0x4d00, 0x7fe1, { RSRC } },
228*3d8817e4Smiod { "jmp", SHORT_2, 3, MU, ALONE|BRANCH|PAR, 0x4c00, 0x7fe1, { RSRC } },
229*3d8817e4Smiod { "ld", LONG_L, 1, MU, SEQ, 0x30000000, 0x3f000000, { RDST, ATPAR, NUM16, RSRC } },
230*3d8817e4Smiod { "ld", SHORT_2, 1, MU, PAR|RMEM, 0x6401, 0x7e01, { RDST, ATSIGN, RSRC, MINUS } },
231*3d8817e4Smiod { "ld", SHORT_2, 1, MU, PAR|RMEM, 0x6001, 0x7e01, { RDST, ATSIGN, RSRC, PLUS } },
232*3d8817e4Smiod { "ld", SHORT_2, 1, MU, PAR|RMEM, 0x6000, 0x7e01, { RDST, ATSIGN, RSRC } },
233*3d8817e4Smiod { "ld", LONG_L, 1, MU, SEQ, 0x32010000, 0x3f0f0000, { RDST, ATSIGN, NUM16 } },
234*3d8817e4Smiod { "ld2w", LONG_L, 1, MU, SEQ, 0x31000000, 0x3f100000, { RDSTE, ATPAR, NUM16, RSRC } },
235*3d8817e4Smiod { "ld2w", SHORT_2, 1, MU, PAR|RMEM, 0x6601, 0x7e21, { RDSTE, ATSIGN, RSRC, MINUS } },
236*3d8817e4Smiod { "ld2w", SHORT_2, 1, MU, PAR|RMEM, 0x6201, 0x7e21, { RDSTE, ATSIGN, RSRC, PLUS } },
237*3d8817e4Smiod { "ld2w", SHORT_2, 1, MU, PAR|RMEM, 0x6200, 0x7e21, { RDSTE, ATSIGN, RSRC } },
238*3d8817e4Smiod { "ld2w", LONG_L, 1, MU, SEQ, 0x33010000, 0x3f1f0000, { RDSTE, ATSIGN, NUM16 } },
239*3d8817e4Smiod { "ldb", LONG_L, 1, MU, SEQ, 0x38000000, 0x3f000000, { RDST, ATPAR, NUM16, RSRC } },
240*3d8817e4Smiod { "ldb", SHORT_2, 1, MU, PAR|RMEM, 0x7000, 0x7e01, { RDST, ATSIGN, RSRC } },
241*3d8817e4Smiod { "ldi", OPCODE_FAKE, 0, 0, 0, 0, 0, { 1, 4, 16, 0 } },
242*3d8817e4Smiod { "ldi.s", SHORT_2, 1, EITHER, PAR|RMEM, 0x4001, 0x7e01 , { RDST, NUM4 } },
243*3d8817e4Smiod { "ldi.l", LONG_L, 1, MU, SEQ, 0x20000000, 0x3f0f0000, { RDST, NUM16 } },
244*3d8817e4Smiod { "ldub", LONG_L, 1, MU, SEQ, 0x39000000, 0x3f000000, { RDST, ATPAR, NUM16, RSRC } },
245*3d8817e4Smiod { "ldub", SHORT_2, 1, MU, PAR|RMEM, 0x7200, 0x7e01, { RDST, ATSIGN, RSRC } },
246*3d8817e4Smiod { "mac", SHORT_2, 1, IU, PAR, 0x2a00, 0x7e00, { ADST0, RSRC2, RSRC } },
247*3d8817e4Smiod { "macsu", SHORT_2, 1, IU, PAR, 0x1a00, 0x7e00, { ADST0, RSRC2, RSRC } },
248*3d8817e4Smiod { "macu", SHORT_2, 1, IU, PAR, 0x3a00, 0x7e00, { ADST0, RSRC2, RSRC } },
249*3d8817e4Smiod { "max", SHORT_2, 1, IU, PAR|WF0, 0x2600, 0x7e01, { RDST, RSRC } },
250*3d8817e4Smiod { "max", SHORT_2, 1, IU, PAR|WF0, 0x3600, 0x7ee3, { ADST, RSRCE } },
251*3d8817e4Smiod { "max", SHORT_2, 1, IU, PAR|WF0, 0x3602, 0x7eef, { ADST, ASRC } },
252*3d8817e4Smiod { "min", SHORT_2, 1, IU, PAR|WF0, 0x2601, 0x7e01 , { RDST, RSRC } },
253*3d8817e4Smiod { "min", SHORT_2, 1, IU, PAR|WF0, 0x3601, 0x7ee3 , { ADST, RSRCE } },
254*3d8817e4Smiod { "min", SHORT_2, 1, IU, PAR|WF0, 0x3603, 0x7eef, { ADST, ASRC } },
255*3d8817e4Smiod { "msb", SHORT_2, 1, IU, PAR, 0x2800, 0x7e00, { ADST0, RSRC2, RSRC } },
256*3d8817e4Smiod { "msbsu", SHORT_2, 1, IU, PAR, 0x1800, 0x7e00, { ADST0, RSRC2, RSRC } },
257*3d8817e4Smiod { "msbu", SHORT_2, 1, IU, PAR, 0x3800, 0x7e00, { ADST0, RSRC2, RSRC } },
258*3d8817e4Smiod { "mul", SHORT_2, 1, IU, PAR, 0x2e00, 0x7e01 , { RDST, RSRC } },
259*3d8817e4Smiod { "mulx", SHORT_2, 1, IU, PAR, 0x2c00, 0x7e00, { ADST0, RSRC2, RSRC } },
260*3d8817e4Smiod { "mulxsu", SHORT_2, 1, IU, PAR, 0x1c00, 0x7e00, { ADST0, RSRC2, RSRC } },
261*3d8817e4Smiod { "mulxu", SHORT_2, 1, IU, PAR, 0x3c00, 0x7e00, { ADST0, RSRC2, RSRC } },
262*3d8817e4Smiod { "mv", SHORT_2, 1, EITHER, PAR, 0x4000, 0x7e01, { RDST, RSRC } },
263*3d8817e4Smiod { "mv2w", SHORT_2, 1, IU, PAR, 0x5000, 0x7e23, { RDSTE, RSRCE } },
264*3d8817e4Smiod { "mv2wfac", SHORT_2, 1, IU, PAR, 0x3e00, 0x7e2f, { RDSTE, ASRC } },
265*3d8817e4Smiod { "mv2wtac", SHORT_2, 1, IU, PAR, 0x3e01, 0x7ee3, { RSRCE, ADST } },
266*3d8817e4Smiod { "mvac", SHORT_2, 1, IU, PAR, 0x3e03, 0x7eef, { ADST, ASRC } },
267*3d8817e4Smiod { "mvb", SHORT_2, 1, IU, PAR, 0x5400, 0x7e01, { RDST, RSRC } },
268*3d8817e4Smiod { "mvf0f", SHORT_2, 1, EITHER, PAR|RF0, 0x4400, 0x7e01, { RDST, RSRC } },
269*3d8817e4Smiod { "mvf0t", SHORT_2, 1, EITHER, PAR|RF0, 0x4401, 0x7e01, { RDST, RSRC } },
270*3d8817e4Smiod { "mvfacg", SHORT_2, 1, IU, PAR, 0x1e04, 0x7e0f, { RDST, ASRC } },
271*3d8817e4Smiod { "mvfachi", SHORT_2, 1, IU, PAR, 0x1e00, 0x7e0f, { RDST, ASRC } },
272*3d8817e4Smiod { "mvfaclo", SHORT_2, 1, IU, PAR, 0x1e02, 0x7e0f, { RDST, ASRC } },
273*3d8817e4Smiod { "mvfc", SHORT_2, 1, MU, PAR, 0x5200, 0x7e01, { RDST, CSRC } },
274*3d8817e4Smiod { "mvtacg", SHORT_2, 1, IU, PAR, 0x1e41, 0x7ee1, { RSRC, ADST } },
275*3d8817e4Smiod { "mvtachi", SHORT_2, 1, IU, PAR, 0x1e01, 0x7ee1, { RSRC, ADST } },
276*3d8817e4Smiod { "mvtaclo", SHORT_2, 1, IU, PAR, 0x1e21, 0x7ee1, { RSRC, ADST } },
277*3d8817e4Smiod { "mvtc", SHORT_2, 1, MU, PAR, 0x5600, 0x7e01, { RSRC, CDST } },
278*3d8817e4Smiod { "mvub", SHORT_2, 1, IU, PAR, 0x5401, 0x7e01, { RDST, RSRC } },
279*3d8817e4Smiod { "neg", SHORT_2, 1, EITHER, PAR, 0x4605, 0x7e1f, { RDST } },
280*3d8817e4Smiod { "neg", SHORT_2, 1, IU, PAR, 0x5605, 0x7eff, { ADST } },
281*3d8817e4Smiod { "nop", SHORT_2, 1, EITHER, PAR, 0x5e00, 0x7fff, { 0 } },
282*3d8817e4Smiod { "not", SHORT_2, 1, EITHER, PAR, 0x4603, 0x7e1f, { RDST } },
283*3d8817e4Smiod { "or", SHORT_2, 1, EITHER, PAR, 0x800, 0x7e01, { RDST, RSRC } },
284*3d8817e4Smiod { "or3", LONG_L, 1, MU, SEQ, 0x4000000, 0x3f000000, { RDST, RSRC, NUM16 } },
285*3d8817e4Smiod /* Special case. sac&sachi must occur before rac&rachi because they have
286*3d8817e4Smiod intersecting masks! The masks for rac&rachi will match sac&sachi but
287*3d8817e4Smiod not the other way around.
288*3d8817e4Smiod */
289*3d8817e4Smiod { "sac", SHORT_2, 1, IU, PAR|RF0|WF0, 0x5209, 0x7e2f, { RDSTE, ASRC } },
290*3d8817e4Smiod { "sachi", SHORT_2, 1, IU, PAR|RF0|WF0, 0x4209, 0x7e0f, { RDST, ASRC } },
291*3d8817e4Smiod { "rac", SHORT_2, 1, IU, PAR|WF0, 0x5201, 0x7e21, { RDSTE, ASRC0ONLY, NUM3 } },
292*3d8817e4Smiod { "rachi", SHORT_2, 1, IU, PAR|WF0, 0x4201, 0x7e01, { RDST, ASRC, NUM3 } },
293*3d8817e4Smiod { "rep", LONG_L, 2, MU, SEQ, 0x27000000, 0x3ff00000, { RSRC, ANUM16 } },
294*3d8817e4Smiod { "repi", LONG_L, 2, MU, SEQ, 0x2f000000, 0x3f000000, { UNUM8, ANUM16 } },
295*3d8817e4Smiod { "rtd", SHORT_2, 3, MU, ALONE|PAR, 0x5f60, 0x7fff, { 0 } },
296*3d8817e4Smiod { "rte", SHORT_2, 3, MU, ALONE|PAR, 0x5f40, 0x7fff, { 0 } },
297*3d8817e4Smiod { "sadd", SHORT_2, 1, IU, PAR, 0x1223, 0x7eef, { ADST, ASRC } },
298*3d8817e4Smiod { "setf0f", SHORT_2, 1, MU, PAR|RF0, 0x4611, 0x7e1f, { RDST } },
299*3d8817e4Smiod { "setf0t", SHORT_2, 1, MU, PAR|RF0, 0x4613, 0x7e1f, { RDST } },
300*3d8817e4Smiod { "slae", SHORT_2, 1, IU, PAR, 0x3220, 0x7ee1, { ADST, RSRC } },
301*3d8817e4Smiod { "sleep", SHORT_2, 1, MU, ALONE|PAR, 0x5fc0, 0x7fff, { 0 } },
302*3d8817e4Smiod { "sll", SHORT_2, 1, IU, PAR, 0x2200, 0x7e01, { RDST, RSRC } },
303*3d8817e4Smiod { "sll", SHORT_2, 1, IU, PAR, 0x3200, 0x7ee1, { ADST, RSRC } },
304*3d8817e4Smiod { "slli", SHORT_2, 1, IU, PAR, 0x2201, 0x7e01, { RDST, UNUM4 } },
305*3d8817e4Smiod { "slli", SHORT_2, 1, IU, PAR, 0x3201, 0x7ee1, { ADST, UNUM4S } },
306*3d8817e4Smiod { "slx", SHORT_2, 1, IU, PAR|RF0, 0x460b, 0x7e1f, { RDST } },
307*3d8817e4Smiod { "sra", SHORT_2, 1, IU, PAR, 0x2400, 0x7e01, { RDST, RSRC } },
308*3d8817e4Smiod { "sra", SHORT_2, 1, IU, PAR, 0x3400, 0x7ee1, { ADST, RSRC } },
309*3d8817e4Smiod { "srai", SHORT_2, 1, IU, PAR, 0x2401, 0x7e01, { RDST, UNUM4 } },
310*3d8817e4Smiod { "srai", SHORT_2, 1, IU, PAR, 0x3401, 0x7ee1, { ADST, UNUM4S } },
311*3d8817e4Smiod { "srl", SHORT_2, 1, IU, PAR, 0x2000, 0x7e01, { RDST, RSRC } },
312*3d8817e4Smiod { "srl", SHORT_2, 1, IU, PAR, 0x3000, 0x7ee1, { ADST, RSRC } },
313*3d8817e4Smiod { "srli", SHORT_2, 1, IU, PAR, 0x2001, 0x7e01, { RDST, UNUM4 } },
314*3d8817e4Smiod { "srli", SHORT_2, 1, IU, PAR, 0x3001, 0x7ee1, { ADST, UNUM4S } },
315*3d8817e4Smiod { "srx", SHORT_2, 1, IU, PAR|RF0, 0x4609, 0x7e1f, { RDST } },
316*3d8817e4Smiod { "st", LONG_L, 1, MU, SEQ, 0x34000000, 0x3f000000, { RSRC2, ATPAR, NUM16, RSRC } },
317*3d8817e4Smiod { "st", SHORT_2, 1, MU, PAR|WMEM, 0x6800, 0x7e01, { RSRC2, ATSIGN, RSRC } },
318*3d8817e4Smiod { "st", SHORT_2, 1, MU, PAR|WMEM, 0x6c1f, 0x7e1f, { RSRC2, ATMINUS, RSRC_SP } },
319*3d8817e4Smiod { "st", SHORT_2, 1, MU, PAR|WMEM, 0x6801, 0x7e01, { RSRC2, ATSIGN, RSRC, PLUS } },
320*3d8817e4Smiod { "st", SHORT_2, 1, MU, PAR|WMEM, 0x6c01, 0x7e01, { RSRC2, ATSIGN, RSRC_NOSP, MINUS } },
321*3d8817e4Smiod { "st", LONG_L, 1, MU, SEQ, 0x36010000, 0x3f0f0000, { RSRC2, ATSIGN, NUM16 } },
322*3d8817e4Smiod { "st2w", LONG_L, 1, MU, SEQ, 0x35000000, 0x3f100000, { RSRC2E, ATPAR, NUM16, RSRC } },
323*3d8817e4Smiod { "st2w", SHORT_2, 1, MU, PAR|WMEM, 0x6a00, 0x7e21, { RSRC2E, ATSIGN, RSRC } },
324*3d8817e4Smiod { "st2w", SHORT_2, 1, MU, PAR|WMEM, 0x6e1f, 0x7e3f, { RSRC2E, ATMINUS, RSRC_SP } },
325*3d8817e4Smiod { "st2w", SHORT_2, 1, MU, PAR|WMEM, 0x6a01, 0x7e21, { RSRC2E, ATSIGN, RSRC, PLUS } },
326*3d8817e4Smiod { "st2w", SHORT_2, 1, MU, PAR|WMEM, 0x6e01, 0x7e21, { RSRC2E, ATSIGN, RSRC_NOSP, MINUS } },
327*3d8817e4Smiod { "st2w", LONG_L, 1, MU, SEQ, 0x37010000, 0x3f1f0000, { RSRC2E, ATSIGN, NUM16 } },
328*3d8817e4Smiod { "stb", LONG_L, 1, MU, SEQ, 0x3c000000, 0x3f000000, { RSRC2, ATPAR, NUM16, RSRC } },
329*3d8817e4Smiod { "stb", SHORT_2, 1, MU, PAR|WMEM, 0x7800, 0x7e01, { RSRC2, ATSIGN, RSRC } },
330*3d8817e4Smiod { "stop", SHORT_2, 1, MU, ALONE|PAR, 0x5fe0, 0x7fff, { 0 } },
331*3d8817e4Smiod { "sub", SHORT_2, 1, EITHER, PAR|WCAR, 0x0, 0x7e01, { RDST, RSRC } },
332*3d8817e4Smiod { "sub", SHORT_2, 1, IU, PAR, 0x1001, 0x7ee3, { ADST, RSRC } },
333*3d8817e4Smiod { "sub", SHORT_2, 1, IU, PAR, 0x1003, 0x7eef, { ADST, ASRC } },
334*3d8817e4Smiod { "sub2w", SHORT_2, 1, IU, PAR|WCAR, 0x1000, 0x7e23, { RDSTE, RSRCE } },
335*3d8817e4Smiod { "subac3", LONG_R, 1, IU, SEQ, 0x17000000, 0x3ffffe22, { RDSTE, RSRCE, ASRC0 } },
336*3d8817e4Smiod { "subac3", LONG_R, 1, IU, SEQ, 0x17000002, 0x3ffffe2e, { RDSTE, ASRC, ASRC0 } },
337*3d8817e4Smiod { "subac3s", LONG_R, 1, IU, SEQ, 0x17001000, 0x3ffffe22, { RDSTE, RSRCE, ASRC0 } },
338*3d8817e4Smiod { "subac3s", LONG_R, 1, IU, SEQ, 0x17001002, 0x3ffffe2e, { RDSTE, ASRC, ASRC0 } },
339*3d8817e4Smiod { "subi", SHORT_2, 1, EITHER, PAR, 0x1, 0x7e01, { RDST, UNUM4S } },
340*3d8817e4Smiod { "trap", SHORT_2, 5, MU, ALONE|BRANCH_LINK|PAR, 0x5f00, 0x7fe1, { UNUM4 } },
341*3d8817e4Smiod { "tst0i", LONG_L, 1, MU, SEQ, 0x7000000, 0x3f0f0000, { RSRC2, NUM16 } },
342*3d8817e4Smiod { "tst1i", LONG_L, 1, MU, SEQ, 0xf000000, 0x3f0f0000, { RSRC2, NUM16 } },
343*3d8817e4Smiod { "wait", SHORT_2, 1, MU, ALONE|PAR, 0x5f80, 0x7fff, { 0 } },
344*3d8817e4Smiod { "xor", SHORT_2, 1, EITHER, PAR, 0xa00, 0x7e01, { RDST, RSRC } },
345*3d8817e4Smiod { "xor3", LONG_L, 1, MU, SEQ, 0x5000000, 0x3f000000, { RDST, RSRC, NUM16 } },
346*3d8817e4Smiod { 0, 0, 0, 0, 0, 0, 0, { 0 } },
347*3d8817e4Smiod };
348*3d8817e4Smiod
349*3d8817e4Smiod
350