xref: /openbsd-src/gnu/usr.bin/binutils-2.17/opcodes/m32r-opc.c (revision 3d8817e467ea46cf4772788d6804dd293abfb01a)
1*3d8817e4Smiod /* Instruction opcode table for m32r.
2*3d8817e4Smiod 
3*3d8817e4Smiod THIS FILE IS MACHINE GENERATED WITH CGEN.
4*3d8817e4Smiod 
5*3d8817e4Smiod Copyright 1996-2005 Free Software Foundation, Inc.
6*3d8817e4Smiod 
7*3d8817e4Smiod This file is part of the GNU Binutils and/or GDB, the GNU debugger.
8*3d8817e4Smiod 
9*3d8817e4Smiod This program is free software; you can redistribute it and/or modify
10*3d8817e4Smiod it under the terms of the GNU General Public License as published by
11*3d8817e4Smiod the Free Software Foundation; either version 2, or (at your option)
12*3d8817e4Smiod any later version.
13*3d8817e4Smiod 
14*3d8817e4Smiod This program is distributed in the hope that it will be useful,
15*3d8817e4Smiod but WITHOUT ANY WARRANTY; without even the implied warranty of
16*3d8817e4Smiod MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17*3d8817e4Smiod GNU General Public License for more details.
18*3d8817e4Smiod 
19*3d8817e4Smiod You should have received a copy of the GNU General Public License along
20*3d8817e4Smiod with this program; if not, write to the Free Software Foundation, Inc.,
21*3d8817e4Smiod 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
22*3d8817e4Smiod 
23*3d8817e4Smiod */
24*3d8817e4Smiod 
25*3d8817e4Smiod #include "sysdep.h"
26*3d8817e4Smiod #include "ansidecl.h"
27*3d8817e4Smiod #include "bfd.h"
28*3d8817e4Smiod #include "symcat.h"
29*3d8817e4Smiod #include "m32r-desc.h"
30*3d8817e4Smiod #include "m32r-opc.h"
31*3d8817e4Smiod #include "libiberty.h"
32*3d8817e4Smiod 
33*3d8817e4Smiod /* -- opc.c */
34*3d8817e4Smiod unsigned int
m32r_cgen_dis_hash(const char * buf ATTRIBUTE_UNUSED,CGEN_INSN_INT value)35*3d8817e4Smiod m32r_cgen_dis_hash (const char * buf ATTRIBUTE_UNUSED, CGEN_INSN_INT value)
36*3d8817e4Smiod {
37*3d8817e4Smiod   unsigned int x;
38*3d8817e4Smiod 
39*3d8817e4Smiod   if (value & 0xffff0000) /* 32bit instructions.  */
40*3d8817e4Smiod     value = (value >> 16) & 0xffff;
41*3d8817e4Smiod 
42*3d8817e4Smiod   x = (value >> 8) & 0xf0;
43*3d8817e4Smiod   if (x == 0x40 || x == 0xe0 || x == 0x60 || x == 0x50)
44*3d8817e4Smiod     return x;
45*3d8817e4Smiod 
46*3d8817e4Smiod   if (x == 0x70 || x == 0xf0)
47*3d8817e4Smiod     return x | ((value >> 8) & 0x0f);
48*3d8817e4Smiod 
49*3d8817e4Smiod   if (x == 0x30)
50*3d8817e4Smiod     return x | ((value & 0x70) >> 4);
51*3d8817e4Smiod   else
52*3d8817e4Smiod     return x | ((value & 0xf0) >> 4);
53*3d8817e4Smiod }
54*3d8817e4Smiod 
55*3d8817e4Smiod /* -- */
56*3d8817e4Smiod /* The hash functions are recorded here to help keep assembler code out of
57*3d8817e4Smiod    the disassembler and vice versa.  */
58*3d8817e4Smiod 
59*3d8817e4Smiod static int asm_hash_insn_p        (const CGEN_INSN *);
60*3d8817e4Smiod static unsigned int asm_hash_insn (const char *);
61*3d8817e4Smiod static int dis_hash_insn_p        (const CGEN_INSN *);
62*3d8817e4Smiod static unsigned int dis_hash_insn (const char *, CGEN_INSN_INT);
63*3d8817e4Smiod 
64*3d8817e4Smiod /* Instruction formats.  */
65*3d8817e4Smiod 
66*3d8817e4Smiod #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
67*3d8817e4Smiod #define F(f) & m32r_cgen_ifld_table[M32R_##f]
68*3d8817e4Smiod #else
69*3d8817e4Smiod #define F(f) & m32r_cgen_ifld_table[M32R_/**/f]
70*3d8817e4Smiod #endif
71*3d8817e4Smiod static const CGEN_IFMT ifmt_empty ATTRIBUTE_UNUSED = {
72*3d8817e4Smiod   0, 0, 0x0, { { 0 } }
73*3d8817e4Smiod };
74*3d8817e4Smiod 
75*3d8817e4Smiod static const CGEN_IFMT ifmt_add ATTRIBUTE_UNUSED = {
76*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { 0 } }
77*3d8817e4Smiod };
78*3d8817e4Smiod 
79*3d8817e4Smiod static const CGEN_IFMT ifmt_add3 ATTRIBUTE_UNUSED = {
80*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
81*3d8817e4Smiod };
82*3d8817e4Smiod 
83*3d8817e4Smiod static const CGEN_IFMT ifmt_and3 ATTRIBUTE_UNUSED = {
84*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } }
85*3d8817e4Smiod };
86*3d8817e4Smiod 
87*3d8817e4Smiod static const CGEN_IFMT ifmt_or3 ATTRIBUTE_UNUSED = {
88*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } }
89*3d8817e4Smiod };
90*3d8817e4Smiod 
91*3d8817e4Smiod static const CGEN_IFMT ifmt_addi ATTRIBUTE_UNUSED = {
92*3d8817e4Smiod   16, 16, 0xf000, { { F (F_OP1) }, { F (F_R1) }, { F (F_SIMM8) }, { 0 } }
93*3d8817e4Smiod };
94*3d8817e4Smiod 
95*3d8817e4Smiod static const CGEN_IFMT ifmt_addv3 ATTRIBUTE_UNUSED = {
96*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
97*3d8817e4Smiod };
98*3d8817e4Smiod 
99*3d8817e4Smiod static const CGEN_IFMT ifmt_bc8 ATTRIBUTE_UNUSED = {
100*3d8817e4Smiod   16, 16, 0xff00, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP8) }, { 0 } }
101*3d8817e4Smiod };
102*3d8817e4Smiod 
103*3d8817e4Smiod static const CGEN_IFMT ifmt_bc24 ATTRIBUTE_UNUSED = {
104*3d8817e4Smiod   32, 32, 0xff000000, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP24) }, { 0 } }
105*3d8817e4Smiod };
106*3d8817e4Smiod 
107*3d8817e4Smiod static const CGEN_IFMT ifmt_beq ATTRIBUTE_UNUSED = {
108*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_DISP16) }, { 0 } }
109*3d8817e4Smiod };
110*3d8817e4Smiod 
111*3d8817e4Smiod static const CGEN_IFMT ifmt_beqz ATTRIBUTE_UNUSED = {
112*3d8817e4Smiod   32, 32, 0xfff00000, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_DISP16) }, { 0 } }
113*3d8817e4Smiod };
114*3d8817e4Smiod 
115*3d8817e4Smiod static const CGEN_IFMT ifmt_cmp ATTRIBUTE_UNUSED = {
116*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { 0 } }
117*3d8817e4Smiod };
118*3d8817e4Smiod 
119*3d8817e4Smiod static const CGEN_IFMT ifmt_cmpi ATTRIBUTE_UNUSED = {
120*3d8817e4Smiod   32, 32, 0xfff00000, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
121*3d8817e4Smiod };
122*3d8817e4Smiod 
123*3d8817e4Smiod static const CGEN_IFMT ifmt_cmpz ATTRIBUTE_UNUSED = {
124*3d8817e4Smiod   16, 16, 0xfff0, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { 0 } }
125*3d8817e4Smiod };
126*3d8817e4Smiod 
127*3d8817e4Smiod static const CGEN_IFMT ifmt_div ATTRIBUTE_UNUSED = {
128*3d8817e4Smiod   32, 32, 0xf0f0ffff, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
129*3d8817e4Smiod };
130*3d8817e4Smiod 
131*3d8817e4Smiod static const CGEN_IFMT ifmt_jc ATTRIBUTE_UNUSED = {
132*3d8817e4Smiod   16, 16, 0xfff0, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { 0 } }
133*3d8817e4Smiod };
134*3d8817e4Smiod 
135*3d8817e4Smiod static const CGEN_IFMT ifmt_ld24 ATTRIBUTE_UNUSED = {
136*3d8817e4Smiod   32, 32, 0xf0000000, { { F (F_OP1) }, { F (F_R1) }, { F (F_UIMM24) }, { 0 } }
137*3d8817e4Smiod };
138*3d8817e4Smiod 
139*3d8817e4Smiod static const CGEN_IFMT ifmt_ldi16 ATTRIBUTE_UNUSED = {
140*3d8817e4Smiod   32, 32, 0xf0ff0000, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
141*3d8817e4Smiod };
142*3d8817e4Smiod 
143*3d8817e4Smiod static const CGEN_IFMT ifmt_machi_a ATTRIBUTE_UNUSED = {
144*3d8817e4Smiod   16, 16, 0xf070, { { F (F_OP1) }, { F (F_R1) }, { F (F_ACC) }, { F (F_OP23) }, { F (F_R2) }, { 0 } }
145*3d8817e4Smiod };
146*3d8817e4Smiod 
147*3d8817e4Smiod static const CGEN_IFMT ifmt_mvfachi ATTRIBUTE_UNUSED = {
148*3d8817e4Smiod   16, 16, 0xf0ff, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { 0 } }
149*3d8817e4Smiod };
150*3d8817e4Smiod 
151*3d8817e4Smiod static const CGEN_IFMT ifmt_mvfachi_a ATTRIBUTE_UNUSED = {
152*3d8817e4Smiod   16, 16, 0xf0f3, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_ACCS) }, { F (F_OP3) }, { 0 } }
153*3d8817e4Smiod };
154*3d8817e4Smiod 
155*3d8817e4Smiod static const CGEN_IFMT ifmt_mvfc ATTRIBUTE_UNUSED = {
156*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { 0 } }
157*3d8817e4Smiod };
158*3d8817e4Smiod 
159*3d8817e4Smiod static const CGEN_IFMT ifmt_mvtachi ATTRIBUTE_UNUSED = {
160*3d8817e4Smiod   16, 16, 0xf0ff, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { 0 } }
161*3d8817e4Smiod };
162*3d8817e4Smiod 
163*3d8817e4Smiod static const CGEN_IFMT ifmt_mvtachi_a ATTRIBUTE_UNUSED = {
164*3d8817e4Smiod   16, 16, 0xf0f3, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_ACCS) }, { F (F_OP3) }, { 0 } }
165*3d8817e4Smiod };
166*3d8817e4Smiod 
167*3d8817e4Smiod static const CGEN_IFMT ifmt_mvtc ATTRIBUTE_UNUSED = {
168*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { 0 } }
169*3d8817e4Smiod };
170*3d8817e4Smiod 
171*3d8817e4Smiod static const CGEN_IFMT ifmt_nop ATTRIBUTE_UNUSED = {
172*3d8817e4Smiod   16, 16, 0xffff, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { 0 } }
173*3d8817e4Smiod };
174*3d8817e4Smiod 
175*3d8817e4Smiod static const CGEN_IFMT ifmt_rac_dsi ATTRIBUTE_UNUSED = {
176*3d8817e4Smiod   16, 16, 0xf3f2, { { F (F_OP1) }, { F (F_ACCD) }, { F (F_BITS67) }, { F (F_OP2) }, { F (F_ACCS) }, { F (F_BIT14) }, { F (F_IMM1) }, { 0 } }
177*3d8817e4Smiod };
178*3d8817e4Smiod 
179*3d8817e4Smiod static const CGEN_IFMT ifmt_seth ATTRIBUTE_UNUSED = {
180*3d8817e4Smiod   32, 32, 0xf0ff0000, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_HI16) }, { 0 } }
181*3d8817e4Smiod };
182*3d8817e4Smiod 
183*3d8817e4Smiod static const CGEN_IFMT ifmt_slli ATTRIBUTE_UNUSED = {
184*3d8817e4Smiod   16, 16, 0xf0e0, { { F (F_OP1) }, { F (F_R1) }, { F (F_SHIFT_OP2) }, { F (F_UIMM5) }, { 0 } }
185*3d8817e4Smiod };
186*3d8817e4Smiod 
187*3d8817e4Smiod static const CGEN_IFMT ifmt_st_d ATTRIBUTE_UNUSED = {
188*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
189*3d8817e4Smiod };
190*3d8817e4Smiod 
191*3d8817e4Smiod static const CGEN_IFMT ifmt_trap ATTRIBUTE_UNUSED = {
192*3d8817e4Smiod   16, 16, 0xfff0, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_UIMM4) }, { 0 } }
193*3d8817e4Smiod };
194*3d8817e4Smiod 
195*3d8817e4Smiod static const CGEN_IFMT ifmt_satb ATTRIBUTE_UNUSED = {
196*3d8817e4Smiod   32, 32, 0xf0f0ffff, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } }
197*3d8817e4Smiod };
198*3d8817e4Smiod 
199*3d8817e4Smiod static const CGEN_IFMT ifmt_clrpsw ATTRIBUTE_UNUSED = {
200*3d8817e4Smiod   16, 16, 0xff00, { { F (F_OP1) }, { F (F_R1) }, { F (F_UIMM8) }, { 0 } }
201*3d8817e4Smiod };
202*3d8817e4Smiod 
203*3d8817e4Smiod static const CGEN_IFMT ifmt_bset ATTRIBUTE_UNUSED = {
204*3d8817e4Smiod   32, 32, 0xf8f00000, { { F (F_OP1) }, { F (F_BIT4) }, { F (F_UIMM3) }, { F (F_OP2) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
205*3d8817e4Smiod };
206*3d8817e4Smiod 
207*3d8817e4Smiod static const CGEN_IFMT ifmt_btst ATTRIBUTE_UNUSED = {
208*3d8817e4Smiod   16, 16, 0xf8f0, { { F (F_OP1) }, { F (F_BIT4) }, { F (F_UIMM3) }, { F (F_OP2) }, { F (F_R2) }, { 0 } }
209*3d8817e4Smiod };
210*3d8817e4Smiod 
211*3d8817e4Smiod #undef F
212*3d8817e4Smiod 
213*3d8817e4Smiod #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
214*3d8817e4Smiod #define A(a) (1 << CGEN_INSN_##a)
215*3d8817e4Smiod #else
216*3d8817e4Smiod #define A(a) (1 << CGEN_INSN_/**/a)
217*3d8817e4Smiod #endif
218*3d8817e4Smiod #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
219*3d8817e4Smiod #define OPERAND(op) M32R_OPERAND_##op
220*3d8817e4Smiod #else
221*3d8817e4Smiod #define OPERAND(op) M32R_OPERAND_/**/op
222*3d8817e4Smiod #endif
223*3d8817e4Smiod #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
224*3d8817e4Smiod #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
225*3d8817e4Smiod 
226*3d8817e4Smiod /* The instruction table.  */
227*3d8817e4Smiod 
228*3d8817e4Smiod static const CGEN_OPCODE m32r_cgen_insn_opcode_table[MAX_INSNS] =
229*3d8817e4Smiod {
230*3d8817e4Smiod   /* Special null first entry.
231*3d8817e4Smiod      A `num' value of zero is thus invalid.
232*3d8817e4Smiod      Also, the special `invalid' insn resides here.  */
233*3d8817e4Smiod   { { 0, 0, 0, 0 }, {{0}}, 0, {0}},
234*3d8817e4Smiod /* add $dr,$sr */
235*3d8817e4Smiod   {
236*3d8817e4Smiod     { 0, 0, 0, 0 },
237*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
238*3d8817e4Smiod     & ifmt_add, { 0xa0 }
239*3d8817e4Smiod   },
240*3d8817e4Smiod /* add3 $dr,$sr,$hash$slo16 */
241*3d8817e4Smiod   {
242*3d8817e4Smiod     { 0, 0, 0, 0 },
243*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), ',', OP (HASH), OP (SLO16), 0 } },
244*3d8817e4Smiod     & ifmt_add3, { 0x80a00000 }
245*3d8817e4Smiod   },
246*3d8817e4Smiod /* and $dr,$sr */
247*3d8817e4Smiod   {
248*3d8817e4Smiod     { 0, 0, 0, 0 },
249*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
250*3d8817e4Smiod     & ifmt_add, { 0xc0 }
251*3d8817e4Smiod   },
252*3d8817e4Smiod /* and3 $dr,$sr,$uimm16 */
253*3d8817e4Smiod   {
254*3d8817e4Smiod     { 0, 0, 0, 0 },
255*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), ',', OP (UIMM16), 0 } },
256*3d8817e4Smiod     & ifmt_and3, { 0x80c00000 }
257*3d8817e4Smiod   },
258*3d8817e4Smiod /* or $dr,$sr */
259*3d8817e4Smiod   {
260*3d8817e4Smiod     { 0, 0, 0, 0 },
261*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
262*3d8817e4Smiod     & ifmt_add, { 0xe0 }
263*3d8817e4Smiod   },
264*3d8817e4Smiod /* or3 $dr,$sr,$hash$ulo16 */
265*3d8817e4Smiod   {
266*3d8817e4Smiod     { 0, 0, 0, 0 },
267*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), ',', OP (HASH), OP (ULO16), 0 } },
268*3d8817e4Smiod     & ifmt_or3, { 0x80e00000 }
269*3d8817e4Smiod   },
270*3d8817e4Smiod /* xor $dr,$sr */
271*3d8817e4Smiod   {
272*3d8817e4Smiod     { 0, 0, 0, 0 },
273*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
274*3d8817e4Smiod     & ifmt_add, { 0xd0 }
275*3d8817e4Smiod   },
276*3d8817e4Smiod /* xor3 $dr,$sr,$uimm16 */
277*3d8817e4Smiod   {
278*3d8817e4Smiod     { 0, 0, 0, 0 },
279*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), ',', OP (UIMM16), 0 } },
280*3d8817e4Smiod     & ifmt_and3, { 0x80d00000 }
281*3d8817e4Smiod   },
282*3d8817e4Smiod /* addi $dr,$simm8 */
283*3d8817e4Smiod   {
284*3d8817e4Smiod     { 0, 0, 0, 0 },
285*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SIMM8), 0 } },
286*3d8817e4Smiod     & ifmt_addi, { 0x4000 }
287*3d8817e4Smiod   },
288*3d8817e4Smiod /* addv $dr,$sr */
289*3d8817e4Smiod   {
290*3d8817e4Smiod     { 0, 0, 0, 0 },
291*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
292*3d8817e4Smiod     & ifmt_add, { 0x80 }
293*3d8817e4Smiod   },
294*3d8817e4Smiod /* addv3 $dr,$sr,$simm16 */
295*3d8817e4Smiod   {
296*3d8817e4Smiod     { 0, 0, 0, 0 },
297*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), ',', OP (SIMM16), 0 } },
298*3d8817e4Smiod     & ifmt_addv3, { 0x80800000 }
299*3d8817e4Smiod   },
300*3d8817e4Smiod /* addx $dr,$sr */
301*3d8817e4Smiod   {
302*3d8817e4Smiod     { 0, 0, 0, 0 },
303*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
304*3d8817e4Smiod     & ifmt_add, { 0x90 }
305*3d8817e4Smiod   },
306*3d8817e4Smiod /* bc.s $disp8 */
307*3d8817e4Smiod   {
308*3d8817e4Smiod     { 0, 0, 0, 0 },
309*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
310*3d8817e4Smiod     & ifmt_bc8, { 0x7c00 }
311*3d8817e4Smiod   },
312*3d8817e4Smiod /* bc.l $disp24 */
313*3d8817e4Smiod   {
314*3d8817e4Smiod     { 0, 0, 0, 0 },
315*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
316*3d8817e4Smiod     & ifmt_bc24, { 0xfc000000 }
317*3d8817e4Smiod   },
318*3d8817e4Smiod /* beq $src1,$src2,$disp16 */
319*3d8817e4Smiod   {
320*3d8817e4Smiod     { 0, 0, 0, 0 },
321*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), ',', OP (DISP16), 0 } },
322*3d8817e4Smiod     & ifmt_beq, { 0xb0000000 }
323*3d8817e4Smiod   },
324*3d8817e4Smiod /* beqz $src2,$disp16 */
325*3d8817e4Smiod   {
326*3d8817e4Smiod     { 0, 0, 0, 0 },
327*3d8817e4Smiod     { { MNEM, ' ', OP (SRC2), ',', OP (DISP16), 0 } },
328*3d8817e4Smiod     & ifmt_beqz, { 0xb0800000 }
329*3d8817e4Smiod   },
330*3d8817e4Smiod /* bgez $src2,$disp16 */
331*3d8817e4Smiod   {
332*3d8817e4Smiod     { 0, 0, 0, 0 },
333*3d8817e4Smiod     { { MNEM, ' ', OP (SRC2), ',', OP (DISP16), 0 } },
334*3d8817e4Smiod     & ifmt_beqz, { 0xb0b00000 }
335*3d8817e4Smiod   },
336*3d8817e4Smiod /* bgtz $src2,$disp16 */
337*3d8817e4Smiod   {
338*3d8817e4Smiod     { 0, 0, 0, 0 },
339*3d8817e4Smiod     { { MNEM, ' ', OP (SRC2), ',', OP (DISP16), 0 } },
340*3d8817e4Smiod     & ifmt_beqz, { 0xb0d00000 }
341*3d8817e4Smiod   },
342*3d8817e4Smiod /* blez $src2,$disp16 */
343*3d8817e4Smiod   {
344*3d8817e4Smiod     { 0, 0, 0, 0 },
345*3d8817e4Smiod     { { MNEM, ' ', OP (SRC2), ',', OP (DISP16), 0 } },
346*3d8817e4Smiod     & ifmt_beqz, { 0xb0c00000 }
347*3d8817e4Smiod   },
348*3d8817e4Smiod /* bltz $src2,$disp16 */
349*3d8817e4Smiod   {
350*3d8817e4Smiod     { 0, 0, 0, 0 },
351*3d8817e4Smiod     { { MNEM, ' ', OP (SRC2), ',', OP (DISP16), 0 } },
352*3d8817e4Smiod     & ifmt_beqz, { 0xb0a00000 }
353*3d8817e4Smiod   },
354*3d8817e4Smiod /* bnez $src2,$disp16 */
355*3d8817e4Smiod   {
356*3d8817e4Smiod     { 0, 0, 0, 0 },
357*3d8817e4Smiod     { { MNEM, ' ', OP (SRC2), ',', OP (DISP16), 0 } },
358*3d8817e4Smiod     & ifmt_beqz, { 0xb0900000 }
359*3d8817e4Smiod   },
360*3d8817e4Smiod /* bl.s $disp8 */
361*3d8817e4Smiod   {
362*3d8817e4Smiod     { 0, 0, 0, 0 },
363*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
364*3d8817e4Smiod     & ifmt_bc8, { 0x7e00 }
365*3d8817e4Smiod   },
366*3d8817e4Smiod /* bl.l $disp24 */
367*3d8817e4Smiod   {
368*3d8817e4Smiod     { 0, 0, 0, 0 },
369*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
370*3d8817e4Smiod     & ifmt_bc24, { 0xfe000000 }
371*3d8817e4Smiod   },
372*3d8817e4Smiod /* bcl.s $disp8 */
373*3d8817e4Smiod   {
374*3d8817e4Smiod     { 0, 0, 0, 0 },
375*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
376*3d8817e4Smiod     & ifmt_bc8, { 0x7800 }
377*3d8817e4Smiod   },
378*3d8817e4Smiod /* bcl.l $disp24 */
379*3d8817e4Smiod   {
380*3d8817e4Smiod     { 0, 0, 0, 0 },
381*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
382*3d8817e4Smiod     & ifmt_bc24, { 0xf8000000 }
383*3d8817e4Smiod   },
384*3d8817e4Smiod /* bnc.s $disp8 */
385*3d8817e4Smiod   {
386*3d8817e4Smiod     { 0, 0, 0, 0 },
387*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
388*3d8817e4Smiod     & ifmt_bc8, { 0x7d00 }
389*3d8817e4Smiod   },
390*3d8817e4Smiod /* bnc.l $disp24 */
391*3d8817e4Smiod   {
392*3d8817e4Smiod     { 0, 0, 0, 0 },
393*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
394*3d8817e4Smiod     & ifmt_bc24, { 0xfd000000 }
395*3d8817e4Smiod   },
396*3d8817e4Smiod /* bne $src1,$src2,$disp16 */
397*3d8817e4Smiod   {
398*3d8817e4Smiod     { 0, 0, 0, 0 },
399*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), ',', OP (DISP16), 0 } },
400*3d8817e4Smiod     & ifmt_beq, { 0xb0100000 }
401*3d8817e4Smiod   },
402*3d8817e4Smiod /* bra.s $disp8 */
403*3d8817e4Smiod   {
404*3d8817e4Smiod     { 0, 0, 0, 0 },
405*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
406*3d8817e4Smiod     & ifmt_bc8, { 0x7f00 }
407*3d8817e4Smiod   },
408*3d8817e4Smiod /* bra.l $disp24 */
409*3d8817e4Smiod   {
410*3d8817e4Smiod     { 0, 0, 0, 0 },
411*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
412*3d8817e4Smiod     & ifmt_bc24, { 0xff000000 }
413*3d8817e4Smiod   },
414*3d8817e4Smiod /* bncl.s $disp8 */
415*3d8817e4Smiod   {
416*3d8817e4Smiod     { 0, 0, 0, 0 },
417*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
418*3d8817e4Smiod     & ifmt_bc8, { 0x7900 }
419*3d8817e4Smiod   },
420*3d8817e4Smiod /* bncl.l $disp24 */
421*3d8817e4Smiod   {
422*3d8817e4Smiod     { 0, 0, 0, 0 },
423*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
424*3d8817e4Smiod     & ifmt_bc24, { 0xf9000000 }
425*3d8817e4Smiod   },
426*3d8817e4Smiod /* cmp $src1,$src2 */
427*3d8817e4Smiod   {
428*3d8817e4Smiod     { 0, 0, 0, 0 },
429*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
430*3d8817e4Smiod     & ifmt_cmp, { 0x40 }
431*3d8817e4Smiod   },
432*3d8817e4Smiod /* cmpi $src2,$simm16 */
433*3d8817e4Smiod   {
434*3d8817e4Smiod     { 0, 0, 0, 0 },
435*3d8817e4Smiod     { { MNEM, ' ', OP (SRC2), ',', OP (SIMM16), 0 } },
436*3d8817e4Smiod     & ifmt_cmpi, { 0x80400000 }
437*3d8817e4Smiod   },
438*3d8817e4Smiod /* cmpu $src1,$src2 */
439*3d8817e4Smiod   {
440*3d8817e4Smiod     { 0, 0, 0, 0 },
441*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
442*3d8817e4Smiod     & ifmt_cmp, { 0x50 }
443*3d8817e4Smiod   },
444*3d8817e4Smiod /* cmpui $src2,$simm16 */
445*3d8817e4Smiod   {
446*3d8817e4Smiod     { 0, 0, 0, 0 },
447*3d8817e4Smiod     { { MNEM, ' ', OP (SRC2), ',', OP (SIMM16), 0 } },
448*3d8817e4Smiod     & ifmt_cmpi, { 0x80500000 }
449*3d8817e4Smiod   },
450*3d8817e4Smiod /* cmpeq $src1,$src2 */
451*3d8817e4Smiod   {
452*3d8817e4Smiod     { 0, 0, 0, 0 },
453*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
454*3d8817e4Smiod     & ifmt_cmp, { 0x60 }
455*3d8817e4Smiod   },
456*3d8817e4Smiod /* cmpz $src2 */
457*3d8817e4Smiod   {
458*3d8817e4Smiod     { 0, 0, 0, 0 },
459*3d8817e4Smiod     { { MNEM, ' ', OP (SRC2), 0 } },
460*3d8817e4Smiod     & ifmt_cmpz, { 0x70 }
461*3d8817e4Smiod   },
462*3d8817e4Smiod /* div $dr,$sr */
463*3d8817e4Smiod   {
464*3d8817e4Smiod     { 0, 0, 0, 0 },
465*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
466*3d8817e4Smiod     & ifmt_div, { 0x90000000 }
467*3d8817e4Smiod   },
468*3d8817e4Smiod /* divu $dr,$sr */
469*3d8817e4Smiod   {
470*3d8817e4Smiod     { 0, 0, 0, 0 },
471*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
472*3d8817e4Smiod     & ifmt_div, { 0x90100000 }
473*3d8817e4Smiod   },
474*3d8817e4Smiod /* rem $dr,$sr */
475*3d8817e4Smiod   {
476*3d8817e4Smiod     { 0, 0, 0, 0 },
477*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
478*3d8817e4Smiod     & ifmt_div, { 0x90200000 }
479*3d8817e4Smiod   },
480*3d8817e4Smiod /* remu $dr,$sr */
481*3d8817e4Smiod   {
482*3d8817e4Smiod     { 0, 0, 0, 0 },
483*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
484*3d8817e4Smiod     & ifmt_div, { 0x90300000 }
485*3d8817e4Smiod   },
486*3d8817e4Smiod /* remh $dr,$sr */
487*3d8817e4Smiod   {
488*3d8817e4Smiod     { 0, 0, 0, 0 },
489*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
490*3d8817e4Smiod     & ifmt_div, { 0x90200010 }
491*3d8817e4Smiod   },
492*3d8817e4Smiod /* remuh $dr,$sr */
493*3d8817e4Smiod   {
494*3d8817e4Smiod     { 0, 0, 0, 0 },
495*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
496*3d8817e4Smiod     & ifmt_div, { 0x90300010 }
497*3d8817e4Smiod   },
498*3d8817e4Smiod /* remb $dr,$sr */
499*3d8817e4Smiod   {
500*3d8817e4Smiod     { 0, 0, 0, 0 },
501*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
502*3d8817e4Smiod     & ifmt_div, { 0x90200018 }
503*3d8817e4Smiod   },
504*3d8817e4Smiod /* remub $dr,$sr */
505*3d8817e4Smiod   {
506*3d8817e4Smiod     { 0, 0, 0, 0 },
507*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
508*3d8817e4Smiod     & ifmt_div, { 0x90300018 }
509*3d8817e4Smiod   },
510*3d8817e4Smiod /* divuh $dr,$sr */
511*3d8817e4Smiod   {
512*3d8817e4Smiod     { 0, 0, 0, 0 },
513*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
514*3d8817e4Smiod     & ifmt_div, { 0x90100010 }
515*3d8817e4Smiod   },
516*3d8817e4Smiod /* divb $dr,$sr */
517*3d8817e4Smiod   {
518*3d8817e4Smiod     { 0, 0, 0, 0 },
519*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
520*3d8817e4Smiod     & ifmt_div, { 0x90000018 }
521*3d8817e4Smiod   },
522*3d8817e4Smiod /* divub $dr,$sr */
523*3d8817e4Smiod   {
524*3d8817e4Smiod     { 0, 0, 0, 0 },
525*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
526*3d8817e4Smiod     & ifmt_div, { 0x90100018 }
527*3d8817e4Smiod   },
528*3d8817e4Smiod /* divh $dr,$sr */
529*3d8817e4Smiod   {
530*3d8817e4Smiod     { 0, 0, 0, 0 },
531*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
532*3d8817e4Smiod     & ifmt_div, { 0x90000010 }
533*3d8817e4Smiod   },
534*3d8817e4Smiod /* jc $sr */
535*3d8817e4Smiod   {
536*3d8817e4Smiod     { 0, 0, 0, 0 },
537*3d8817e4Smiod     { { MNEM, ' ', OP (SR), 0 } },
538*3d8817e4Smiod     & ifmt_jc, { 0x1cc0 }
539*3d8817e4Smiod   },
540*3d8817e4Smiod /* jnc $sr */
541*3d8817e4Smiod   {
542*3d8817e4Smiod     { 0, 0, 0, 0 },
543*3d8817e4Smiod     { { MNEM, ' ', OP (SR), 0 } },
544*3d8817e4Smiod     & ifmt_jc, { 0x1dc0 }
545*3d8817e4Smiod   },
546*3d8817e4Smiod /* jl $sr */
547*3d8817e4Smiod   {
548*3d8817e4Smiod     { 0, 0, 0, 0 },
549*3d8817e4Smiod     { { MNEM, ' ', OP (SR), 0 } },
550*3d8817e4Smiod     & ifmt_jc, { 0x1ec0 }
551*3d8817e4Smiod   },
552*3d8817e4Smiod /* jmp $sr */
553*3d8817e4Smiod   {
554*3d8817e4Smiod     { 0, 0, 0, 0 },
555*3d8817e4Smiod     { { MNEM, ' ', OP (SR), 0 } },
556*3d8817e4Smiod     & ifmt_jc, { 0x1fc0 }
557*3d8817e4Smiod   },
558*3d8817e4Smiod /* ld $dr,@$sr */
559*3d8817e4Smiod   {
560*3d8817e4Smiod     { 0, 0, 0, 0 },
561*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', OP (SR), 0 } },
562*3d8817e4Smiod     & ifmt_add, { 0x20c0 }
563*3d8817e4Smiod   },
564*3d8817e4Smiod /* ld $dr,@($slo16,$sr) */
565*3d8817e4Smiod   {
566*3d8817e4Smiod     { 0, 0, 0, 0 },
567*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SLO16), ',', OP (SR), ')', 0 } },
568*3d8817e4Smiod     & ifmt_add3, { 0xa0c00000 }
569*3d8817e4Smiod   },
570*3d8817e4Smiod /* ldb $dr,@$sr */
571*3d8817e4Smiod   {
572*3d8817e4Smiod     { 0, 0, 0, 0 },
573*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', OP (SR), 0 } },
574*3d8817e4Smiod     & ifmt_add, { 0x2080 }
575*3d8817e4Smiod   },
576*3d8817e4Smiod /* ldb $dr,@($slo16,$sr) */
577*3d8817e4Smiod   {
578*3d8817e4Smiod     { 0, 0, 0, 0 },
579*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SLO16), ',', OP (SR), ')', 0 } },
580*3d8817e4Smiod     & ifmt_add3, { 0xa0800000 }
581*3d8817e4Smiod   },
582*3d8817e4Smiod /* ldh $dr,@$sr */
583*3d8817e4Smiod   {
584*3d8817e4Smiod     { 0, 0, 0, 0 },
585*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', OP (SR), 0 } },
586*3d8817e4Smiod     & ifmt_add, { 0x20a0 }
587*3d8817e4Smiod   },
588*3d8817e4Smiod /* ldh $dr,@($slo16,$sr) */
589*3d8817e4Smiod   {
590*3d8817e4Smiod     { 0, 0, 0, 0 },
591*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SLO16), ',', OP (SR), ')', 0 } },
592*3d8817e4Smiod     & ifmt_add3, { 0xa0a00000 }
593*3d8817e4Smiod   },
594*3d8817e4Smiod /* ldub $dr,@$sr */
595*3d8817e4Smiod   {
596*3d8817e4Smiod     { 0, 0, 0, 0 },
597*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', OP (SR), 0 } },
598*3d8817e4Smiod     & ifmt_add, { 0x2090 }
599*3d8817e4Smiod   },
600*3d8817e4Smiod /* ldub $dr,@($slo16,$sr) */
601*3d8817e4Smiod   {
602*3d8817e4Smiod     { 0, 0, 0, 0 },
603*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SLO16), ',', OP (SR), ')', 0 } },
604*3d8817e4Smiod     & ifmt_add3, { 0xa0900000 }
605*3d8817e4Smiod   },
606*3d8817e4Smiod /* lduh $dr,@$sr */
607*3d8817e4Smiod   {
608*3d8817e4Smiod     { 0, 0, 0, 0 },
609*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', OP (SR), 0 } },
610*3d8817e4Smiod     & ifmt_add, { 0x20b0 }
611*3d8817e4Smiod   },
612*3d8817e4Smiod /* lduh $dr,@($slo16,$sr) */
613*3d8817e4Smiod   {
614*3d8817e4Smiod     { 0, 0, 0, 0 },
615*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SLO16), ',', OP (SR), ')', 0 } },
616*3d8817e4Smiod     & ifmt_add3, { 0xa0b00000 }
617*3d8817e4Smiod   },
618*3d8817e4Smiod /* ld $dr,@$sr+ */
619*3d8817e4Smiod   {
620*3d8817e4Smiod     { 0, 0, 0, 0 },
621*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', OP (SR), '+', 0 } },
622*3d8817e4Smiod     & ifmt_add, { 0x20e0 }
623*3d8817e4Smiod   },
624*3d8817e4Smiod /* ld24 $dr,$uimm24 */
625*3d8817e4Smiod   {
626*3d8817e4Smiod     { 0, 0, 0, 0 },
627*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (UIMM24), 0 } },
628*3d8817e4Smiod     & ifmt_ld24, { 0xe0000000 }
629*3d8817e4Smiod   },
630*3d8817e4Smiod /* ldi8 $dr,$simm8 */
631*3d8817e4Smiod   {
632*3d8817e4Smiod     { 0, 0, 0, 0 },
633*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SIMM8), 0 } },
634*3d8817e4Smiod     & ifmt_addi, { 0x6000 }
635*3d8817e4Smiod   },
636*3d8817e4Smiod /* ldi16 $dr,$hash$slo16 */
637*3d8817e4Smiod   {
638*3d8817e4Smiod     { 0, 0, 0, 0 },
639*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (HASH), OP (SLO16), 0 } },
640*3d8817e4Smiod     & ifmt_ldi16, { 0x90f00000 }
641*3d8817e4Smiod   },
642*3d8817e4Smiod /* lock $dr,@$sr */
643*3d8817e4Smiod   {
644*3d8817e4Smiod     { 0, 0, 0, 0 },
645*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', OP (SR), 0 } },
646*3d8817e4Smiod     & ifmt_add, { 0x20d0 }
647*3d8817e4Smiod   },
648*3d8817e4Smiod /* machi $src1,$src2 */
649*3d8817e4Smiod   {
650*3d8817e4Smiod     { 0, 0, 0, 0 },
651*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
652*3d8817e4Smiod     & ifmt_cmp, { 0x3040 }
653*3d8817e4Smiod   },
654*3d8817e4Smiod /* machi $src1,$src2,$acc */
655*3d8817e4Smiod   {
656*3d8817e4Smiod     { 0, 0, 0, 0 },
657*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), ',', OP (ACC), 0 } },
658*3d8817e4Smiod     & ifmt_machi_a, { 0x3040 }
659*3d8817e4Smiod   },
660*3d8817e4Smiod /* maclo $src1,$src2 */
661*3d8817e4Smiod   {
662*3d8817e4Smiod     { 0, 0, 0, 0 },
663*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
664*3d8817e4Smiod     & ifmt_cmp, { 0x3050 }
665*3d8817e4Smiod   },
666*3d8817e4Smiod /* maclo $src1,$src2,$acc */
667*3d8817e4Smiod   {
668*3d8817e4Smiod     { 0, 0, 0, 0 },
669*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), ',', OP (ACC), 0 } },
670*3d8817e4Smiod     & ifmt_machi_a, { 0x3050 }
671*3d8817e4Smiod   },
672*3d8817e4Smiod /* macwhi $src1,$src2 */
673*3d8817e4Smiod   {
674*3d8817e4Smiod     { 0, 0, 0, 0 },
675*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
676*3d8817e4Smiod     & ifmt_cmp, { 0x3060 }
677*3d8817e4Smiod   },
678*3d8817e4Smiod /* macwhi $src1,$src2,$acc */
679*3d8817e4Smiod   {
680*3d8817e4Smiod     { 0, 0, 0, 0 },
681*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), ',', OP (ACC), 0 } },
682*3d8817e4Smiod     & ifmt_machi_a, { 0x3060 }
683*3d8817e4Smiod   },
684*3d8817e4Smiod /* macwlo $src1,$src2 */
685*3d8817e4Smiod   {
686*3d8817e4Smiod     { 0, 0, 0, 0 },
687*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
688*3d8817e4Smiod     & ifmt_cmp, { 0x3070 }
689*3d8817e4Smiod   },
690*3d8817e4Smiod /* macwlo $src1,$src2,$acc */
691*3d8817e4Smiod   {
692*3d8817e4Smiod     { 0, 0, 0, 0 },
693*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), ',', OP (ACC), 0 } },
694*3d8817e4Smiod     & ifmt_machi_a, { 0x3070 }
695*3d8817e4Smiod   },
696*3d8817e4Smiod /* mul $dr,$sr */
697*3d8817e4Smiod   {
698*3d8817e4Smiod     { 0, 0, 0, 0 },
699*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
700*3d8817e4Smiod     & ifmt_add, { 0x1060 }
701*3d8817e4Smiod   },
702*3d8817e4Smiod /* mulhi $src1,$src2 */
703*3d8817e4Smiod   {
704*3d8817e4Smiod     { 0, 0, 0, 0 },
705*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
706*3d8817e4Smiod     & ifmt_cmp, { 0x3000 }
707*3d8817e4Smiod   },
708*3d8817e4Smiod /* mulhi $src1,$src2,$acc */
709*3d8817e4Smiod   {
710*3d8817e4Smiod     { 0, 0, 0, 0 },
711*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), ',', OP (ACC), 0 } },
712*3d8817e4Smiod     & ifmt_machi_a, { 0x3000 }
713*3d8817e4Smiod   },
714*3d8817e4Smiod /* mullo $src1,$src2 */
715*3d8817e4Smiod   {
716*3d8817e4Smiod     { 0, 0, 0, 0 },
717*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
718*3d8817e4Smiod     & ifmt_cmp, { 0x3010 }
719*3d8817e4Smiod   },
720*3d8817e4Smiod /* mullo $src1,$src2,$acc */
721*3d8817e4Smiod   {
722*3d8817e4Smiod     { 0, 0, 0, 0 },
723*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), ',', OP (ACC), 0 } },
724*3d8817e4Smiod     & ifmt_machi_a, { 0x3010 }
725*3d8817e4Smiod   },
726*3d8817e4Smiod /* mulwhi $src1,$src2 */
727*3d8817e4Smiod   {
728*3d8817e4Smiod     { 0, 0, 0, 0 },
729*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
730*3d8817e4Smiod     & ifmt_cmp, { 0x3020 }
731*3d8817e4Smiod   },
732*3d8817e4Smiod /* mulwhi $src1,$src2,$acc */
733*3d8817e4Smiod   {
734*3d8817e4Smiod     { 0, 0, 0, 0 },
735*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), ',', OP (ACC), 0 } },
736*3d8817e4Smiod     & ifmt_machi_a, { 0x3020 }
737*3d8817e4Smiod   },
738*3d8817e4Smiod /* mulwlo $src1,$src2 */
739*3d8817e4Smiod   {
740*3d8817e4Smiod     { 0, 0, 0, 0 },
741*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
742*3d8817e4Smiod     & ifmt_cmp, { 0x3030 }
743*3d8817e4Smiod   },
744*3d8817e4Smiod /* mulwlo $src1,$src2,$acc */
745*3d8817e4Smiod   {
746*3d8817e4Smiod     { 0, 0, 0, 0 },
747*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), ',', OP (ACC), 0 } },
748*3d8817e4Smiod     & ifmt_machi_a, { 0x3030 }
749*3d8817e4Smiod   },
750*3d8817e4Smiod /* mv $dr,$sr */
751*3d8817e4Smiod   {
752*3d8817e4Smiod     { 0, 0, 0, 0 },
753*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
754*3d8817e4Smiod     & ifmt_add, { 0x1080 }
755*3d8817e4Smiod   },
756*3d8817e4Smiod /* mvfachi $dr */
757*3d8817e4Smiod   {
758*3d8817e4Smiod     { 0, 0, 0, 0 },
759*3d8817e4Smiod     { { MNEM, ' ', OP (DR), 0 } },
760*3d8817e4Smiod     & ifmt_mvfachi, { 0x50f0 }
761*3d8817e4Smiod   },
762*3d8817e4Smiod /* mvfachi $dr,$accs */
763*3d8817e4Smiod   {
764*3d8817e4Smiod     { 0, 0, 0, 0 },
765*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (ACCS), 0 } },
766*3d8817e4Smiod     & ifmt_mvfachi_a, { 0x50f0 }
767*3d8817e4Smiod   },
768*3d8817e4Smiod /* mvfaclo $dr */
769*3d8817e4Smiod   {
770*3d8817e4Smiod     { 0, 0, 0, 0 },
771*3d8817e4Smiod     { { MNEM, ' ', OP (DR), 0 } },
772*3d8817e4Smiod     & ifmt_mvfachi, { 0x50f1 }
773*3d8817e4Smiod   },
774*3d8817e4Smiod /* mvfaclo $dr,$accs */
775*3d8817e4Smiod   {
776*3d8817e4Smiod     { 0, 0, 0, 0 },
777*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (ACCS), 0 } },
778*3d8817e4Smiod     & ifmt_mvfachi_a, { 0x50f1 }
779*3d8817e4Smiod   },
780*3d8817e4Smiod /* mvfacmi $dr */
781*3d8817e4Smiod   {
782*3d8817e4Smiod     { 0, 0, 0, 0 },
783*3d8817e4Smiod     { { MNEM, ' ', OP (DR), 0 } },
784*3d8817e4Smiod     & ifmt_mvfachi, { 0x50f2 }
785*3d8817e4Smiod   },
786*3d8817e4Smiod /* mvfacmi $dr,$accs */
787*3d8817e4Smiod   {
788*3d8817e4Smiod     { 0, 0, 0, 0 },
789*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (ACCS), 0 } },
790*3d8817e4Smiod     & ifmt_mvfachi_a, { 0x50f2 }
791*3d8817e4Smiod   },
792*3d8817e4Smiod /* mvfc $dr,$scr */
793*3d8817e4Smiod   {
794*3d8817e4Smiod     { 0, 0, 0, 0 },
795*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SCR), 0 } },
796*3d8817e4Smiod     & ifmt_mvfc, { 0x1090 }
797*3d8817e4Smiod   },
798*3d8817e4Smiod /* mvtachi $src1 */
799*3d8817e4Smiod   {
800*3d8817e4Smiod     { 0, 0, 0, 0 },
801*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), 0 } },
802*3d8817e4Smiod     & ifmt_mvtachi, { 0x5070 }
803*3d8817e4Smiod   },
804*3d8817e4Smiod /* mvtachi $src1,$accs */
805*3d8817e4Smiod   {
806*3d8817e4Smiod     { 0, 0, 0, 0 },
807*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (ACCS), 0 } },
808*3d8817e4Smiod     & ifmt_mvtachi_a, { 0x5070 }
809*3d8817e4Smiod   },
810*3d8817e4Smiod /* mvtaclo $src1 */
811*3d8817e4Smiod   {
812*3d8817e4Smiod     { 0, 0, 0, 0 },
813*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), 0 } },
814*3d8817e4Smiod     & ifmt_mvtachi, { 0x5071 }
815*3d8817e4Smiod   },
816*3d8817e4Smiod /* mvtaclo $src1,$accs */
817*3d8817e4Smiod   {
818*3d8817e4Smiod     { 0, 0, 0, 0 },
819*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (ACCS), 0 } },
820*3d8817e4Smiod     & ifmt_mvtachi_a, { 0x5071 }
821*3d8817e4Smiod   },
822*3d8817e4Smiod /* mvtc $sr,$dcr */
823*3d8817e4Smiod   {
824*3d8817e4Smiod     { 0, 0, 0, 0 },
825*3d8817e4Smiod     { { MNEM, ' ', OP (SR), ',', OP (DCR), 0 } },
826*3d8817e4Smiod     & ifmt_mvtc, { 0x10a0 }
827*3d8817e4Smiod   },
828*3d8817e4Smiod /* neg $dr,$sr */
829*3d8817e4Smiod   {
830*3d8817e4Smiod     { 0, 0, 0, 0 },
831*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
832*3d8817e4Smiod     & ifmt_add, { 0x30 }
833*3d8817e4Smiod   },
834*3d8817e4Smiod /* nop */
835*3d8817e4Smiod   {
836*3d8817e4Smiod     { 0, 0, 0, 0 },
837*3d8817e4Smiod     { { MNEM, 0 } },
838*3d8817e4Smiod     & ifmt_nop, { 0x7000 }
839*3d8817e4Smiod   },
840*3d8817e4Smiod /* not $dr,$sr */
841*3d8817e4Smiod   {
842*3d8817e4Smiod     { 0, 0, 0, 0 },
843*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
844*3d8817e4Smiod     & ifmt_add, { 0xb0 }
845*3d8817e4Smiod   },
846*3d8817e4Smiod /* rac */
847*3d8817e4Smiod   {
848*3d8817e4Smiod     { 0, 0, 0, 0 },
849*3d8817e4Smiod     { { MNEM, 0 } },
850*3d8817e4Smiod     & ifmt_nop, { 0x5090 }
851*3d8817e4Smiod   },
852*3d8817e4Smiod /* rac $accd,$accs,$imm1 */
853*3d8817e4Smiod   {
854*3d8817e4Smiod     { 0, 0, 0, 0 },
855*3d8817e4Smiod     { { MNEM, ' ', OP (ACCD), ',', OP (ACCS), ',', OP (IMM1), 0 } },
856*3d8817e4Smiod     & ifmt_rac_dsi, { 0x5090 }
857*3d8817e4Smiod   },
858*3d8817e4Smiod /* rach */
859*3d8817e4Smiod   {
860*3d8817e4Smiod     { 0, 0, 0, 0 },
861*3d8817e4Smiod     { { MNEM, 0 } },
862*3d8817e4Smiod     & ifmt_nop, { 0x5080 }
863*3d8817e4Smiod   },
864*3d8817e4Smiod /* rach $accd,$accs,$imm1 */
865*3d8817e4Smiod   {
866*3d8817e4Smiod     { 0, 0, 0, 0 },
867*3d8817e4Smiod     { { MNEM, ' ', OP (ACCD), ',', OP (ACCS), ',', OP (IMM1), 0 } },
868*3d8817e4Smiod     & ifmt_rac_dsi, { 0x5080 }
869*3d8817e4Smiod   },
870*3d8817e4Smiod /* rte */
871*3d8817e4Smiod   {
872*3d8817e4Smiod     { 0, 0, 0, 0 },
873*3d8817e4Smiod     { { MNEM, 0 } },
874*3d8817e4Smiod     & ifmt_nop, { 0x10d6 }
875*3d8817e4Smiod   },
876*3d8817e4Smiod /* seth $dr,$hash$hi16 */
877*3d8817e4Smiod   {
878*3d8817e4Smiod     { 0, 0, 0, 0 },
879*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (HASH), OP (HI16), 0 } },
880*3d8817e4Smiod     & ifmt_seth, { 0xd0c00000 }
881*3d8817e4Smiod   },
882*3d8817e4Smiod /* sll $dr,$sr */
883*3d8817e4Smiod   {
884*3d8817e4Smiod     { 0, 0, 0, 0 },
885*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
886*3d8817e4Smiod     & ifmt_add, { 0x1040 }
887*3d8817e4Smiod   },
888*3d8817e4Smiod /* sll3 $dr,$sr,$simm16 */
889*3d8817e4Smiod   {
890*3d8817e4Smiod     { 0, 0, 0, 0 },
891*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), ',', OP (SIMM16), 0 } },
892*3d8817e4Smiod     & ifmt_addv3, { 0x90c00000 }
893*3d8817e4Smiod   },
894*3d8817e4Smiod /* slli $dr,$uimm5 */
895*3d8817e4Smiod   {
896*3d8817e4Smiod     { 0, 0, 0, 0 },
897*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (UIMM5), 0 } },
898*3d8817e4Smiod     & ifmt_slli, { 0x5040 }
899*3d8817e4Smiod   },
900*3d8817e4Smiod /* sra $dr,$sr */
901*3d8817e4Smiod   {
902*3d8817e4Smiod     { 0, 0, 0, 0 },
903*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
904*3d8817e4Smiod     & ifmt_add, { 0x1020 }
905*3d8817e4Smiod   },
906*3d8817e4Smiod /* sra3 $dr,$sr,$simm16 */
907*3d8817e4Smiod   {
908*3d8817e4Smiod     { 0, 0, 0, 0 },
909*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), ',', OP (SIMM16), 0 } },
910*3d8817e4Smiod     & ifmt_addv3, { 0x90a00000 }
911*3d8817e4Smiod   },
912*3d8817e4Smiod /* srai $dr,$uimm5 */
913*3d8817e4Smiod   {
914*3d8817e4Smiod     { 0, 0, 0, 0 },
915*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (UIMM5), 0 } },
916*3d8817e4Smiod     & ifmt_slli, { 0x5020 }
917*3d8817e4Smiod   },
918*3d8817e4Smiod /* srl $dr,$sr */
919*3d8817e4Smiod   {
920*3d8817e4Smiod     { 0, 0, 0, 0 },
921*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
922*3d8817e4Smiod     & ifmt_add, { 0x1000 }
923*3d8817e4Smiod   },
924*3d8817e4Smiod /* srl3 $dr,$sr,$simm16 */
925*3d8817e4Smiod   {
926*3d8817e4Smiod     { 0, 0, 0, 0 },
927*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), ',', OP (SIMM16), 0 } },
928*3d8817e4Smiod     & ifmt_addv3, { 0x90800000 }
929*3d8817e4Smiod   },
930*3d8817e4Smiod /* srli $dr,$uimm5 */
931*3d8817e4Smiod   {
932*3d8817e4Smiod     { 0, 0, 0, 0 },
933*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (UIMM5), 0 } },
934*3d8817e4Smiod     & ifmt_slli, { 0x5000 }
935*3d8817e4Smiod   },
936*3d8817e4Smiod /* st $src1,@$src2 */
937*3d8817e4Smiod   {
938*3d8817e4Smiod     { 0, 0, 0, 0 },
939*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', OP (SRC2), 0 } },
940*3d8817e4Smiod     & ifmt_cmp, { 0x2040 }
941*3d8817e4Smiod   },
942*3d8817e4Smiod /* st $src1,@($slo16,$src2) */
943*3d8817e4Smiod   {
944*3d8817e4Smiod     { 0, 0, 0, 0 },
945*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', '(', OP (SLO16), ',', OP (SRC2), ')', 0 } },
946*3d8817e4Smiod     & ifmt_st_d, { 0xa0400000 }
947*3d8817e4Smiod   },
948*3d8817e4Smiod /* stb $src1,@$src2 */
949*3d8817e4Smiod   {
950*3d8817e4Smiod     { 0, 0, 0, 0 },
951*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', OP (SRC2), 0 } },
952*3d8817e4Smiod     & ifmt_cmp, { 0x2000 }
953*3d8817e4Smiod   },
954*3d8817e4Smiod /* stb $src1,@($slo16,$src2) */
955*3d8817e4Smiod   {
956*3d8817e4Smiod     { 0, 0, 0, 0 },
957*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', '(', OP (SLO16), ',', OP (SRC2), ')', 0 } },
958*3d8817e4Smiod     & ifmt_st_d, { 0xa0000000 }
959*3d8817e4Smiod   },
960*3d8817e4Smiod /* sth $src1,@$src2 */
961*3d8817e4Smiod   {
962*3d8817e4Smiod     { 0, 0, 0, 0 },
963*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', OP (SRC2), 0 } },
964*3d8817e4Smiod     & ifmt_cmp, { 0x2020 }
965*3d8817e4Smiod   },
966*3d8817e4Smiod /* sth $src1,@($slo16,$src2) */
967*3d8817e4Smiod   {
968*3d8817e4Smiod     { 0, 0, 0, 0 },
969*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', '(', OP (SLO16), ',', OP (SRC2), ')', 0 } },
970*3d8817e4Smiod     & ifmt_st_d, { 0xa0200000 }
971*3d8817e4Smiod   },
972*3d8817e4Smiod /* st $src1,@+$src2 */
973*3d8817e4Smiod   {
974*3d8817e4Smiod     { 0, 0, 0, 0 },
975*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', '+', OP (SRC2), 0 } },
976*3d8817e4Smiod     & ifmt_cmp, { 0x2060 }
977*3d8817e4Smiod   },
978*3d8817e4Smiod /* sth $src1,@$src2+ */
979*3d8817e4Smiod   {
980*3d8817e4Smiod     { 0, 0, 0, 0 },
981*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', OP (SRC2), '+', 0 } },
982*3d8817e4Smiod     & ifmt_cmp, { 0x2030 }
983*3d8817e4Smiod   },
984*3d8817e4Smiod /* stb $src1,@$src2+ */
985*3d8817e4Smiod   {
986*3d8817e4Smiod     { 0, 0, 0, 0 },
987*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', OP (SRC2), '+', 0 } },
988*3d8817e4Smiod     & ifmt_cmp, { 0x2010 }
989*3d8817e4Smiod   },
990*3d8817e4Smiod /* st $src1,@-$src2 */
991*3d8817e4Smiod   {
992*3d8817e4Smiod     { 0, 0, 0, 0 },
993*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', '-', OP (SRC2), 0 } },
994*3d8817e4Smiod     & ifmt_cmp, { 0x2070 }
995*3d8817e4Smiod   },
996*3d8817e4Smiod /* sub $dr,$sr */
997*3d8817e4Smiod   {
998*3d8817e4Smiod     { 0, 0, 0, 0 },
999*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
1000*3d8817e4Smiod     & ifmt_add, { 0x20 }
1001*3d8817e4Smiod   },
1002*3d8817e4Smiod /* subv $dr,$sr */
1003*3d8817e4Smiod   {
1004*3d8817e4Smiod     { 0, 0, 0, 0 },
1005*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
1006*3d8817e4Smiod     & ifmt_add, { 0x0 }
1007*3d8817e4Smiod   },
1008*3d8817e4Smiod /* subx $dr,$sr */
1009*3d8817e4Smiod   {
1010*3d8817e4Smiod     { 0, 0, 0, 0 },
1011*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
1012*3d8817e4Smiod     & ifmt_add, { 0x10 }
1013*3d8817e4Smiod   },
1014*3d8817e4Smiod /* trap $uimm4 */
1015*3d8817e4Smiod   {
1016*3d8817e4Smiod     { 0, 0, 0, 0 },
1017*3d8817e4Smiod     { { MNEM, ' ', OP (UIMM4), 0 } },
1018*3d8817e4Smiod     & ifmt_trap, { 0x10f0 }
1019*3d8817e4Smiod   },
1020*3d8817e4Smiod /* unlock $src1,@$src2 */
1021*3d8817e4Smiod   {
1022*3d8817e4Smiod     { 0, 0, 0, 0 },
1023*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', OP (SRC2), 0 } },
1024*3d8817e4Smiod     & ifmt_cmp, { 0x2050 }
1025*3d8817e4Smiod   },
1026*3d8817e4Smiod /* satb $dr,$sr */
1027*3d8817e4Smiod   {
1028*3d8817e4Smiod     { 0, 0, 0, 0 },
1029*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
1030*3d8817e4Smiod     & ifmt_satb, { 0x80600300 }
1031*3d8817e4Smiod   },
1032*3d8817e4Smiod /* sath $dr,$sr */
1033*3d8817e4Smiod   {
1034*3d8817e4Smiod     { 0, 0, 0, 0 },
1035*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
1036*3d8817e4Smiod     & ifmt_satb, { 0x80600200 }
1037*3d8817e4Smiod   },
1038*3d8817e4Smiod /* sat $dr,$sr */
1039*3d8817e4Smiod   {
1040*3d8817e4Smiod     { 0, 0, 0, 0 },
1041*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SR), 0 } },
1042*3d8817e4Smiod     & ifmt_satb, { 0x80600000 }
1043*3d8817e4Smiod   },
1044*3d8817e4Smiod /* pcmpbz $src2 */
1045*3d8817e4Smiod   {
1046*3d8817e4Smiod     { 0, 0, 0, 0 },
1047*3d8817e4Smiod     { { MNEM, ' ', OP (SRC2), 0 } },
1048*3d8817e4Smiod     & ifmt_cmpz, { 0x370 }
1049*3d8817e4Smiod   },
1050*3d8817e4Smiod /* sadd */
1051*3d8817e4Smiod   {
1052*3d8817e4Smiod     { 0, 0, 0, 0 },
1053*3d8817e4Smiod     { { MNEM, 0 } },
1054*3d8817e4Smiod     & ifmt_nop, { 0x50e4 }
1055*3d8817e4Smiod   },
1056*3d8817e4Smiod /* macwu1 $src1,$src2 */
1057*3d8817e4Smiod   {
1058*3d8817e4Smiod     { 0, 0, 0, 0 },
1059*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
1060*3d8817e4Smiod     & ifmt_cmp, { 0x50b0 }
1061*3d8817e4Smiod   },
1062*3d8817e4Smiod /* msblo $src1,$src2 */
1063*3d8817e4Smiod   {
1064*3d8817e4Smiod     { 0, 0, 0, 0 },
1065*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
1066*3d8817e4Smiod     & ifmt_cmp, { 0x50d0 }
1067*3d8817e4Smiod   },
1068*3d8817e4Smiod /* mulwu1 $src1,$src2 */
1069*3d8817e4Smiod   {
1070*3d8817e4Smiod     { 0, 0, 0, 0 },
1071*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
1072*3d8817e4Smiod     & ifmt_cmp, { 0x50a0 }
1073*3d8817e4Smiod   },
1074*3d8817e4Smiod /* maclh1 $src1,$src2 */
1075*3d8817e4Smiod   {
1076*3d8817e4Smiod     { 0, 0, 0, 0 },
1077*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', OP (SRC2), 0 } },
1078*3d8817e4Smiod     & ifmt_cmp, { 0x50c0 }
1079*3d8817e4Smiod   },
1080*3d8817e4Smiod /* sc */
1081*3d8817e4Smiod   {
1082*3d8817e4Smiod     { 0, 0, 0, 0 },
1083*3d8817e4Smiod     { { MNEM, 0 } },
1084*3d8817e4Smiod     & ifmt_nop, { 0x7401 }
1085*3d8817e4Smiod   },
1086*3d8817e4Smiod /* snc */
1087*3d8817e4Smiod   {
1088*3d8817e4Smiod     { 0, 0, 0, 0 },
1089*3d8817e4Smiod     { { MNEM, 0 } },
1090*3d8817e4Smiod     & ifmt_nop, { 0x7501 }
1091*3d8817e4Smiod   },
1092*3d8817e4Smiod /* clrpsw $uimm8 */
1093*3d8817e4Smiod   {
1094*3d8817e4Smiod     { 0, 0, 0, 0 },
1095*3d8817e4Smiod     { { MNEM, ' ', OP (UIMM8), 0 } },
1096*3d8817e4Smiod     & ifmt_clrpsw, { 0x7200 }
1097*3d8817e4Smiod   },
1098*3d8817e4Smiod /* setpsw $uimm8 */
1099*3d8817e4Smiod   {
1100*3d8817e4Smiod     { 0, 0, 0, 0 },
1101*3d8817e4Smiod     { { MNEM, ' ', OP (UIMM8), 0 } },
1102*3d8817e4Smiod     & ifmt_clrpsw, { 0x7100 }
1103*3d8817e4Smiod   },
1104*3d8817e4Smiod /* bset $uimm3,@($slo16,$sr) */
1105*3d8817e4Smiod   {
1106*3d8817e4Smiod     { 0, 0, 0, 0 },
1107*3d8817e4Smiod     { { MNEM, ' ', OP (UIMM3), ',', '@', '(', OP (SLO16), ',', OP (SR), ')', 0 } },
1108*3d8817e4Smiod     & ifmt_bset, { 0xa0600000 }
1109*3d8817e4Smiod   },
1110*3d8817e4Smiod /* bclr $uimm3,@($slo16,$sr) */
1111*3d8817e4Smiod   {
1112*3d8817e4Smiod     { 0, 0, 0, 0 },
1113*3d8817e4Smiod     { { MNEM, ' ', OP (UIMM3), ',', '@', '(', OP (SLO16), ',', OP (SR), ')', 0 } },
1114*3d8817e4Smiod     & ifmt_bset, { 0xa0700000 }
1115*3d8817e4Smiod   },
1116*3d8817e4Smiod /* btst $uimm3,$sr */
1117*3d8817e4Smiod   {
1118*3d8817e4Smiod     { 0, 0, 0, 0 },
1119*3d8817e4Smiod     { { MNEM, ' ', OP (UIMM3), ',', OP (SR), 0 } },
1120*3d8817e4Smiod     & ifmt_btst, { 0xf0 }
1121*3d8817e4Smiod   },
1122*3d8817e4Smiod };
1123*3d8817e4Smiod 
1124*3d8817e4Smiod #undef A
1125*3d8817e4Smiod #undef OPERAND
1126*3d8817e4Smiod #undef MNEM
1127*3d8817e4Smiod #undef OP
1128*3d8817e4Smiod 
1129*3d8817e4Smiod /* Formats for ALIAS macro-insns.  */
1130*3d8817e4Smiod 
1131*3d8817e4Smiod #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
1132*3d8817e4Smiod #define F(f) & m32r_cgen_ifld_table[M32R_##f]
1133*3d8817e4Smiod #else
1134*3d8817e4Smiod #define F(f) & m32r_cgen_ifld_table[M32R_/**/f]
1135*3d8817e4Smiod #endif
1136*3d8817e4Smiod static const CGEN_IFMT ifmt_bc8r ATTRIBUTE_UNUSED = {
1137*3d8817e4Smiod   16, 16, 0xff00, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP8) }, { 0 } }
1138*3d8817e4Smiod };
1139*3d8817e4Smiod 
1140*3d8817e4Smiod static const CGEN_IFMT ifmt_bc24r ATTRIBUTE_UNUSED = {
1141*3d8817e4Smiod   32, 32, 0xff000000, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP24) }, { 0 } }
1142*3d8817e4Smiod };
1143*3d8817e4Smiod 
1144*3d8817e4Smiod static const CGEN_IFMT ifmt_bl8r ATTRIBUTE_UNUSED = {
1145*3d8817e4Smiod   16, 16, 0xff00, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP8) }, { 0 } }
1146*3d8817e4Smiod };
1147*3d8817e4Smiod 
1148*3d8817e4Smiod static const CGEN_IFMT ifmt_bl24r ATTRIBUTE_UNUSED = {
1149*3d8817e4Smiod   32, 32, 0xff000000, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP24) }, { 0 } }
1150*3d8817e4Smiod };
1151*3d8817e4Smiod 
1152*3d8817e4Smiod static const CGEN_IFMT ifmt_bcl8r ATTRIBUTE_UNUSED = {
1153*3d8817e4Smiod   16, 16, 0xff00, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP8) }, { 0 } }
1154*3d8817e4Smiod };
1155*3d8817e4Smiod 
1156*3d8817e4Smiod static const CGEN_IFMT ifmt_bcl24r ATTRIBUTE_UNUSED = {
1157*3d8817e4Smiod   32, 32, 0xff000000, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP24) }, { 0 } }
1158*3d8817e4Smiod };
1159*3d8817e4Smiod 
1160*3d8817e4Smiod static const CGEN_IFMT ifmt_bnc8r ATTRIBUTE_UNUSED = {
1161*3d8817e4Smiod   16, 16, 0xff00, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP8) }, { 0 } }
1162*3d8817e4Smiod };
1163*3d8817e4Smiod 
1164*3d8817e4Smiod static const CGEN_IFMT ifmt_bnc24r ATTRIBUTE_UNUSED = {
1165*3d8817e4Smiod   32, 32, 0xff000000, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP24) }, { 0 } }
1166*3d8817e4Smiod };
1167*3d8817e4Smiod 
1168*3d8817e4Smiod static const CGEN_IFMT ifmt_bra8r ATTRIBUTE_UNUSED = {
1169*3d8817e4Smiod   16, 16, 0xff00, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP8) }, { 0 } }
1170*3d8817e4Smiod };
1171*3d8817e4Smiod 
1172*3d8817e4Smiod static const CGEN_IFMT ifmt_bra24r ATTRIBUTE_UNUSED = {
1173*3d8817e4Smiod   32, 32, 0xff000000, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP24) }, { 0 } }
1174*3d8817e4Smiod };
1175*3d8817e4Smiod 
1176*3d8817e4Smiod static const CGEN_IFMT ifmt_bncl8r ATTRIBUTE_UNUSED = {
1177*3d8817e4Smiod   16, 16, 0xff00, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP8) }, { 0 } }
1178*3d8817e4Smiod };
1179*3d8817e4Smiod 
1180*3d8817e4Smiod static const CGEN_IFMT ifmt_bncl24r ATTRIBUTE_UNUSED = {
1181*3d8817e4Smiod   32, 32, 0xff000000, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP24) }, { 0 } }
1182*3d8817e4Smiod };
1183*3d8817e4Smiod 
1184*3d8817e4Smiod static const CGEN_IFMT ifmt_ld_2 ATTRIBUTE_UNUSED = {
1185*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { 0 } }
1186*3d8817e4Smiod };
1187*3d8817e4Smiod 
1188*3d8817e4Smiod static const CGEN_IFMT ifmt_ld_d2 ATTRIBUTE_UNUSED = {
1189*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
1190*3d8817e4Smiod };
1191*3d8817e4Smiod 
1192*3d8817e4Smiod static const CGEN_IFMT ifmt_ldb_2 ATTRIBUTE_UNUSED = {
1193*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { 0 } }
1194*3d8817e4Smiod };
1195*3d8817e4Smiod 
1196*3d8817e4Smiod static const CGEN_IFMT ifmt_ldb_d2 ATTRIBUTE_UNUSED = {
1197*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
1198*3d8817e4Smiod };
1199*3d8817e4Smiod 
1200*3d8817e4Smiod static const CGEN_IFMT ifmt_ldh_2 ATTRIBUTE_UNUSED = {
1201*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { 0 } }
1202*3d8817e4Smiod };
1203*3d8817e4Smiod 
1204*3d8817e4Smiod static const CGEN_IFMT ifmt_ldh_d2 ATTRIBUTE_UNUSED = {
1205*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
1206*3d8817e4Smiod };
1207*3d8817e4Smiod 
1208*3d8817e4Smiod static const CGEN_IFMT ifmt_ldub_2 ATTRIBUTE_UNUSED = {
1209*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { 0 } }
1210*3d8817e4Smiod };
1211*3d8817e4Smiod 
1212*3d8817e4Smiod static const CGEN_IFMT ifmt_ldub_d2 ATTRIBUTE_UNUSED = {
1213*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
1214*3d8817e4Smiod };
1215*3d8817e4Smiod 
1216*3d8817e4Smiod static const CGEN_IFMT ifmt_lduh_2 ATTRIBUTE_UNUSED = {
1217*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { 0 } }
1218*3d8817e4Smiod };
1219*3d8817e4Smiod 
1220*3d8817e4Smiod static const CGEN_IFMT ifmt_lduh_d2 ATTRIBUTE_UNUSED = {
1221*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
1222*3d8817e4Smiod };
1223*3d8817e4Smiod 
1224*3d8817e4Smiod static const CGEN_IFMT ifmt_pop ATTRIBUTE_UNUSED = {
1225*3d8817e4Smiod   16, 16, 0xf0ff, { { F (F_OP1) }, { F (F_R1) }, { F (F_OP2) }, { F (F_R2) }, { 0 } }
1226*3d8817e4Smiod };
1227*3d8817e4Smiod 
1228*3d8817e4Smiod static const CGEN_IFMT ifmt_ldi8a ATTRIBUTE_UNUSED = {
1229*3d8817e4Smiod   16, 16, 0xf000, { { F (F_OP1) }, { F (F_R1) }, { F (F_SIMM8) }, { 0 } }
1230*3d8817e4Smiod };
1231*3d8817e4Smiod 
1232*3d8817e4Smiod static const CGEN_IFMT ifmt_ldi16a ATTRIBUTE_UNUSED = {
1233*3d8817e4Smiod   32, 32, 0xf0ff0000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R2) }, { F (F_R1) }, { F (F_SIMM16) }, { 0 } }
1234*3d8817e4Smiod };
1235*3d8817e4Smiod 
1236*3d8817e4Smiod static const CGEN_IFMT ifmt_rac_d ATTRIBUTE_UNUSED = {
1237*3d8817e4Smiod   16, 16, 0xf3ff, { { F (F_OP1) }, { F (F_ACCD) }, { F (F_BITS67) }, { F (F_OP2) }, { F (F_ACCS) }, { F (F_BIT14) }, { F (F_IMM1) }, { 0 } }
1238*3d8817e4Smiod };
1239*3d8817e4Smiod 
1240*3d8817e4Smiod static const CGEN_IFMT ifmt_rac_ds ATTRIBUTE_UNUSED = {
1241*3d8817e4Smiod   16, 16, 0xf3f3, { { F (F_OP1) }, { F (F_ACCD) }, { F (F_BITS67) }, { F (F_OP2) }, { F (F_ACCS) }, { F (F_BIT14) }, { F (F_IMM1) }, { 0 } }
1242*3d8817e4Smiod };
1243*3d8817e4Smiod 
1244*3d8817e4Smiod static const CGEN_IFMT ifmt_rach_d ATTRIBUTE_UNUSED = {
1245*3d8817e4Smiod   16, 16, 0xf3ff, { { F (F_OP1) }, { F (F_ACCD) }, { F (F_BITS67) }, { F (F_OP2) }, { F (F_ACCS) }, { F (F_BIT14) }, { F (F_IMM1) }, { 0 } }
1246*3d8817e4Smiod };
1247*3d8817e4Smiod 
1248*3d8817e4Smiod static const CGEN_IFMT ifmt_rach_ds ATTRIBUTE_UNUSED = {
1249*3d8817e4Smiod   16, 16, 0xf3f3, { { F (F_OP1) }, { F (F_ACCD) }, { F (F_BITS67) }, { F (F_OP2) }, { F (F_ACCS) }, { F (F_BIT14) }, { F (F_IMM1) }, { 0 } }
1250*3d8817e4Smiod };
1251*3d8817e4Smiod 
1252*3d8817e4Smiod static const CGEN_IFMT ifmt_st_2 ATTRIBUTE_UNUSED = {
1253*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { 0 } }
1254*3d8817e4Smiod };
1255*3d8817e4Smiod 
1256*3d8817e4Smiod static const CGEN_IFMT ifmt_st_d2 ATTRIBUTE_UNUSED = {
1257*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
1258*3d8817e4Smiod };
1259*3d8817e4Smiod 
1260*3d8817e4Smiod static const CGEN_IFMT ifmt_stb_2 ATTRIBUTE_UNUSED = {
1261*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { 0 } }
1262*3d8817e4Smiod };
1263*3d8817e4Smiod 
1264*3d8817e4Smiod static const CGEN_IFMT ifmt_stb_d2 ATTRIBUTE_UNUSED = {
1265*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
1266*3d8817e4Smiod };
1267*3d8817e4Smiod 
1268*3d8817e4Smiod static const CGEN_IFMT ifmt_sth_2 ATTRIBUTE_UNUSED = {
1269*3d8817e4Smiod   16, 16, 0xf0f0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { 0 } }
1270*3d8817e4Smiod };
1271*3d8817e4Smiod 
1272*3d8817e4Smiod static const CGEN_IFMT ifmt_sth_d2 ATTRIBUTE_UNUSED = {
1273*3d8817e4Smiod   32, 32, 0xf0f00000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } }
1274*3d8817e4Smiod };
1275*3d8817e4Smiod 
1276*3d8817e4Smiod static const CGEN_IFMT ifmt_push ATTRIBUTE_UNUSED = {
1277*3d8817e4Smiod   16, 16, 0xf0ff, { { F (F_OP1) }, { F (F_OP2) }, { F (F_R1) }, { F (F_R2) }, { 0 } }
1278*3d8817e4Smiod };
1279*3d8817e4Smiod 
1280*3d8817e4Smiod #undef F
1281*3d8817e4Smiod 
1282*3d8817e4Smiod /* Each non-simple macro entry points to an array of expansion possibilities.  */
1283*3d8817e4Smiod 
1284*3d8817e4Smiod #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
1285*3d8817e4Smiod #define A(a) (1 << CGEN_INSN_##a)
1286*3d8817e4Smiod #else
1287*3d8817e4Smiod #define A(a) (1 << CGEN_INSN_/**/a)
1288*3d8817e4Smiod #endif
1289*3d8817e4Smiod #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
1290*3d8817e4Smiod #define OPERAND(op) M32R_OPERAND_##op
1291*3d8817e4Smiod #else
1292*3d8817e4Smiod #define OPERAND(op) M32R_OPERAND_/**/op
1293*3d8817e4Smiod #endif
1294*3d8817e4Smiod #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
1295*3d8817e4Smiod #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
1296*3d8817e4Smiod 
1297*3d8817e4Smiod /* The macro instruction table.  */
1298*3d8817e4Smiod 
1299*3d8817e4Smiod static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
1300*3d8817e4Smiod {
1301*3d8817e4Smiod /* bc $disp8 */
1302*3d8817e4Smiod   {
1303*3d8817e4Smiod     -1, "bc8r", "bc", 16,
1304*3d8817e4Smiod     { 0|A(RELAXABLE)|A(COND_CTI)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1305*3d8817e4Smiod   },
1306*3d8817e4Smiod /* bc $disp24 */
1307*3d8817e4Smiod   {
1308*3d8817e4Smiod     -1, "bc24r", "bc", 32,
1309*3d8817e4Smiod     { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1310*3d8817e4Smiod   },
1311*3d8817e4Smiod /* bl $disp8 */
1312*3d8817e4Smiod   {
1313*3d8817e4Smiod     -1, "bl8r", "bl", 16,
1314*3d8817e4Smiod     { 0|A(RELAXABLE)|A(FILL_SLOT)|A(UNCOND_CTI)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1315*3d8817e4Smiod   },
1316*3d8817e4Smiod /* bl $disp24 */
1317*3d8817e4Smiod   {
1318*3d8817e4Smiod     -1, "bl24r", "bl", 32,
1319*3d8817e4Smiod     { 0|A(RELAXED)|A(UNCOND_CTI)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1320*3d8817e4Smiod   },
1321*3d8817e4Smiod /* bcl $disp8 */
1322*3d8817e4Smiod   {
1323*3d8817e4Smiod     -1, "bcl8r", "bcl", 16,
1324*3d8817e4Smiod     { 0|A(RELAXABLE)|A(FILL_SLOT)|A(COND_CTI)|A(ALIAS), { { { (1<<MACH_M32RX)|(1<<MACH_M32R2), 0 } }, { { PIPE_O, 0 } } } }
1325*3d8817e4Smiod   },
1326*3d8817e4Smiod /* bcl $disp24 */
1327*3d8817e4Smiod   {
1328*3d8817e4Smiod     -1, "bcl24r", "bcl", 32,
1329*3d8817e4Smiod     { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { { { (1<<MACH_M32RX)|(1<<MACH_M32R2), 0 } }, { { PIPE_NONE, 0 } } } }
1330*3d8817e4Smiod   },
1331*3d8817e4Smiod /* bnc $disp8 */
1332*3d8817e4Smiod   {
1333*3d8817e4Smiod     -1, "bnc8r", "bnc", 16,
1334*3d8817e4Smiod     { 0|A(RELAXABLE)|A(COND_CTI)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1335*3d8817e4Smiod   },
1336*3d8817e4Smiod /* bnc $disp24 */
1337*3d8817e4Smiod   {
1338*3d8817e4Smiod     -1, "bnc24r", "bnc", 32,
1339*3d8817e4Smiod     { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1340*3d8817e4Smiod   },
1341*3d8817e4Smiod /* bra $disp8 */
1342*3d8817e4Smiod   {
1343*3d8817e4Smiod     -1, "bra8r", "bra", 16,
1344*3d8817e4Smiod     { 0|A(RELAXABLE)|A(FILL_SLOT)|A(UNCOND_CTI)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1345*3d8817e4Smiod   },
1346*3d8817e4Smiod /* bra $disp24 */
1347*3d8817e4Smiod   {
1348*3d8817e4Smiod     -1, "bra24r", "bra", 32,
1349*3d8817e4Smiod     { 0|A(RELAXED)|A(UNCOND_CTI)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1350*3d8817e4Smiod   },
1351*3d8817e4Smiod /* bncl $disp8 */
1352*3d8817e4Smiod   {
1353*3d8817e4Smiod     -1, "bncl8r", "bncl", 16,
1354*3d8817e4Smiod     { 0|A(RELAXABLE)|A(FILL_SLOT)|A(COND_CTI)|A(ALIAS), { { { (1<<MACH_M32RX)|(1<<MACH_M32R2), 0 } }, { { PIPE_O, 0 } } } }
1355*3d8817e4Smiod   },
1356*3d8817e4Smiod /* bncl $disp24 */
1357*3d8817e4Smiod   {
1358*3d8817e4Smiod     -1, "bncl24r", "bncl", 32,
1359*3d8817e4Smiod     { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { { { (1<<MACH_M32RX)|(1<<MACH_M32R2), 0 } }, { { PIPE_NONE, 0 } } } }
1360*3d8817e4Smiod   },
1361*3d8817e4Smiod /* ld $dr,@($sr) */
1362*3d8817e4Smiod   {
1363*3d8817e4Smiod     -1, "ld-2", "ld", 16,
1364*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1365*3d8817e4Smiod   },
1366*3d8817e4Smiod /* ld $dr,@($sr,$slo16) */
1367*3d8817e4Smiod   {
1368*3d8817e4Smiod     -1, "ld-d2", "ld", 32,
1369*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1370*3d8817e4Smiod   },
1371*3d8817e4Smiod /* ldb $dr,@($sr) */
1372*3d8817e4Smiod   {
1373*3d8817e4Smiod     -1, "ldb-2", "ldb", 16,
1374*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1375*3d8817e4Smiod   },
1376*3d8817e4Smiod /* ldb $dr,@($sr,$slo16) */
1377*3d8817e4Smiod   {
1378*3d8817e4Smiod     -1, "ldb-d2", "ldb", 32,
1379*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1380*3d8817e4Smiod   },
1381*3d8817e4Smiod /* ldh $dr,@($sr) */
1382*3d8817e4Smiod   {
1383*3d8817e4Smiod     -1, "ldh-2", "ldh", 16,
1384*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1385*3d8817e4Smiod   },
1386*3d8817e4Smiod /* ldh $dr,@($sr,$slo16) */
1387*3d8817e4Smiod   {
1388*3d8817e4Smiod     -1, "ldh-d2", "ldh", 32,
1389*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1390*3d8817e4Smiod   },
1391*3d8817e4Smiod /* ldub $dr,@($sr) */
1392*3d8817e4Smiod   {
1393*3d8817e4Smiod     -1, "ldub-2", "ldub", 16,
1394*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1395*3d8817e4Smiod   },
1396*3d8817e4Smiod /* ldub $dr,@($sr,$slo16) */
1397*3d8817e4Smiod   {
1398*3d8817e4Smiod     -1, "ldub-d2", "ldub", 32,
1399*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1400*3d8817e4Smiod   },
1401*3d8817e4Smiod /* lduh $dr,@($sr) */
1402*3d8817e4Smiod   {
1403*3d8817e4Smiod     -1, "lduh-2", "lduh", 16,
1404*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1405*3d8817e4Smiod   },
1406*3d8817e4Smiod /* lduh $dr,@($sr,$slo16) */
1407*3d8817e4Smiod   {
1408*3d8817e4Smiod     -1, "lduh-d2", "lduh", 32,
1409*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1410*3d8817e4Smiod   },
1411*3d8817e4Smiod /* pop $dr */
1412*3d8817e4Smiod   {
1413*3d8817e4Smiod     -1, "pop", "pop", 16,
1414*3d8817e4Smiod     { 0|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1415*3d8817e4Smiod   },
1416*3d8817e4Smiod /* ldi $dr,$simm8 */
1417*3d8817e4Smiod   {
1418*3d8817e4Smiod     -1, "ldi8a", "ldi", 16,
1419*3d8817e4Smiod     { 0|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
1420*3d8817e4Smiod   },
1421*3d8817e4Smiod /* ldi $dr,$hash$slo16 */
1422*3d8817e4Smiod   {
1423*3d8817e4Smiod     -1, "ldi16a", "ldi", 32,
1424*3d8817e4Smiod     { 0|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1425*3d8817e4Smiod   },
1426*3d8817e4Smiod /* rac $accd */
1427*3d8817e4Smiod   {
1428*3d8817e4Smiod     -1, "rac-d", "rac", 16,
1429*3d8817e4Smiod     { 0|A(ALIAS), { { { (1<<MACH_M32RX)|(1<<MACH_M32R2), 0 } }, { { PIPE_S, 0 } } } }
1430*3d8817e4Smiod   },
1431*3d8817e4Smiod /* rac $accd,$accs */
1432*3d8817e4Smiod   {
1433*3d8817e4Smiod     -1, "rac-ds", "rac", 16,
1434*3d8817e4Smiod     { 0|A(ALIAS), { { { (1<<MACH_M32RX)|(1<<MACH_M32R2), 0 } }, { { PIPE_S, 0 } } } }
1435*3d8817e4Smiod   },
1436*3d8817e4Smiod /* rach $accd */
1437*3d8817e4Smiod   {
1438*3d8817e4Smiod     -1, "rach-d", "rach", 16,
1439*3d8817e4Smiod     { 0|A(ALIAS), { { { (1<<MACH_M32RX)|(1<<MACH_M32R2), 0 } }, { { PIPE_S, 0 } } } }
1440*3d8817e4Smiod   },
1441*3d8817e4Smiod /* rach $accd,$accs */
1442*3d8817e4Smiod   {
1443*3d8817e4Smiod     -1, "rach-ds", "rach", 16,
1444*3d8817e4Smiod     { 0|A(ALIAS), { { { (1<<MACH_M32RX)|(1<<MACH_M32R2), 0 } }, { { PIPE_S, 0 } } } }
1445*3d8817e4Smiod   },
1446*3d8817e4Smiod /* st $src1,@($src2) */
1447*3d8817e4Smiod   {
1448*3d8817e4Smiod     -1, "st-2", "st", 16,
1449*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1450*3d8817e4Smiod   },
1451*3d8817e4Smiod /* st $src1,@($src2,$slo16) */
1452*3d8817e4Smiod   {
1453*3d8817e4Smiod     -1, "st-d2", "st", 32,
1454*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1455*3d8817e4Smiod   },
1456*3d8817e4Smiod /* stb $src1,@($src2) */
1457*3d8817e4Smiod   {
1458*3d8817e4Smiod     -1, "stb-2", "stb", 16,
1459*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1460*3d8817e4Smiod   },
1461*3d8817e4Smiod /* stb $src1,@($src2,$slo16) */
1462*3d8817e4Smiod   {
1463*3d8817e4Smiod     -1, "stb-d2", "stb", 32,
1464*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1465*3d8817e4Smiod   },
1466*3d8817e4Smiod /* sth $src1,@($src2) */
1467*3d8817e4Smiod   {
1468*3d8817e4Smiod     -1, "sth-2", "sth", 16,
1469*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1470*3d8817e4Smiod   },
1471*3d8817e4Smiod /* sth $src1,@($src2,$slo16) */
1472*3d8817e4Smiod   {
1473*3d8817e4Smiod     -1, "sth-d2", "sth", 32,
1474*3d8817e4Smiod     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } }
1475*3d8817e4Smiod   },
1476*3d8817e4Smiod /* push $src1 */
1477*3d8817e4Smiod   {
1478*3d8817e4Smiod     -1, "push", "push", 16,
1479*3d8817e4Smiod     { 0|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { PIPE_O, 0 } } } }
1480*3d8817e4Smiod   },
1481*3d8817e4Smiod };
1482*3d8817e4Smiod 
1483*3d8817e4Smiod /* The macro instruction opcode table.  */
1484*3d8817e4Smiod 
1485*3d8817e4Smiod static const CGEN_OPCODE m32r_cgen_macro_insn_opcode_table[] =
1486*3d8817e4Smiod {
1487*3d8817e4Smiod /* bc $disp8 */
1488*3d8817e4Smiod   {
1489*3d8817e4Smiod     { 0, 0, 0, 0 },
1490*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
1491*3d8817e4Smiod     & ifmt_bc8r, { 0x7c00 }
1492*3d8817e4Smiod   },
1493*3d8817e4Smiod /* bc $disp24 */
1494*3d8817e4Smiod   {
1495*3d8817e4Smiod     { 0, 0, 0, 0 },
1496*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
1497*3d8817e4Smiod     & ifmt_bc24r, { 0xfc000000 }
1498*3d8817e4Smiod   },
1499*3d8817e4Smiod /* bl $disp8 */
1500*3d8817e4Smiod   {
1501*3d8817e4Smiod     { 0, 0, 0, 0 },
1502*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
1503*3d8817e4Smiod     & ifmt_bl8r, { 0x7e00 }
1504*3d8817e4Smiod   },
1505*3d8817e4Smiod /* bl $disp24 */
1506*3d8817e4Smiod   {
1507*3d8817e4Smiod     { 0, 0, 0, 0 },
1508*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
1509*3d8817e4Smiod     & ifmt_bl24r, { 0xfe000000 }
1510*3d8817e4Smiod   },
1511*3d8817e4Smiod /* bcl $disp8 */
1512*3d8817e4Smiod   {
1513*3d8817e4Smiod     { 0, 0, 0, 0 },
1514*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
1515*3d8817e4Smiod     & ifmt_bcl8r, { 0x7800 }
1516*3d8817e4Smiod   },
1517*3d8817e4Smiod /* bcl $disp24 */
1518*3d8817e4Smiod   {
1519*3d8817e4Smiod     { 0, 0, 0, 0 },
1520*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
1521*3d8817e4Smiod     & ifmt_bcl24r, { 0xf8000000 }
1522*3d8817e4Smiod   },
1523*3d8817e4Smiod /* bnc $disp8 */
1524*3d8817e4Smiod   {
1525*3d8817e4Smiod     { 0, 0, 0, 0 },
1526*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
1527*3d8817e4Smiod     & ifmt_bnc8r, { 0x7d00 }
1528*3d8817e4Smiod   },
1529*3d8817e4Smiod /* bnc $disp24 */
1530*3d8817e4Smiod   {
1531*3d8817e4Smiod     { 0, 0, 0, 0 },
1532*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
1533*3d8817e4Smiod     & ifmt_bnc24r, { 0xfd000000 }
1534*3d8817e4Smiod   },
1535*3d8817e4Smiod /* bra $disp8 */
1536*3d8817e4Smiod   {
1537*3d8817e4Smiod     { 0, 0, 0, 0 },
1538*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
1539*3d8817e4Smiod     & ifmt_bra8r, { 0x7f00 }
1540*3d8817e4Smiod   },
1541*3d8817e4Smiod /* bra $disp24 */
1542*3d8817e4Smiod   {
1543*3d8817e4Smiod     { 0, 0, 0, 0 },
1544*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
1545*3d8817e4Smiod     & ifmt_bra24r, { 0xff000000 }
1546*3d8817e4Smiod   },
1547*3d8817e4Smiod /* bncl $disp8 */
1548*3d8817e4Smiod   {
1549*3d8817e4Smiod     { 0, 0, 0, 0 },
1550*3d8817e4Smiod     { { MNEM, ' ', OP (DISP8), 0 } },
1551*3d8817e4Smiod     & ifmt_bncl8r, { 0x7900 }
1552*3d8817e4Smiod   },
1553*3d8817e4Smiod /* bncl $disp24 */
1554*3d8817e4Smiod   {
1555*3d8817e4Smiod     { 0, 0, 0, 0 },
1556*3d8817e4Smiod     { { MNEM, ' ', OP (DISP24), 0 } },
1557*3d8817e4Smiod     & ifmt_bncl24r, { 0xf9000000 }
1558*3d8817e4Smiod   },
1559*3d8817e4Smiod /* ld $dr,@($sr) */
1560*3d8817e4Smiod   {
1561*3d8817e4Smiod     { 0, 0, 0, 0 },
1562*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SR), ')', 0 } },
1563*3d8817e4Smiod     & ifmt_ld_2, { 0x20c0 }
1564*3d8817e4Smiod   },
1565*3d8817e4Smiod /* ld $dr,@($sr,$slo16) */
1566*3d8817e4Smiod   {
1567*3d8817e4Smiod     { 0, 0, 0, 0 },
1568*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SR), ',', OP (SLO16), ')', 0 } },
1569*3d8817e4Smiod     & ifmt_ld_d2, { 0xa0c00000 }
1570*3d8817e4Smiod   },
1571*3d8817e4Smiod /* ldb $dr,@($sr) */
1572*3d8817e4Smiod   {
1573*3d8817e4Smiod     { 0, 0, 0, 0 },
1574*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SR), ')', 0 } },
1575*3d8817e4Smiod     & ifmt_ldb_2, { 0x2080 }
1576*3d8817e4Smiod   },
1577*3d8817e4Smiod /* ldb $dr,@($sr,$slo16) */
1578*3d8817e4Smiod   {
1579*3d8817e4Smiod     { 0, 0, 0, 0 },
1580*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SR), ',', OP (SLO16), ')', 0 } },
1581*3d8817e4Smiod     & ifmt_ldb_d2, { 0xa0800000 }
1582*3d8817e4Smiod   },
1583*3d8817e4Smiod /* ldh $dr,@($sr) */
1584*3d8817e4Smiod   {
1585*3d8817e4Smiod     { 0, 0, 0, 0 },
1586*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SR), ')', 0 } },
1587*3d8817e4Smiod     & ifmt_ldh_2, { 0x20a0 }
1588*3d8817e4Smiod   },
1589*3d8817e4Smiod /* ldh $dr,@($sr,$slo16) */
1590*3d8817e4Smiod   {
1591*3d8817e4Smiod     { 0, 0, 0, 0 },
1592*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SR), ',', OP (SLO16), ')', 0 } },
1593*3d8817e4Smiod     & ifmt_ldh_d2, { 0xa0a00000 }
1594*3d8817e4Smiod   },
1595*3d8817e4Smiod /* ldub $dr,@($sr) */
1596*3d8817e4Smiod   {
1597*3d8817e4Smiod     { 0, 0, 0, 0 },
1598*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SR), ')', 0 } },
1599*3d8817e4Smiod     & ifmt_ldub_2, { 0x2090 }
1600*3d8817e4Smiod   },
1601*3d8817e4Smiod /* ldub $dr,@($sr,$slo16) */
1602*3d8817e4Smiod   {
1603*3d8817e4Smiod     { 0, 0, 0, 0 },
1604*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SR), ',', OP (SLO16), ')', 0 } },
1605*3d8817e4Smiod     & ifmt_ldub_d2, { 0xa0900000 }
1606*3d8817e4Smiod   },
1607*3d8817e4Smiod /* lduh $dr,@($sr) */
1608*3d8817e4Smiod   {
1609*3d8817e4Smiod     { 0, 0, 0, 0 },
1610*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SR), ')', 0 } },
1611*3d8817e4Smiod     & ifmt_lduh_2, { 0x20b0 }
1612*3d8817e4Smiod   },
1613*3d8817e4Smiod /* lduh $dr,@($sr,$slo16) */
1614*3d8817e4Smiod   {
1615*3d8817e4Smiod     { 0, 0, 0, 0 },
1616*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', '@', '(', OP (SR), ',', OP (SLO16), ')', 0 } },
1617*3d8817e4Smiod     & ifmt_lduh_d2, { 0xa0b00000 }
1618*3d8817e4Smiod   },
1619*3d8817e4Smiod /* pop $dr */
1620*3d8817e4Smiod   {
1621*3d8817e4Smiod     { 0, 0, 0, 0 },
1622*3d8817e4Smiod     { { MNEM, ' ', OP (DR), 0 } },
1623*3d8817e4Smiod     & ifmt_pop, { 0x20ef }
1624*3d8817e4Smiod   },
1625*3d8817e4Smiod /* ldi $dr,$simm8 */
1626*3d8817e4Smiod   {
1627*3d8817e4Smiod     { 0, 0, 0, 0 },
1628*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (SIMM8), 0 } },
1629*3d8817e4Smiod     & ifmt_ldi8a, { 0x6000 }
1630*3d8817e4Smiod   },
1631*3d8817e4Smiod /* ldi $dr,$hash$slo16 */
1632*3d8817e4Smiod   {
1633*3d8817e4Smiod     { 0, 0, 0, 0 },
1634*3d8817e4Smiod     { { MNEM, ' ', OP (DR), ',', OP (HASH), OP (SLO16), 0 } },
1635*3d8817e4Smiod     & ifmt_ldi16a, { 0x90f00000 }
1636*3d8817e4Smiod   },
1637*3d8817e4Smiod /* rac $accd */
1638*3d8817e4Smiod   {
1639*3d8817e4Smiod     { 0, 0, 0, 0 },
1640*3d8817e4Smiod     { { MNEM, ' ', OP (ACCD), 0 } },
1641*3d8817e4Smiod     & ifmt_rac_d, { 0x5090 }
1642*3d8817e4Smiod   },
1643*3d8817e4Smiod /* rac $accd,$accs */
1644*3d8817e4Smiod   {
1645*3d8817e4Smiod     { 0, 0, 0, 0 },
1646*3d8817e4Smiod     { { MNEM, ' ', OP (ACCD), ',', OP (ACCS), 0 } },
1647*3d8817e4Smiod     & ifmt_rac_ds, { 0x5090 }
1648*3d8817e4Smiod   },
1649*3d8817e4Smiod /* rach $accd */
1650*3d8817e4Smiod   {
1651*3d8817e4Smiod     { 0, 0, 0, 0 },
1652*3d8817e4Smiod     { { MNEM, ' ', OP (ACCD), 0 } },
1653*3d8817e4Smiod     & ifmt_rach_d, { 0x5080 }
1654*3d8817e4Smiod   },
1655*3d8817e4Smiod /* rach $accd,$accs */
1656*3d8817e4Smiod   {
1657*3d8817e4Smiod     { 0, 0, 0, 0 },
1658*3d8817e4Smiod     { { MNEM, ' ', OP (ACCD), ',', OP (ACCS), 0 } },
1659*3d8817e4Smiod     & ifmt_rach_ds, { 0x5080 }
1660*3d8817e4Smiod   },
1661*3d8817e4Smiod /* st $src1,@($src2) */
1662*3d8817e4Smiod   {
1663*3d8817e4Smiod     { 0, 0, 0, 0 },
1664*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', '(', OP (SRC2), ')', 0 } },
1665*3d8817e4Smiod     & ifmt_st_2, { 0x2040 }
1666*3d8817e4Smiod   },
1667*3d8817e4Smiod /* st $src1,@($src2,$slo16) */
1668*3d8817e4Smiod   {
1669*3d8817e4Smiod     { 0, 0, 0, 0 },
1670*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', '(', OP (SRC2), ',', OP (SLO16), ')', 0 } },
1671*3d8817e4Smiod     & ifmt_st_d2, { 0xa0400000 }
1672*3d8817e4Smiod   },
1673*3d8817e4Smiod /* stb $src1,@($src2) */
1674*3d8817e4Smiod   {
1675*3d8817e4Smiod     { 0, 0, 0, 0 },
1676*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', '(', OP (SRC2), ')', 0 } },
1677*3d8817e4Smiod     & ifmt_stb_2, { 0x2000 }
1678*3d8817e4Smiod   },
1679*3d8817e4Smiod /* stb $src1,@($src2,$slo16) */
1680*3d8817e4Smiod   {
1681*3d8817e4Smiod     { 0, 0, 0, 0 },
1682*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', '(', OP (SRC2), ',', OP (SLO16), ')', 0 } },
1683*3d8817e4Smiod     & ifmt_stb_d2, { 0xa0000000 }
1684*3d8817e4Smiod   },
1685*3d8817e4Smiod /* sth $src1,@($src2) */
1686*3d8817e4Smiod   {
1687*3d8817e4Smiod     { 0, 0, 0, 0 },
1688*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', '(', OP (SRC2), ')', 0 } },
1689*3d8817e4Smiod     & ifmt_sth_2, { 0x2020 }
1690*3d8817e4Smiod   },
1691*3d8817e4Smiod /* sth $src1,@($src2,$slo16) */
1692*3d8817e4Smiod   {
1693*3d8817e4Smiod     { 0, 0, 0, 0 },
1694*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), ',', '@', '(', OP (SRC2), ',', OP (SLO16), ')', 0 } },
1695*3d8817e4Smiod     & ifmt_sth_d2, { 0xa0200000 }
1696*3d8817e4Smiod   },
1697*3d8817e4Smiod /* push $src1 */
1698*3d8817e4Smiod   {
1699*3d8817e4Smiod     { 0, 0, 0, 0 },
1700*3d8817e4Smiod     { { MNEM, ' ', OP (SRC1), 0 } },
1701*3d8817e4Smiod     & ifmt_push, { 0x207f }
1702*3d8817e4Smiod   },
1703*3d8817e4Smiod };
1704*3d8817e4Smiod 
1705*3d8817e4Smiod #undef A
1706*3d8817e4Smiod #undef OPERAND
1707*3d8817e4Smiod #undef MNEM
1708*3d8817e4Smiod #undef OP
1709*3d8817e4Smiod 
1710*3d8817e4Smiod #ifndef CGEN_ASM_HASH_P
1711*3d8817e4Smiod #define CGEN_ASM_HASH_P(insn) 1
1712*3d8817e4Smiod #endif
1713*3d8817e4Smiod 
1714*3d8817e4Smiod #ifndef CGEN_DIS_HASH_P
1715*3d8817e4Smiod #define CGEN_DIS_HASH_P(insn) 1
1716*3d8817e4Smiod #endif
1717*3d8817e4Smiod 
1718*3d8817e4Smiod /* Return non-zero if INSN is to be added to the hash table.
1719*3d8817e4Smiod    Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file.  */
1720*3d8817e4Smiod 
1721*3d8817e4Smiod static int
asm_hash_insn_p(insn)1722*3d8817e4Smiod asm_hash_insn_p (insn)
1723*3d8817e4Smiod      const CGEN_INSN *insn ATTRIBUTE_UNUSED;
1724*3d8817e4Smiod {
1725*3d8817e4Smiod   return CGEN_ASM_HASH_P (insn);
1726*3d8817e4Smiod }
1727*3d8817e4Smiod 
1728*3d8817e4Smiod static int
dis_hash_insn_p(insn)1729*3d8817e4Smiod dis_hash_insn_p (insn)
1730*3d8817e4Smiod      const CGEN_INSN *insn;
1731*3d8817e4Smiod {
1732*3d8817e4Smiod   /* If building the hash table and the NO-DIS attribute is present,
1733*3d8817e4Smiod      ignore.  */
1734*3d8817e4Smiod   if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_NO_DIS))
1735*3d8817e4Smiod     return 0;
1736*3d8817e4Smiod   return CGEN_DIS_HASH_P (insn);
1737*3d8817e4Smiod }
1738*3d8817e4Smiod 
1739*3d8817e4Smiod #ifndef CGEN_ASM_HASH
1740*3d8817e4Smiod #define CGEN_ASM_HASH_SIZE 127
1741*3d8817e4Smiod #ifdef CGEN_MNEMONIC_OPERANDS
1742*3d8817e4Smiod #define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE)
1743*3d8817e4Smiod #else
1744*3d8817e4Smiod #define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE) /*FIXME*/
1745*3d8817e4Smiod #endif
1746*3d8817e4Smiod #endif
1747*3d8817e4Smiod 
1748*3d8817e4Smiod /* It doesn't make much sense to provide a default here,
1749*3d8817e4Smiod    but while this is under development we do.
1750*3d8817e4Smiod    BUFFER is a pointer to the bytes of the insn, target order.
1751*3d8817e4Smiod    VALUE is the first base_insn_bitsize bits as an int in host order.  */
1752*3d8817e4Smiod 
1753*3d8817e4Smiod #ifndef CGEN_DIS_HASH
1754*3d8817e4Smiod #define CGEN_DIS_HASH_SIZE 256
1755*3d8817e4Smiod #define CGEN_DIS_HASH(buf, value) (*(unsigned char *) (buf))
1756*3d8817e4Smiod #endif
1757*3d8817e4Smiod 
1758*3d8817e4Smiod /* The result is the hash value of the insn.
1759*3d8817e4Smiod    Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file.  */
1760*3d8817e4Smiod 
1761*3d8817e4Smiod static unsigned int
asm_hash_insn(mnem)1762*3d8817e4Smiod asm_hash_insn (mnem)
1763*3d8817e4Smiod      const char * mnem;
1764*3d8817e4Smiod {
1765*3d8817e4Smiod   return CGEN_ASM_HASH (mnem);
1766*3d8817e4Smiod }
1767*3d8817e4Smiod 
1768*3d8817e4Smiod /* BUF is a pointer to the bytes of the insn, target order.
1769*3d8817e4Smiod    VALUE is the first base_insn_bitsize bits as an int in host order.  */
1770*3d8817e4Smiod 
1771*3d8817e4Smiod static unsigned int
dis_hash_insn(buf,value)1772*3d8817e4Smiod dis_hash_insn (buf, value)
1773*3d8817e4Smiod      const char * buf ATTRIBUTE_UNUSED;
1774*3d8817e4Smiod      CGEN_INSN_INT value ATTRIBUTE_UNUSED;
1775*3d8817e4Smiod {
1776*3d8817e4Smiod   return CGEN_DIS_HASH (buf, value);
1777*3d8817e4Smiod }
1778*3d8817e4Smiod 
1779*3d8817e4Smiod /* Set the recorded length of the insn in the CGEN_FIELDS struct.  */
1780*3d8817e4Smiod 
1781*3d8817e4Smiod static void
set_fields_bitsize(CGEN_FIELDS * fields,int size)1782*3d8817e4Smiod set_fields_bitsize (CGEN_FIELDS *fields, int size)
1783*3d8817e4Smiod {
1784*3d8817e4Smiod   CGEN_FIELDS_BITSIZE (fields) = size;
1785*3d8817e4Smiod }
1786*3d8817e4Smiod 
1787*3d8817e4Smiod /* Function to call before using the operand instance table.
1788*3d8817e4Smiod    This plugs the opcode entries and macro instructions into the cpu table.  */
1789*3d8817e4Smiod 
1790*3d8817e4Smiod void
m32r_cgen_init_opcode_table(CGEN_CPU_DESC cd)1791*3d8817e4Smiod m32r_cgen_init_opcode_table (CGEN_CPU_DESC cd)
1792*3d8817e4Smiod {
1793*3d8817e4Smiod   int i;
1794*3d8817e4Smiod   int num_macros = (sizeof (m32r_cgen_macro_insn_table) /
1795*3d8817e4Smiod 		    sizeof (m32r_cgen_macro_insn_table[0]));
1796*3d8817e4Smiod   const CGEN_IBASE *ib = & m32r_cgen_macro_insn_table[0];
1797*3d8817e4Smiod   const CGEN_OPCODE *oc = & m32r_cgen_macro_insn_opcode_table[0];
1798*3d8817e4Smiod   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
1799*3d8817e4Smiod 
1800*3d8817e4Smiod   memset (insns, 0, num_macros * sizeof (CGEN_INSN));
1801*3d8817e4Smiod   for (i = 0; i < num_macros; ++i)
1802*3d8817e4Smiod     {
1803*3d8817e4Smiod       insns[i].base = &ib[i];
1804*3d8817e4Smiod       insns[i].opcode = &oc[i];
1805*3d8817e4Smiod       m32r_cgen_build_insn_regex (& insns[i]);
1806*3d8817e4Smiod     }
1807*3d8817e4Smiod   cd->macro_insn_table.init_entries = insns;
1808*3d8817e4Smiod   cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE);
1809*3d8817e4Smiod   cd->macro_insn_table.num_init_entries = num_macros;
1810*3d8817e4Smiod 
1811*3d8817e4Smiod   oc = & m32r_cgen_insn_opcode_table[0];
1812*3d8817e4Smiod   insns = (CGEN_INSN *) cd->insn_table.init_entries;
1813*3d8817e4Smiod   for (i = 0; i < MAX_INSNS; ++i)
1814*3d8817e4Smiod     {
1815*3d8817e4Smiod       insns[i].opcode = &oc[i];
1816*3d8817e4Smiod       m32r_cgen_build_insn_regex (& insns[i]);
1817*3d8817e4Smiod     }
1818*3d8817e4Smiod 
1819*3d8817e4Smiod   cd->sizeof_fields = sizeof (CGEN_FIELDS);
1820*3d8817e4Smiod   cd->set_fields_bitsize = set_fields_bitsize;
1821*3d8817e4Smiod 
1822*3d8817e4Smiod   cd->asm_hash_p = asm_hash_insn_p;
1823*3d8817e4Smiod   cd->asm_hash = asm_hash_insn;
1824*3d8817e4Smiod   cd->asm_hash_size = CGEN_ASM_HASH_SIZE;
1825*3d8817e4Smiod 
1826*3d8817e4Smiod   cd->dis_hash_p = dis_hash_insn_p;
1827*3d8817e4Smiod   cd->dis_hash = dis_hash_insn;
1828*3d8817e4Smiod   cd->dis_hash_size = CGEN_DIS_HASH_SIZE;
1829*3d8817e4Smiod }
1830