Commit | Line | Data |
---|---|---|
4162bb66 | 1 | /* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */ |
47b1a55a SC |
2 | /* CPU data for iq2000. |
3 | ||
4 | THIS FILE IS MACHINE GENERATED WITH CGEN. | |
5 | ||
250d07de | 6 | Copyright (C) 1996-2021 Free Software Foundation, Inc. |
47b1a55a SC |
7 | |
8 | This file is part of the GNU Binutils and/or GDB, the GNU debugger. | |
9 | ||
9b201bb5 NC |
10 | This file is free software; you can redistribute it and/or modify |
11 | it under the terms of the GNU General Public License as published by | |
12 | the Free Software Foundation; either version 3, or (at your option) | |
13 | any later version. | |
47b1a55a | 14 | |
9b201bb5 NC |
15 | It is distributed in the hope that it will be useful, but WITHOUT |
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
17 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
18 | License for more details. | |
47b1a55a | 19 | |
9b201bb5 NC |
20 | You should have received a copy of the GNU General Public License along |
21 | with this program; if not, write to the Free Software Foundation, Inc., | |
22 | 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. | |
47b1a55a SC |
23 | |
24 | */ | |
25 | ||
26 | #include "sysdep.h" | |
47b1a55a SC |
27 | #include <stdio.h> |
28 | #include <stdarg.h> | |
29 | #include "ansidecl.h" | |
30 | #include "bfd.h" | |
31 | #include "symcat.h" | |
32 | #include "iq2000-desc.h" | |
33 | #include "iq2000-opc.h" | |
34 | #include "opintl.h" | |
35 | #include "libiberty.h" | |
75798298 | 36 | #include "xregex.h" |
47b1a55a SC |
37 | |
38 | /* Attributes. */ | |
39 | ||
40 | static const CGEN_ATTR_ENTRY bool_attr[] = | |
41 | { | |
42 | { "#f", 0 }, | |
43 | { "#t", 1 }, | |
44 | { 0, 0 } | |
45 | }; | |
46 | ||
bf143b25 | 47 | static const CGEN_ATTR_ENTRY MACH_attr[] ATTRIBUTE_UNUSED = |
47b1a55a SC |
48 | { |
49 | { "base", MACH_BASE }, | |
50 | { "iq2000", MACH_IQ2000 }, | |
51 | { "iq10", MACH_IQ10 }, | |
52 | { "max", MACH_MAX }, | |
53 | { 0, 0 } | |
54 | }; | |
55 | ||
bf143b25 | 56 | static const CGEN_ATTR_ENTRY ISA_attr[] ATTRIBUTE_UNUSED = |
47b1a55a SC |
57 | { |
58 | { "iq2000", ISA_IQ2000 }, | |
59 | { "max", ISA_MAX }, | |
60 | { 0, 0 } | |
61 | }; | |
62 | ||
63 | const CGEN_ATTR_TABLE iq2000_cgen_ifield_attr_table[] = | |
64 | { | |
65 | { "MACH", & MACH_attr[0], & MACH_attr[0] }, | |
66 | { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, | |
67 | { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] }, | |
68 | { "ABS-ADDR", &bool_attr[0], &bool_attr[0] }, | |
69 | { "RESERVED", &bool_attr[0], &bool_attr[0] }, | |
70 | { "SIGN-OPT", &bool_attr[0], &bool_attr[0] }, | |
71 | { "SIGNED", &bool_attr[0], &bool_attr[0] }, | |
72 | { 0, 0, 0 } | |
73 | }; | |
74 | ||
75 | const CGEN_ATTR_TABLE iq2000_cgen_hardware_attr_table[] = | |
76 | { | |
77 | { "MACH", & MACH_attr[0], & MACH_attr[0] }, | |
78 | { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, | |
79 | { "CACHE-ADDR", &bool_attr[0], &bool_attr[0] }, | |
80 | { "PC", &bool_attr[0], &bool_attr[0] }, | |
81 | { "PROFILE", &bool_attr[0], &bool_attr[0] }, | |
82 | { 0, 0, 0 } | |
83 | }; | |
84 | ||
85 | const CGEN_ATTR_TABLE iq2000_cgen_operand_attr_table[] = | |
86 | { | |
87 | { "MACH", & MACH_attr[0], & MACH_attr[0] }, | |
88 | { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, | |
89 | { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] }, | |
90 | { "ABS-ADDR", &bool_attr[0], &bool_attr[0] }, | |
91 | { "SIGN-OPT", &bool_attr[0], &bool_attr[0] }, | |
92 | { "SIGNED", &bool_attr[0], &bool_attr[0] }, | |
93 | { "NEGATIVE", &bool_attr[0], &bool_attr[0] }, | |
94 | { "RELAX", &bool_attr[0], &bool_attr[0] }, | |
95 | { "SEM-ONLY", &bool_attr[0], &bool_attr[0] }, | |
96 | { 0, 0, 0 } | |
97 | }; | |
98 | ||
99 | const CGEN_ATTR_TABLE iq2000_cgen_insn_attr_table[] = | |
100 | { | |
101 | { "MACH", & MACH_attr[0], & MACH_attr[0] }, | |
102 | { "ALIAS", &bool_attr[0], &bool_attr[0] }, | |
103 | { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, | |
104 | { "UNCOND-CTI", &bool_attr[0], &bool_attr[0] }, | |
105 | { "COND-CTI", &bool_attr[0], &bool_attr[0] }, | |
106 | { "SKIP-CTI", &bool_attr[0], &bool_attr[0] }, | |
107 | { "DELAY-SLOT", &bool_attr[0], &bool_attr[0] }, | |
108 | { "RELAXABLE", &bool_attr[0], &bool_attr[0] }, | |
b11dcf4e | 109 | { "RELAXED", &bool_attr[0], &bool_attr[0] }, |
47b1a55a SC |
110 | { "NO-DIS", &bool_attr[0], &bool_attr[0] }, |
111 | { "PBB", &bool_attr[0], &bool_attr[0] }, | |
112 | { "YIELD-INSN", &bool_attr[0], &bool_attr[0] }, | |
113 | { "LOAD-DELAY", &bool_attr[0], &bool_attr[0] }, | |
114 | { "EVEN-REG-NUM", &bool_attr[0], &bool_attr[0] }, | |
115 | { "UNSUPPORTED", &bool_attr[0], &bool_attr[0] }, | |
116 | { "USES-RD", &bool_attr[0], &bool_attr[0] }, | |
117 | { "USES-RS", &bool_attr[0], &bool_attr[0] }, | |
118 | { "USES-RT", &bool_attr[0], &bool_attr[0] }, | |
119 | { "USES-R31", &bool_attr[0], &bool_attr[0] }, | |
120 | { 0, 0, 0 } | |
121 | }; | |
122 | ||
123 | /* Instruction set variants. */ | |
124 | ||
125 | static const CGEN_ISA iq2000_cgen_isa_table[] = { | |
4030fa5a | 126 | { "iq2000", 32, 32, 32, 32 }, |
47b1a55a SC |
127 | { 0, 0, 0, 0, 0 } |
128 | }; | |
129 | ||
130 | /* Machine variants. */ | |
131 | ||
132 | static const CGEN_MACH iq2000_cgen_mach_table[] = { | |
133 | { "iq2000", "iq2000", MACH_IQ2000, 0 }, | |
134 | { "iq10", "iq10", MACH_IQ10, 0 }, | |
135 | { 0, 0, 0, 0 } | |
136 | }; | |
137 | ||
138 | static CGEN_KEYWORD_ENTRY iq2000_cgen_opval_gr_names_entries[] = | |
139 | { | |
a92e0d0a L |
140 | { "r0", 0, {0, {{{0, 0}}}}, 0, 0 }, |
141 | { "%0", 0, {0, {{{0, 0}}}}, 0, 0 }, | |
142 | { "r1", 1, {0, {{{0, 0}}}}, 0, 0 }, | |
143 | { "%1", 1, {0, {{{0, 0}}}}, 0, 0 }, | |
144 | { "r2", 2, {0, {{{0, 0}}}}, 0, 0 }, | |
145 | { "%2", 2, {0, {{{0, 0}}}}, 0, 0 }, | |
146 | { "r3", 3, {0, {{{0, 0}}}}, 0, 0 }, | |
147 | { "%3", 3, {0, {{{0, 0}}}}, 0, 0 }, | |
148 | { "r4", 4, {0, {{{0, 0}}}}, 0, 0 }, | |
149 | { "%4", 4, {0, {{{0, 0}}}}, 0, 0 }, | |
150 | { "r5", 5, {0, {{{0, 0}}}}, 0, 0 }, | |
151 | { "%5", 5, {0, {{{0, 0}}}}, 0, 0 }, | |
152 | { "r6", 6, {0, {{{0, 0}}}}, 0, 0 }, | |
153 | { "%6", 6, {0, {{{0, 0}}}}, 0, 0 }, | |
154 | { "r7", 7, {0, {{{0, 0}}}}, 0, 0 }, | |
155 | { "%7", 7, {0, {{{0, 0}}}}, 0, 0 }, | |
156 | { "r8", 8, {0, {{{0, 0}}}}, 0, 0 }, | |
157 | { "%8", 8, {0, {{{0, 0}}}}, 0, 0 }, | |
158 | { "r9", 9, {0, {{{0, 0}}}}, 0, 0 }, | |
159 | { "%9", 9, {0, {{{0, 0}}}}, 0, 0 }, | |
160 | { "r10", 10, {0, {{{0, 0}}}}, 0, 0 }, | |
161 | { "%10", 10, {0, {{{0, 0}}}}, 0, 0 }, | |
162 | { "r11", 11, {0, {{{0, 0}}}}, 0, 0 }, | |
163 | { "%11", 11, {0, {{{0, 0}}}}, 0, 0 }, | |
164 | { "r12", 12, {0, {{{0, 0}}}}, 0, 0 }, | |
165 | { "%12", 12, {0, {{{0, 0}}}}, 0, 0 }, | |
166 | { "r13", 13, {0, {{{0, 0}}}}, 0, 0 }, | |
167 | { "%13", 13, {0, {{{0, 0}}}}, 0, 0 }, | |
168 | { "r14", 14, {0, {{{0, 0}}}}, 0, 0 }, | |
169 | { "%14", 14, {0, {{{0, 0}}}}, 0, 0 }, | |
170 | { "r15", 15, {0, {{{0, 0}}}}, 0, 0 }, | |
171 | { "%15", 15, {0, {{{0, 0}}}}, 0, 0 }, | |
172 | { "r16", 16, {0, {{{0, 0}}}}, 0, 0 }, | |
173 | { "%16", 16, {0, {{{0, 0}}}}, 0, 0 }, | |
174 | { "r17", 17, {0, {{{0, 0}}}}, 0, 0 }, | |
175 | { "%17", 17, {0, {{{0, 0}}}}, 0, 0 }, | |
176 | { "r18", 18, {0, {{{0, 0}}}}, 0, 0 }, | |
177 | { "%18", 18, {0, {{{0, 0}}}}, 0, 0 }, | |
178 | { "r19", 19, {0, {{{0, 0}}}}, 0, 0 }, | |
179 | { "%19", 19, {0, {{{0, 0}}}}, 0, 0 }, | |
180 | { "r20", 20, {0, {{{0, 0}}}}, 0, 0 }, | |
181 | { "%20", 20, {0, {{{0, 0}}}}, 0, 0 }, | |
182 | { "r21", 21, {0, {{{0, 0}}}}, 0, 0 }, | |
183 | { "%21", 21, {0, {{{0, 0}}}}, 0, 0 }, | |
184 | { "r22", 22, {0, {{{0, 0}}}}, 0, 0 }, | |
185 | { "%22", 22, {0, {{{0, 0}}}}, 0, 0 }, | |
186 | { "r23", 23, {0, {{{0, 0}}}}, 0, 0 }, | |
187 | { "%23", 23, {0, {{{0, 0}}}}, 0, 0 }, | |
188 | { "r24", 24, {0, {{{0, 0}}}}, 0, 0 }, | |
189 | { "%24", 24, {0, {{{0, 0}}}}, 0, 0 }, | |
190 | { "r25", 25, {0, {{{0, 0}}}}, 0, 0 }, | |
191 | { "%25", 25, {0, {{{0, 0}}}}, 0, 0 }, | |
192 | { "r26", 26, {0, {{{0, 0}}}}, 0, 0 }, | |
193 | { "%26", 26, {0, {{{0, 0}}}}, 0, 0 }, | |
194 | { "r27", 27, {0, {{{0, 0}}}}, 0, 0 }, | |
195 | { "%27", 27, {0, {{{0, 0}}}}, 0, 0 }, | |
196 | { "r28", 28, {0, {{{0, 0}}}}, 0, 0 }, | |
197 | { "%28", 28, {0, {{{0, 0}}}}, 0, 0 }, | |
198 | { "r29", 29, {0, {{{0, 0}}}}, 0, 0 }, | |
199 | { "%29", 29, {0, {{{0, 0}}}}, 0, 0 }, | |
200 | { "r30", 30, {0, {{{0, 0}}}}, 0, 0 }, | |
201 | { "%30", 30, {0, {{{0, 0}}}}, 0, 0 }, | |
202 | { "r31", 31, {0, {{{0, 0}}}}, 0, 0 }, | |
203 | { "%31", 31, {0, {{{0, 0}}}}, 0, 0 } | |
47b1a55a SC |
204 | }; |
205 | ||
206 | CGEN_KEYWORD iq2000_cgen_opval_gr_names = | |
207 | { | |
208 | & iq2000_cgen_opval_gr_names_entries[0], | |
209 | 64, | |
210 | 0, 0, 0, 0, "" | |
211 | }; | |
212 | ||
213 | ||
214 | /* The hardware table. */ | |
215 | ||
47b1a55a | 216 | #define A(a) (1 << CGEN_HW_##a) |
47b1a55a SC |
217 | |
218 | const CGEN_HW_ENTRY iq2000_cgen_hw_table[] = | |
219 | { | |
a92e0d0a L |
220 | { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
221 | { "h-sint", HW_H_SINT, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
222 | { "h-uint", HW_H_UINT, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
223 | { "h-addr", HW_H_ADDR, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
224 | { "h-iaddr", HW_H_IADDR, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
225 | { "h-pc", HW_H_PC, CGEN_ASM_NONE, 0, { 0|A(PROFILE)|A(PC), { { { (1<<MACH_BASE), 0 } } } } }, | |
226 | { "h-gr", HW_H_GR, CGEN_ASM_KEYWORD, (PTR) & iq2000_cgen_opval_gr_names, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
227 | { 0, 0, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } } | |
47b1a55a SC |
228 | }; |
229 | ||
230 | #undef A | |
231 | ||
232 | ||
233 | /* The instruction field table. */ | |
234 | ||
47b1a55a | 235 | #define A(a) (1 << CGEN_IFLD_##a) |
47b1a55a SC |
236 | |
237 | const CGEN_IFLD iq2000_cgen_ifld_table[] = | |
238 | { | |
a92e0d0a L |
239 | { IQ2000_F_NIL, "f-nil", 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
240 | { IQ2000_F_ANYOF, "f-anyof", 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
241 | { IQ2000_F_OPCODE, "f-opcode", 0, 32, 31, 6, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
242 | { IQ2000_F_RS, "f-rs", 0, 32, 25, 5, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
243 | { IQ2000_F_RT, "f-rt", 0, 32, 20, 5, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
244 | { IQ2000_F_RD, "f-rd", 0, 32, 15, 5, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
245 | { IQ2000_F_SHAMT, "f-shamt", 0, 32, 10, 5, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
246 | { IQ2000_F_CP_OP, "f-cp-op", 0, 32, 10, 3, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
247 | { IQ2000_F_CP_OP_10, "f-cp-op-10", 0, 32, 10, 5, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
248 | { IQ2000_F_CP_GRP, "f-cp-grp", 0, 32, 7, 2, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
249 | { IQ2000_F_FUNC, "f-func", 0, 32, 5, 6, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
250 | { IQ2000_F_IMM, "f-imm", 0, 32, 15, 16, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
251 | { IQ2000_F_RD_RS, "f-rd-rs", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } } } } }, | |
252 | { IQ2000_F_RD_RT, "f-rd-rt", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } } } } }, | |
253 | { IQ2000_F_RT_RS, "f-rt-rs", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } } } } }, | |
254 | { IQ2000_F_JTARG, "f-jtarg", 0, 32, 15, 16, { 0|A(ABS_ADDR), { { { (1<<MACH_BASE), 0 } } } } }, | |
255 | { IQ2000_F_JTARGQ10, "f-jtargq10", 0, 32, 20, 21, { 0|A(ABS_ADDR), { { { (1<<MACH_BASE), 0 } } } } }, | |
256 | { IQ2000_F_OFFSET, "f-offset", 0, 32, 15, 16, { 0|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } } } } }, | |
257 | { IQ2000_F_COUNT, "f-count", 0, 32, 15, 7, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
258 | { IQ2000_F_BYTECOUNT, "f-bytecount", 0, 32, 7, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
259 | { IQ2000_F_INDEX, "f-index", 0, 32, 8, 9, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
260 | { IQ2000_F_MASK, "f-mask", 0, 32, 9, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
261 | { IQ2000_F_MASKQ10, "f-maskq10", 0, 32, 10, 5, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
262 | { IQ2000_F_MASKL, "f-maskl", 0, 32, 4, 5, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
263 | { IQ2000_F_EXCODE, "f-excode", 0, 32, 25, 20, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
264 | { IQ2000_F_RSRVD, "f-rsrvd", 0, 32, 25, 10, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
265 | { IQ2000_F_10_11, "f-10-11", 0, 32, 10, 11, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
266 | { IQ2000_F_24_19, "f-24-19", 0, 32, 24, 19, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
267 | { IQ2000_F_5, "f-5", 0, 32, 5, 1, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
268 | { IQ2000_F_10, "f-10", 0, 32, 10, 1, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
269 | { IQ2000_F_25, "f-25", 0, 32, 25, 1, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
270 | { IQ2000_F_CAM_Z, "f-cam-z", 0, 32, 5, 3, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
271 | { IQ2000_F_CAM_Y, "f-cam-y", 0, 32, 2, 3, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
272 | { IQ2000_F_CM_3FUNC, "f-cm-3func", 0, 32, 5, 3, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
273 | { IQ2000_F_CM_4FUNC, "f-cm-4func", 0, 32, 5, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
274 | { IQ2000_F_CM_3Z, "f-cm-3z", 0, 32, 1, 2, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
275 | { IQ2000_F_CM_4Z, "f-cm-4z", 0, 32, 2, 3, { 0, { { { (1<<MACH_BASE), 0 } } } } }, | |
276 | { 0, 0, 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } } | |
47b1a55a SC |
277 | }; |
278 | ||
279 | #undef A | |
280 | ||
281 | ||
282 | ||
283 | /* multi ifield declarations */ | |
284 | ||
285 | const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RS_MULTI_IFIELD []; | |
286 | const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RT_MULTI_IFIELD []; | |
287 | const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RT_RS_MULTI_IFIELD []; | |
288 | ||
289 | ||
290 | /* multi ifield definitions */ | |
291 | ||
292 | const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RS_MULTI_IFIELD [] = | |
293 | { | |
75798298 NC |
294 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RD] } }, |
295 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } }, | |
296 | { 0, { (const PTR) 0 } } | |
47b1a55a SC |
297 | }; |
298 | const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RT_MULTI_IFIELD [] = | |
299 | { | |
75798298 NC |
300 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RD] } }, |
301 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } }, | |
302 | { 0, { (const PTR) 0 } } | |
47b1a55a SC |
303 | }; |
304 | const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RT_RS_MULTI_IFIELD [] = | |
305 | { | |
75798298 NC |
306 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } }, |
307 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } }, | |
308 | { 0, { (const PTR) 0 } } | |
47b1a55a SC |
309 | }; |
310 | ||
311 | /* The operand table. */ | |
312 | ||
47b1a55a | 313 | #define A(a) (1 << CGEN_OPERAND_##a) |
47b1a55a | 314 | #define OPERAND(op) IQ2000_OPERAND_##op |
47b1a55a SC |
315 | |
316 | const CGEN_OPERAND iq2000_cgen_operand_table[] = | |
317 | { | |
318 | /* pc: program counter */ | |
319 | { "pc", IQ2000_OPERAND_PC, HW_H_PC, 0, 0, | |
43e65147 | 320 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_NIL] } }, |
a92e0d0a | 321 | { 0|A(SEM_ONLY), { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
322 | /* rs: register Rs */ |
323 | { "rs", IQ2000_OPERAND_RS, HW_H_GR, 25, 5, | |
43e65147 | 324 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } }, |
a92e0d0a | 325 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
326 | /* rt: register Rt */ |
327 | { "rt", IQ2000_OPERAND_RT, HW_H_GR, 20, 5, | |
43e65147 | 328 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } }, |
a92e0d0a | 329 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
330 | /* rd: register Rd */ |
331 | { "rd", IQ2000_OPERAND_RD, HW_H_GR, 15, 5, | |
43e65147 | 332 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RD] } }, |
a92e0d0a | 333 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
334 | /* rd-rs: register Rd from Rs */ |
335 | { "rd-rs", IQ2000_OPERAND_RD_RS, HW_H_GR, 15, 10, | |
43e65147 | 336 | { 2, { (const PTR) &IQ2000_F_RD_RS_MULTI_IFIELD[0] } }, |
a92e0d0a | 337 | { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
338 | /* rd-rt: register Rd from Rt */ |
339 | { "rd-rt", IQ2000_OPERAND_RD_RT, HW_H_GR, 15, 10, | |
43e65147 | 340 | { 2, { (const PTR) &IQ2000_F_RD_RT_MULTI_IFIELD[0] } }, |
a92e0d0a | 341 | { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
342 | /* rt-rs: register Rt from Rs */ |
343 | { "rt-rs", IQ2000_OPERAND_RT_RS, HW_H_GR, 20, 10, | |
43e65147 | 344 | { 2, { (const PTR) &IQ2000_F_RT_RS_MULTI_IFIELD[0] } }, |
a92e0d0a | 345 | { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
346 | /* shamt: shift amount */ |
347 | { "shamt", IQ2000_OPERAND_SHAMT, HW_H_UINT, 10, 5, | |
43e65147 | 348 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_SHAMT] } }, |
a92e0d0a | 349 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
350 | /* imm: immediate */ |
351 | { "imm", IQ2000_OPERAND_IMM, HW_H_UINT, 15, 16, | |
43e65147 | 352 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } }, |
a92e0d0a | 353 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
354 | /* offset: pc-relative offset */ |
355 | { "offset", IQ2000_OPERAND_OFFSET, HW_H_IADDR, 15, 16, | |
43e65147 | 356 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_OFFSET] } }, |
a92e0d0a | 357 | { 0|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
358 | /* baseoff: base register offset */ |
359 | { "baseoff", IQ2000_OPERAND_BASEOFF, HW_H_IADDR, 15, 16, | |
43e65147 | 360 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } }, |
a92e0d0a | 361 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
362 | /* jmptarg: jump target */ |
363 | { "jmptarg", IQ2000_OPERAND_JMPTARG, HW_H_IADDR, 15, 16, | |
43e65147 | 364 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_JTARG] } }, |
a92e0d0a | 365 | { 0|A(ABS_ADDR), { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
366 | /* mask: mask */ |
367 | { "mask", IQ2000_OPERAND_MASK, HW_H_UINT, 9, 4, | |
43e65147 | 368 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_MASK] } }, |
a92e0d0a | 369 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
370 | /* maskq10: iq10 mask */ |
371 | { "maskq10", IQ2000_OPERAND_MASKQ10, HW_H_UINT, 10, 5, | |
43e65147 | 372 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_MASKQ10] } }, |
a92e0d0a | 373 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
374 | /* maskl: mask left */ |
375 | { "maskl", IQ2000_OPERAND_MASKL, HW_H_UINT, 4, 5, | |
43e65147 | 376 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_MASKL] } }, |
a92e0d0a | 377 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
378 | /* count: count */ |
379 | { "count", IQ2000_OPERAND_COUNT, HW_H_UINT, 15, 7, | |
43e65147 | 380 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_COUNT] } }, |
a92e0d0a | 381 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
4030fa5a NC |
382 | /* _index: index */ |
383 | { "_index", IQ2000_OPERAND__INDEX, HW_H_UINT, 8, 9, | |
43e65147 | 384 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_INDEX] } }, |
a92e0d0a | 385 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
386 | /* execode: execcode */ |
387 | { "execode", IQ2000_OPERAND_EXECODE, HW_H_UINT, 25, 20, | |
43e65147 | 388 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_EXCODE] } }, |
a92e0d0a | 389 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
390 | /* bytecount: byte count */ |
391 | { "bytecount", IQ2000_OPERAND_BYTECOUNT, HW_H_UINT, 7, 8, | |
43e65147 | 392 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_BYTECOUNT] } }, |
a92e0d0a | 393 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
394 | /* cam-y: cam global opn y */ |
395 | { "cam-y", IQ2000_OPERAND_CAM_Y, HW_H_UINT, 2, 3, | |
43e65147 | 396 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CAM_Y] } }, |
a92e0d0a | 397 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
398 | /* cam-z: cam global mask z */ |
399 | { "cam-z", IQ2000_OPERAND_CAM_Z, HW_H_UINT, 5, 3, | |
43e65147 | 400 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CAM_Z] } }, |
a92e0d0a | 401 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
402 | /* cm-3func: CM 3 bit fn field */ |
403 | { "cm-3func", IQ2000_OPERAND_CM_3FUNC, HW_H_UINT, 5, 3, | |
43e65147 | 404 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_3FUNC] } }, |
a92e0d0a | 405 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
406 | /* cm-4func: CM 4 bit fn field */ |
407 | { "cm-4func", IQ2000_OPERAND_CM_4FUNC, HW_H_UINT, 5, 4, | |
43e65147 | 408 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_4FUNC] } }, |
a92e0d0a | 409 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
410 | /* cm-3z: CM 3 bit Z field */ |
411 | { "cm-3z", IQ2000_OPERAND_CM_3Z, HW_H_UINT, 1, 2, | |
43e65147 | 412 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_3Z] } }, |
a92e0d0a | 413 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
414 | /* cm-4z: CM 4 bit Z field */ |
415 | { "cm-4z", IQ2000_OPERAND_CM_4Z, HW_H_UINT, 2, 3, | |
43e65147 | 416 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_4Z] } }, |
a92e0d0a | 417 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
418 | /* base: base register */ |
419 | { "base", IQ2000_OPERAND_BASE, HW_H_GR, 25, 5, | |
43e65147 | 420 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } }, |
a92e0d0a | 421 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
422 | /* maskr: mask right */ |
423 | { "maskr", IQ2000_OPERAND_MASKR, HW_H_UINT, 25, 5, | |
43e65147 | 424 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } }, |
a92e0d0a | 425 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
426 | /* bitnum: bit number */ |
427 | { "bitnum", IQ2000_OPERAND_BITNUM, HW_H_UINT, 20, 5, | |
43e65147 | 428 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } }, |
a92e0d0a | 429 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
430 | /* hi16: high 16 bit immediate */ |
431 | { "hi16", IQ2000_OPERAND_HI16, HW_H_UINT, 15, 16, | |
43e65147 | 432 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } }, |
a92e0d0a | 433 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
434 | /* lo16: 16 bit signed immediate, for low */ |
435 | { "lo16", IQ2000_OPERAND_LO16, HW_H_UINT, 15, 16, | |
43e65147 | 436 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } }, |
a92e0d0a | 437 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
438 | /* mlo16: negated 16 bit signed immediate */ |
439 | { "mlo16", IQ2000_OPERAND_MLO16, HW_H_UINT, 15, 16, | |
43e65147 | 440 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } }, |
a92e0d0a | 441 | { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
442 | /* jmptargq10: iq10 21-bit jump offset */ |
443 | { "jmptargq10", IQ2000_OPERAND_JMPTARGQ10, HW_H_IADDR, 20, 21, | |
43e65147 | 444 | { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_JTARGQ10] } }, |
a92e0d0a | 445 | { 0|A(ABS_ADDR), { { { (1<<MACH_BASE), 0 } } } } }, |
75798298 NC |
446 | /* sentinel */ |
447 | { 0, 0, 0, 0, 0, | |
448 | { 0, { (const PTR) 0 } }, | |
a92e0d0a | 449 | { 0, { { { (1<<MACH_BASE), 0 } } } } } |
47b1a55a SC |
450 | }; |
451 | ||
452 | #undef A | |
453 | ||
454 | ||
455 | /* The instruction table. */ | |
456 | ||
457 | #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) | |
47b1a55a | 458 | #define A(a) (1 << CGEN_INSN_##a) |
47b1a55a SC |
459 | |
460 | static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] = | |
461 | { | |
462 | /* Special null first entry. | |
463 | A `num' value of zero is thus invalid. | |
464 | Also, the special `invalid' insn resides here. */ | |
a92e0d0a | 465 | { 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } }, |
47b1a55a SC |
466 | /* add ${rd-rs},$rt */ |
467 | { | |
468 | -1, "add2", "add", 32, | |
a92e0d0a | 469 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
470 | }, |
471 | /* add $rd,$rs,$rt */ | |
472 | { | |
473 | IQ2000_INSN_ADD, "add", "add", 32, | |
a92e0d0a | 474 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
475 | }, |
476 | /* addi ${rt-rs},$lo16 */ | |
477 | { | |
478 | -1, "addi2", "addi", 32, | |
a92e0d0a | 479 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
480 | }, |
481 | /* addi $rt,$rs,$lo16 */ | |
482 | { | |
483 | IQ2000_INSN_ADDI, "addi", "addi", 32, | |
a92e0d0a | 484 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
485 | }, |
486 | /* addiu ${rt-rs},$lo16 */ | |
487 | { | |
488 | -1, "addiu2", "addiu", 32, | |
a92e0d0a | 489 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
490 | }, |
491 | /* addiu $rt,$rs,$lo16 */ | |
492 | { | |
493 | IQ2000_INSN_ADDIU, "addiu", "addiu", 32, | |
a92e0d0a | 494 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
495 | }, |
496 | /* addu ${rd-rs},$rt */ | |
497 | { | |
498 | -1, "addu2", "addu", 32, | |
a92e0d0a | 499 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
500 | }, |
501 | /* addu $rd,$rs,$rt */ | |
502 | { | |
503 | IQ2000_INSN_ADDU, "addu", "addu", 32, | |
a92e0d0a | 504 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
505 | }, |
506 | /* ado16 ${rd-rs},$rt */ | |
507 | { | |
508 | -1, "ado162", "ado16", 32, | |
a92e0d0a | 509 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
510 | }, |
511 | /* ado16 $rd,$rs,$rt */ | |
512 | { | |
513 | IQ2000_INSN_ADO16, "ado16", "ado16", 32, | |
a92e0d0a | 514 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
515 | }, |
516 | /* and ${rd-rs},$rt */ | |
517 | { | |
518 | -1, "and2", "and", 32, | |
a92e0d0a | 519 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
520 | }, |
521 | /* and $rd,$rs,$rt */ | |
522 | { | |
523 | IQ2000_INSN_AND, "and", "and", 32, | |
a92e0d0a | 524 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
525 | }, |
526 | /* andi ${rt-rs},$lo16 */ | |
527 | { | |
528 | -1, "andi2", "andi", 32, | |
a92e0d0a | 529 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
530 | }, |
531 | /* andi $rt,$rs,$lo16 */ | |
532 | { | |
533 | IQ2000_INSN_ANDI, "andi", "andi", 32, | |
a92e0d0a | 534 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
535 | }, |
536 | /* andoi ${rt-rs},$lo16 */ | |
537 | { | |
538 | -1, "andoi2", "andoi", 32, | |
a92e0d0a | 539 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
540 | }, |
541 | /* andoi $rt,$rs,$lo16 */ | |
542 | { | |
543 | IQ2000_INSN_ANDOI, "andoi", "andoi", 32, | |
a92e0d0a | 544 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
545 | }, |
546 | /* nor ${rd-rs},$rt */ | |
547 | { | |
548 | -1, "nor2", "nor", 32, | |
a92e0d0a | 549 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
550 | }, |
551 | /* nor $rd,$rs,$rt */ | |
552 | { | |
553 | IQ2000_INSN_NOR, "nor", "nor", 32, | |
a92e0d0a | 554 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
555 | }, |
556 | /* or ${rd-rs},$rt */ | |
557 | { | |
558 | -1, "or2", "or", 32, | |
a92e0d0a | 559 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
560 | }, |
561 | /* or $rd,$rs,$rt */ | |
562 | { | |
563 | IQ2000_INSN_OR, "or", "or", 32, | |
a92e0d0a | 564 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
565 | }, |
566 | /* ori ${rt-rs},$lo16 */ | |
567 | { | |
568 | -1, "ori2", "ori", 32, | |
a92e0d0a | 569 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
570 | }, |
571 | /* ori $rt,$rs,$lo16 */ | |
572 | { | |
573 | IQ2000_INSN_ORI, "ori", "ori", 32, | |
a92e0d0a | 574 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
575 | }, |
576 | /* ram $rd,$rt,$shamt,$maskl,$maskr */ | |
577 | { | |
578 | IQ2000_INSN_RAM, "ram", "ram", 32, | |
a92e0d0a | 579 | { 0|A(USES_RT)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
580 | }, |
581 | /* sll $rd,$rt,$shamt */ | |
582 | { | |
583 | IQ2000_INSN_SLL, "sll", "sll", 32, | |
a92e0d0a | 584 | { 0|A(USES_RT)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
585 | }, |
586 | /* sllv ${rd-rt},$rs */ | |
587 | { | |
588 | -1, "sllv2", "sllv", 32, | |
a92e0d0a | 589 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
590 | }, |
591 | /* sllv $rd,$rt,$rs */ | |
592 | { | |
593 | IQ2000_INSN_SLLV, "sllv", "sllv", 32, | |
a92e0d0a | 594 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
595 | }, |
596 | /* slmv ${rd-rt},$rs,$shamt */ | |
597 | { | |
598 | -1, "slmv2", "slmv", 32, | |
a92e0d0a | 599 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
600 | }, |
601 | /* slmv $rd,$rt,$rs,$shamt */ | |
602 | { | |
603 | IQ2000_INSN_SLMV, "slmv", "slmv", 32, | |
a92e0d0a | 604 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
605 | }, |
606 | /* slt ${rd-rs},$rt */ | |
607 | { | |
608 | -1, "slt2", "slt", 32, | |
a92e0d0a | 609 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
610 | }, |
611 | /* slt $rd,$rs,$rt */ | |
612 | { | |
613 | IQ2000_INSN_SLT, "slt", "slt", 32, | |
a92e0d0a | 614 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
615 | }, |
616 | /* slti ${rt-rs},$imm */ | |
617 | { | |
618 | -1, "slti2", "slti", 32, | |
a92e0d0a | 619 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
620 | }, |
621 | /* slti $rt,$rs,$imm */ | |
622 | { | |
623 | IQ2000_INSN_SLTI, "slti", "slti", 32, | |
a92e0d0a | 624 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
625 | }, |
626 | /* sltiu ${rt-rs},$imm */ | |
627 | { | |
628 | -1, "sltiu2", "sltiu", 32, | |
a92e0d0a | 629 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
630 | }, |
631 | /* sltiu $rt,$rs,$imm */ | |
632 | { | |
633 | IQ2000_INSN_SLTIU, "sltiu", "sltiu", 32, | |
a92e0d0a | 634 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
635 | }, |
636 | /* sltu ${rd-rs},$rt */ | |
637 | { | |
638 | -1, "sltu2", "sltu", 32, | |
a92e0d0a | 639 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
640 | }, |
641 | /* sltu $rd,$rs,$rt */ | |
642 | { | |
643 | IQ2000_INSN_SLTU, "sltu", "sltu", 32, | |
a92e0d0a | 644 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
645 | }, |
646 | /* sra ${rd-rt},$shamt */ | |
647 | { | |
648 | -1, "sra2", "sra", 32, | |
a92e0d0a | 649 | { 0|A(USES_RT)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
650 | }, |
651 | /* sra $rd,$rt,$shamt */ | |
652 | { | |
653 | IQ2000_INSN_SRA, "sra", "sra", 32, | |
a92e0d0a | 654 | { 0|A(USES_RT)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
655 | }, |
656 | /* srav ${rd-rt},$rs */ | |
657 | { | |
658 | -1, "srav2", "srav", 32, | |
a92e0d0a | 659 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
660 | }, |
661 | /* srav $rd,$rt,$rs */ | |
662 | { | |
663 | IQ2000_INSN_SRAV, "srav", "srav", 32, | |
a92e0d0a | 664 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
665 | }, |
666 | /* srl $rd,$rt,$shamt */ | |
667 | { | |
668 | IQ2000_INSN_SRL, "srl", "srl", 32, | |
a92e0d0a | 669 | { 0|A(USES_RT)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
670 | }, |
671 | /* srlv ${rd-rt},$rs */ | |
672 | { | |
673 | -1, "srlv2", "srlv", 32, | |
a92e0d0a | 674 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
675 | }, |
676 | /* srlv $rd,$rt,$rs */ | |
677 | { | |
678 | IQ2000_INSN_SRLV, "srlv", "srlv", 32, | |
a92e0d0a | 679 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
680 | }, |
681 | /* srmv ${rd-rt},$rs,$shamt */ | |
682 | { | |
683 | -1, "srmv2", "srmv", 32, | |
a92e0d0a | 684 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
685 | }, |
686 | /* srmv $rd,$rt,$rs,$shamt */ | |
687 | { | |
688 | IQ2000_INSN_SRMV, "srmv", "srmv", 32, | |
a92e0d0a | 689 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
690 | }, |
691 | /* sub ${rd-rs},$rt */ | |
692 | { | |
693 | -1, "sub2", "sub", 32, | |
a92e0d0a | 694 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
695 | }, |
696 | /* sub $rd,$rs,$rt */ | |
697 | { | |
698 | IQ2000_INSN_SUB, "sub", "sub", 32, | |
a92e0d0a | 699 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
700 | }, |
701 | /* subu ${rd-rs},$rt */ | |
702 | { | |
703 | -1, "subu2", "subu", 32, | |
a92e0d0a | 704 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
705 | }, |
706 | /* subu $rd,$rs,$rt */ | |
707 | { | |
708 | IQ2000_INSN_SUBU, "subu", "subu", 32, | |
a92e0d0a | 709 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
710 | }, |
711 | /* xor ${rd-rs},$rt */ | |
712 | { | |
713 | -1, "xor2", "xor", 32, | |
a92e0d0a | 714 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
715 | }, |
716 | /* xor $rd,$rs,$rt */ | |
717 | { | |
718 | IQ2000_INSN_XOR, "xor", "xor", 32, | |
a92e0d0a | 719 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
720 | }, |
721 | /* xori ${rt-rs},$lo16 */ | |
722 | { | |
723 | -1, "xori2", "xori", 32, | |
a92e0d0a | 724 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
725 | }, |
726 | /* xori $rt,$rs,$lo16 */ | |
727 | { | |
728 | IQ2000_INSN_XORI, "xori", "xori", 32, | |
a92e0d0a | 729 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
730 | }, |
731 | /* bbi $rs($bitnum),$offset */ | |
732 | { | |
733 | IQ2000_INSN_BBI, "bbi", "bbi", 32, | |
a92e0d0a | 734 | { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
735 | }, |
736 | /* bbin $rs($bitnum),$offset */ | |
737 | { | |
738 | IQ2000_INSN_BBIN, "bbin", "bbin", 32, | |
a92e0d0a | 739 | { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
740 | }, |
741 | /* bbv $rs,$rt,$offset */ | |
742 | { | |
743 | IQ2000_INSN_BBV, "bbv", "bbv", 32, | |
a92e0d0a | 744 | { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
745 | }, |
746 | /* bbvn $rs,$rt,$offset */ | |
747 | { | |
748 | IQ2000_INSN_BBVN, "bbvn", "bbvn", 32, | |
a92e0d0a | 749 | { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
750 | }, |
751 | /* beq $rs,$rt,$offset */ | |
752 | { | |
753 | IQ2000_INSN_BEQ, "beq", "beq", 32, | |
a92e0d0a | 754 | { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
755 | }, |
756 | /* beql $rs,$rt,$offset */ | |
757 | { | |
758 | IQ2000_INSN_BEQL, "beql", "beql", 32, | |
a92e0d0a | 759 | { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
760 | }, |
761 | /* bgez $rs,$offset */ | |
762 | { | |
763 | IQ2000_INSN_BGEZ, "bgez", "bgez", 32, | |
a92e0d0a | 764 | { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
765 | }, |
766 | /* bgezal $rs,$offset */ | |
767 | { | |
768 | IQ2000_INSN_BGEZAL, "bgezal", "bgezal", 32, | |
a92e0d0a | 769 | { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
770 | }, |
771 | /* bgezall $rs,$offset */ | |
772 | { | |
773 | IQ2000_INSN_BGEZALL, "bgezall", "bgezall", 32, | |
a92e0d0a | 774 | { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
775 | }, |
776 | /* bgezl $rs,$offset */ | |
777 | { | |
778 | IQ2000_INSN_BGEZL, "bgezl", "bgezl", 32, | |
a92e0d0a | 779 | { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
780 | }, |
781 | /* bltz $rs,$offset */ | |
782 | { | |
783 | IQ2000_INSN_BLTZ, "bltz", "bltz", 32, | |
a92e0d0a | 784 | { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
785 | }, |
786 | /* bltzl $rs,$offset */ | |
787 | { | |
788 | IQ2000_INSN_BLTZL, "bltzl", "bltzl", 32, | |
a92e0d0a | 789 | { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
790 | }, |
791 | /* bltzal $rs,$offset */ | |
792 | { | |
793 | IQ2000_INSN_BLTZAL, "bltzal", "bltzal", 32, | |
a92e0d0a | 794 | { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
795 | }, |
796 | /* bltzall $rs,$offset */ | |
797 | { | |
798 | IQ2000_INSN_BLTZALL, "bltzall", "bltzall", 32, | |
a92e0d0a | 799 | { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
800 | }, |
801 | /* bmb0 $rs,$rt,$offset */ | |
802 | { | |
803 | IQ2000_INSN_BMB0, "bmb0", "bmb0", 32, | |
a92e0d0a | 804 | { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
805 | }, |
806 | /* bmb1 $rs,$rt,$offset */ | |
807 | { | |
808 | IQ2000_INSN_BMB1, "bmb1", "bmb1", 32, | |
a92e0d0a | 809 | { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
810 | }, |
811 | /* bmb2 $rs,$rt,$offset */ | |
812 | { | |
813 | IQ2000_INSN_BMB2, "bmb2", "bmb2", 32, | |
a92e0d0a | 814 | { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
815 | }, |
816 | /* bmb3 $rs,$rt,$offset */ | |
817 | { | |
818 | IQ2000_INSN_BMB3, "bmb3", "bmb3", 32, | |
a92e0d0a | 819 | { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
820 | }, |
821 | /* bne $rs,$rt,$offset */ | |
822 | { | |
823 | IQ2000_INSN_BNE, "bne", "bne", 32, | |
a92e0d0a | 824 | { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
825 | }, |
826 | /* bnel $rs,$rt,$offset */ | |
827 | { | |
828 | IQ2000_INSN_BNEL, "bnel", "bnel", 32, | |
a92e0d0a | 829 | { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
830 | }, |
831 | /* jalr $rd,$rs */ | |
832 | { | |
833 | IQ2000_INSN_JALR, "jalr", "jalr", 32, | |
a92e0d0a | 834 | { 0|A(USES_RS)|A(USES_RD)|A(UNCOND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
835 | }, |
836 | /* jr $rs */ | |
837 | { | |
838 | IQ2000_INSN_JR, "jr", "jr", 32, | |
a92e0d0a | 839 | { 0|A(USES_RS)|A(UNCOND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
840 | }, |
841 | /* lb $rt,$lo16($base) */ | |
842 | { | |
843 | IQ2000_INSN_LB, "lb", "lb", 32, | |
a92e0d0a | 844 | { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
845 | }, |
846 | /* lbu $rt,$lo16($base) */ | |
847 | { | |
848 | IQ2000_INSN_LBU, "lbu", "lbu", 32, | |
a92e0d0a | 849 | { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
850 | }, |
851 | /* lh $rt,$lo16($base) */ | |
852 | { | |
853 | IQ2000_INSN_LH, "lh", "lh", 32, | |
a92e0d0a | 854 | { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
855 | }, |
856 | /* lhu $rt,$lo16($base) */ | |
857 | { | |
858 | IQ2000_INSN_LHU, "lhu", "lhu", 32, | |
a92e0d0a | 859 | { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
860 | }, |
861 | /* lui $rt,$hi16 */ | |
862 | { | |
863 | IQ2000_INSN_LUI, "lui", "lui", 32, | |
a92e0d0a | 864 | { 0|A(USES_RT), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
865 | }, |
866 | /* lw $rt,$lo16($base) */ | |
867 | { | |
868 | IQ2000_INSN_LW, "lw", "lw", 32, | |
a92e0d0a | 869 | { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
870 | }, |
871 | /* sb $rt,$lo16($base) */ | |
872 | { | |
873 | IQ2000_INSN_SB, "sb", "sb", 32, | |
a92e0d0a | 874 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
875 | }, |
876 | /* sh $rt,$lo16($base) */ | |
877 | { | |
878 | IQ2000_INSN_SH, "sh", "sh", 32, | |
a92e0d0a | 879 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
880 | }, |
881 | /* sw $rt,$lo16($base) */ | |
882 | { | |
883 | IQ2000_INSN_SW, "sw", "sw", 32, | |
a92e0d0a | 884 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
885 | }, |
886 | /* break */ | |
887 | { | |
888 | IQ2000_INSN_BREAK, "break", "break", 32, | |
a92e0d0a | 889 | { 0, { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
890 | }, |
891 | /* syscall */ | |
892 | { | |
893 | IQ2000_INSN_SYSCALL, "syscall", "syscall", 32, | |
a92e0d0a | 894 | { 0|A(YIELD_INSN), { { { (1<<MACH_BASE), 0 } } } } |
47b1a55a SC |
895 | }, |
896 | /* andoui $rt,$rs,$hi16 */ | |
897 | { | |
898 | IQ2000_INSN_ANDOUI, "andoui", "andoui", 32, | |
a92e0d0a | 899 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
900 | }, |
901 | /* andoui ${rt-rs},$hi16 */ | |
902 | { | |
903 | -1, "andoui2", "andoui", 32, | |
a92e0d0a | 904 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
905 | }, |
906 | /* orui ${rt-rs},$hi16 */ | |
907 | { | |
908 | -1, "orui2", "orui", 32, | |
a92e0d0a | 909 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
910 | }, |
911 | /* orui $rt,$rs,$hi16 */ | |
912 | { | |
913 | IQ2000_INSN_ORUI, "orui", "orui", 32, | |
a92e0d0a | 914 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
915 | }, |
916 | /* bgtz $rs,$offset */ | |
917 | { | |
918 | IQ2000_INSN_BGTZ, "bgtz", "bgtz", 32, | |
a92e0d0a | 919 | { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
920 | }, |
921 | /* bgtzl $rs,$offset */ | |
922 | { | |
923 | IQ2000_INSN_BGTZL, "bgtzl", "bgtzl", 32, | |
a92e0d0a | 924 | { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
925 | }, |
926 | /* blez $rs,$offset */ | |
927 | { | |
928 | IQ2000_INSN_BLEZ, "blez", "blez", 32, | |
a92e0d0a | 929 | { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
930 | }, |
931 | /* blezl $rs,$offset */ | |
932 | { | |
933 | IQ2000_INSN_BLEZL, "blezl", "blezl", 32, | |
a92e0d0a | 934 | { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
935 | }, |
936 | /* mrgb $rd,$rs,$rt,$mask */ | |
937 | { | |
938 | IQ2000_INSN_MRGB, "mrgb", "mrgb", 32, | |
a92e0d0a | 939 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
940 | }, |
941 | /* mrgb ${rd-rs},$rt,$mask */ | |
942 | { | |
943 | -1, "mrgb2", "mrgb", 32, | |
a92e0d0a | 944 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
945 | }, |
946 | /* bctxt $rs,$offset */ | |
947 | { | |
948 | IQ2000_INSN_BCTXT, "bctxt", "bctxt", 32, | |
a92e0d0a | 949 | { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
950 | }, |
951 | /* bc0f $offset */ | |
952 | { | |
953 | IQ2000_INSN_BC0F, "bc0f", "bc0f", 32, | |
a92e0d0a | 954 | { 0|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
955 | }, |
956 | /* bc0fl $offset */ | |
957 | { | |
958 | IQ2000_INSN_BC0FL, "bc0fl", "bc0fl", 32, | |
a92e0d0a | 959 | { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
960 | }, |
961 | /* bc3f $offset */ | |
962 | { | |
963 | IQ2000_INSN_BC3F, "bc3f", "bc3f", 32, | |
a92e0d0a | 964 | { 0|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
965 | }, |
966 | /* bc3fl $offset */ | |
967 | { | |
968 | IQ2000_INSN_BC3FL, "bc3fl", "bc3fl", 32, | |
a92e0d0a | 969 | { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
970 | }, |
971 | /* bc0t $offset */ | |
972 | { | |
973 | IQ2000_INSN_BC0T, "bc0t", "bc0t", 32, | |
a92e0d0a | 974 | { 0|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
975 | }, |
976 | /* bc0tl $offset */ | |
977 | { | |
978 | IQ2000_INSN_BC0TL, "bc0tl", "bc0tl", 32, | |
a92e0d0a | 979 | { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
980 | }, |
981 | /* bc3t $offset */ | |
982 | { | |
983 | IQ2000_INSN_BC3T, "bc3t", "bc3t", 32, | |
a92e0d0a | 984 | { 0|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
985 | }, |
986 | /* bc3tl $offset */ | |
987 | { | |
988 | IQ2000_INSN_BC3TL, "bc3tl", "bc3tl", 32, | |
a92e0d0a | 989 | { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
990 | }, |
991 | /* cfc0 $rt,$rd */ | |
992 | { | |
993 | IQ2000_INSN_CFC0, "cfc0", "cfc0", 32, | |
a92e0d0a | 994 | { 0|A(USES_RT)|A(LOAD_DELAY), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
995 | }, |
996 | /* cfc1 $rt,$rd */ | |
997 | { | |
998 | IQ2000_INSN_CFC1, "cfc1", "cfc1", 32, | |
a92e0d0a | 999 | { 0|A(USES_RT)|A(LOAD_DELAY), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1000 | }, |
1001 | /* cfc2 $rt,$rd */ | |
1002 | { | |
1003 | IQ2000_INSN_CFC2, "cfc2", "cfc2", 32, | |
a92e0d0a | 1004 | { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1005 | }, |
1006 | /* cfc3 $rt,$rd */ | |
1007 | { | |
1008 | IQ2000_INSN_CFC3, "cfc3", "cfc3", 32, | |
a92e0d0a | 1009 | { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1010 | }, |
1011 | /* chkhdr $rd,$rt */ | |
1012 | { | |
1013 | IQ2000_INSN_CHKHDR, "chkhdr", "chkhdr", 32, | |
a92e0d0a | 1014 | { 0|A(YIELD_INSN)|A(USES_RD)|A(LOAD_DELAY), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1015 | }, |
1016 | /* ctc0 $rt,$rd */ | |
1017 | { | |
1018 | IQ2000_INSN_CTC0, "ctc0", "ctc0", 32, | |
a92e0d0a | 1019 | { 0|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1020 | }, |
1021 | /* ctc1 $rt,$rd */ | |
1022 | { | |
1023 | IQ2000_INSN_CTC1, "ctc1", "ctc1", 32, | |
a92e0d0a | 1024 | { 0|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1025 | }, |
1026 | /* ctc2 $rt,$rd */ | |
1027 | { | |
1028 | IQ2000_INSN_CTC2, "ctc2", "ctc2", 32, | |
a92e0d0a | 1029 | { 0|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1030 | }, |
1031 | /* ctc3 $rt,$rd */ | |
1032 | { | |
1033 | IQ2000_INSN_CTC3, "ctc3", "ctc3", 32, | |
a92e0d0a | 1034 | { 0|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1035 | }, |
1036 | /* jcr $rs */ | |
1037 | { | |
1038 | IQ2000_INSN_JCR, "jcr", "jcr", 32, | |
a92e0d0a | 1039 | { 0|A(USES_RS)|A(UNCOND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1040 | }, |
1041 | /* luc32 $rt,$rd */ | |
1042 | { | |
1043 | IQ2000_INSN_LUC32, "luc32", "luc32", 32, | |
a92e0d0a | 1044 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1045 | }, |
1046 | /* luc32l $rt,$rd */ | |
1047 | { | |
1048 | IQ2000_INSN_LUC32L, "luc32l", "luc32l", 32, | |
a92e0d0a | 1049 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1050 | }, |
1051 | /* luc64 $rt,$rd */ | |
1052 | { | |
1053 | IQ2000_INSN_LUC64, "luc64", "luc64", 32, | |
a92e0d0a | 1054 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1055 | }, |
1056 | /* luc64l $rt,$rd */ | |
1057 | { | |
1058 | IQ2000_INSN_LUC64L, "luc64l", "luc64l", 32, | |
a92e0d0a | 1059 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1060 | }, |
1061 | /* luk $rt,$rd */ | |
1062 | { | |
1063 | IQ2000_INSN_LUK, "luk", "luk", 32, | |
a92e0d0a | 1064 | { 0|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1065 | }, |
1066 | /* lulck $rt */ | |
1067 | { | |
1068 | IQ2000_INSN_LULCK, "lulck", "lulck", 32, | |
a92e0d0a | 1069 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1070 | }, |
1071 | /* lum32 $rt,$rd */ | |
1072 | { | |
1073 | IQ2000_INSN_LUM32, "lum32", "lum32", 32, | |
a92e0d0a | 1074 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1075 | }, |
1076 | /* lum32l $rt,$rd */ | |
1077 | { | |
1078 | IQ2000_INSN_LUM32L, "lum32l", "lum32l", 32, | |
a92e0d0a | 1079 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1080 | }, |
1081 | /* lum64 $rt,$rd */ | |
1082 | { | |
1083 | IQ2000_INSN_LUM64, "lum64", "lum64", 32, | |
a92e0d0a | 1084 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1085 | }, |
1086 | /* lum64l $rt,$rd */ | |
1087 | { | |
1088 | IQ2000_INSN_LUM64L, "lum64l", "lum64l", 32, | |
a92e0d0a | 1089 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1090 | }, |
1091 | /* lur $rt,$rd */ | |
1092 | { | |
1093 | IQ2000_INSN_LUR, "lur", "lur", 32, | |
a92e0d0a | 1094 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1095 | }, |
1096 | /* lurl $rt,$rd */ | |
1097 | { | |
1098 | IQ2000_INSN_LURL, "lurl", "lurl", 32, | |
a92e0d0a | 1099 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1100 | }, |
1101 | /* luulck $rt */ | |
1102 | { | |
1103 | IQ2000_INSN_LUULCK, "luulck", "luulck", 32, | |
a92e0d0a | 1104 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1105 | }, |
1106 | /* mfc0 $rt,$rd */ | |
1107 | { | |
1108 | IQ2000_INSN_MFC0, "mfc0", "mfc0", 32, | |
a92e0d0a | 1109 | { 0|A(USES_RT)|A(LOAD_DELAY), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1110 | }, |
1111 | /* mfc1 $rt,$rd */ | |
1112 | { | |
1113 | IQ2000_INSN_MFC1, "mfc1", "mfc1", 32, | |
a92e0d0a | 1114 | { 0|A(USES_RT)|A(LOAD_DELAY), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1115 | }, |
1116 | /* mfc2 $rt,$rd */ | |
1117 | { | |
1118 | IQ2000_INSN_MFC2, "mfc2", "mfc2", 32, | |
a92e0d0a | 1119 | { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1120 | }, |
1121 | /* mfc3 $rt,$rd */ | |
1122 | { | |
1123 | IQ2000_INSN_MFC3, "mfc3", "mfc3", 32, | |
a92e0d0a | 1124 | { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1125 | }, |
1126 | /* mtc0 $rt,$rd */ | |
1127 | { | |
1128 | IQ2000_INSN_MTC0, "mtc0", "mtc0", 32, | |
a92e0d0a | 1129 | { 0|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1130 | }, |
1131 | /* mtc1 $rt,$rd */ | |
1132 | { | |
1133 | IQ2000_INSN_MTC1, "mtc1", "mtc1", 32, | |
a92e0d0a | 1134 | { 0|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1135 | }, |
1136 | /* mtc2 $rt,$rd */ | |
1137 | { | |
1138 | IQ2000_INSN_MTC2, "mtc2", "mtc2", 32, | |
a92e0d0a | 1139 | { 0|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1140 | }, |
1141 | /* mtc3 $rt,$rd */ | |
1142 | { | |
1143 | IQ2000_INSN_MTC3, "mtc3", "mtc3", 32, | |
a92e0d0a | 1144 | { 0|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1145 | }, |
1146 | /* pkrl $rd,$rt */ | |
1147 | { | |
1148 | IQ2000_INSN_PKRL, "pkrl", "pkrl", 32, | |
a92e0d0a | 1149 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1150 | }, |
4030fa5a | 1151 | /* pkrlr1 $rt,$_index,$count */ |
47b1a55a | 1152 | { |
4030fa5a | 1153 | IQ2000_INSN_PKRLR1, "pkrlr1", "pkrlr1", 32, |
a92e0d0a | 1154 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1155 | }, |
4030fa5a | 1156 | /* pkrlr30 $rt,$_index,$count */ |
47b1a55a | 1157 | { |
4030fa5a | 1158 | IQ2000_INSN_PKRLR30, "pkrlr30", "pkrlr30", 32, |
a92e0d0a | 1159 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1160 | }, |
1161 | /* rb $rd,$rt */ | |
1162 | { | |
1163 | IQ2000_INSN_RB, "rb", "rb", 32, | |
a92e0d0a | 1164 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1165 | }, |
4030fa5a | 1166 | /* rbr1 $rt,$_index,$count */ |
47b1a55a | 1167 | { |
4030fa5a | 1168 | IQ2000_INSN_RBR1, "rbr1", "rbr1", 32, |
a92e0d0a | 1169 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1170 | }, |
4030fa5a | 1171 | /* rbr30 $rt,$_index,$count */ |
47b1a55a | 1172 | { |
4030fa5a | 1173 | IQ2000_INSN_RBR30, "rbr30", "rbr30", 32, |
a92e0d0a | 1174 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1175 | }, |
1176 | /* rfe */ | |
1177 | { | |
1178 | IQ2000_INSN_RFE, "rfe", "rfe", 32, | |
a92e0d0a | 1179 | { 0, { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1180 | }, |
1181 | /* rx $rd,$rt */ | |
1182 | { | |
1183 | IQ2000_INSN_RX, "rx", "rx", 32, | |
a92e0d0a | 1184 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1185 | }, |
4030fa5a | 1186 | /* rxr1 $rt,$_index,$count */ |
47b1a55a | 1187 | { |
4030fa5a | 1188 | IQ2000_INSN_RXR1, "rxr1", "rxr1", 32, |
a92e0d0a | 1189 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1190 | }, |
4030fa5a | 1191 | /* rxr30 $rt,$_index,$count */ |
47b1a55a | 1192 | { |
4030fa5a | 1193 | IQ2000_INSN_RXR30, "rxr30", "rxr30", 32, |
a92e0d0a | 1194 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1195 | }, |
1196 | /* sleep */ | |
1197 | { | |
1198 | IQ2000_INSN_SLEEP, "sleep", "sleep", 32, | |
a92e0d0a | 1199 | { 0|A(YIELD_INSN), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1200 | }, |
1201 | /* srrd $rt */ | |
1202 | { | |
1203 | IQ2000_INSN_SRRD, "srrd", "srrd", 32, | |
a92e0d0a | 1204 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1205 | }, |
1206 | /* srrdl $rt */ | |
1207 | { | |
1208 | IQ2000_INSN_SRRDL, "srrdl", "srrdl", 32, | |
a92e0d0a | 1209 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1210 | }, |
1211 | /* srulck $rt */ | |
1212 | { | |
1213 | IQ2000_INSN_SRULCK, "srulck", "srulck", 32, | |
a92e0d0a | 1214 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1215 | }, |
1216 | /* srwr $rt,$rd */ | |
1217 | { | |
1218 | IQ2000_INSN_SRWR, "srwr", "srwr", 32, | |
a92e0d0a | 1219 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1220 | }, |
1221 | /* srwru $rt,$rd */ | |
1222 | { | |
1223 | IQ2000_INSN_SRWRU, "srwru", "srwru", 32, | |
a92e0d0a | 1224 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1225 | }, |
1226 | /* trapqfl */ | |
1227 | { | |
1228 | IQ2000_INSN_TRAPQFL, "trapqfl", "trapqfl", 32, | |
a92e0d0a | 1229 | { 0|A(YIELD_INSN), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1230 | }, |
1231 | /* trapqne */ | |
1232 | { | |
1233 | IQ2000_INSN_TRAPQNE, "trapqne", "trapqne", 32, | |
a92e0d0a | 1234 | { 0|A(YIELD_INSN), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1235 | }, |
1236 | /* traprel $rt */ | |
1237 | { | |
1238 | IQ2000_INSN_TRAPREL, "traprel", "traprel", 32, | |
a92e0d0a | 1239 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1240 | }, |
1241 | /* wb $rd,$rt */ | |
1242 | { | |
1243 | IQ2000_INSN_WB, "wb", "wb", 32, | |
a92e0d0a | 1244 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1245 | }, |
1246 | /* wbu $rd,$rt */ | |
1247 | { | |
1248 | IQ2000_INSN_WBU, "wbu", "wbu", 32, | |
a92e0d0a | 1249 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1250 | }, |
4030fa5a | 1251 | /* wbr1 $rt,$_index,$count */ |
47b1a55a | 1252 | { |
4030fa5a | 1253 | IQ2000_INSN_WBR1, "wbr1", "wbr1", 32, |
a92e0d0a | 1254 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1255 | }, |
4030fa5a | 1256 | /* wbr1u $rt,$_index,$count */ |
47b1a55a | 1257 | { |
4030fa5a | 1258 | IQ2000_INSN_WBR1U, "wbr1u", "wbr1u", 32, |
a92e0d0a | 1259 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1260 | }, |
4030fa5a | 1261 | /* wbr30 $rt,$_index,$count */ |
47b1a55a | 1262 | { |
4030fa5a | 1263 | IQ2000_INSN_WBR30, "wbr30", "wbr30", 32, |
a92e0d0a | 1264 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1265 | }, |
4030fa5a | 1266 | /* wbr30u $rt,$_index,$count */ |
47b1a55a | 1267 | { |
4030fa5a | 1268 | IQ2000_INSN_WBR30U, "wbr30u", "wbr30u", 32, |
a92e0d0a | 1269 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1270 | }, |
1271 | /* wx $rd,$rt */ | |
1272 | { | |
1273 | IQ2000_INSN_WX, "wx", "wx", 32, | |
a92e0d0a | 1274 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1275 | }, |
1276 | /* wxu $rd,$rt */ | |
1277 | { | |
1278 | IQ2000_INSN_WXU, "wxu", "wxu", 32, | |
a92e0d0a | 1279 | { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1280 | }, |
4030fa5a | 1281 | /* wxr1 $rt,$_index,$count */ |
47b1a55a | 1282 | { |
4030fa5a | 1283 | IQ2000_INSN_WXR1, "wxr1", "wxr1", 32, |
a92e0d0a | 1284 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1285 | }, |
4030fa5a | 1286 | /* wxr1u $rt,$_index,$count */ |
47b1a55a | 1287 | { |
4030fa5a | 1288 | IQ2000_INSN_WXR1U, "wxr1u", "wxr1u", 32, |
a92e0d0a | 1289 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1290 | }, |
4030fa5a | 1291 | /* wxr30 $rt,$_index,$count */ |
47b1a55a | 1292 | { |
4030fa5a | 1293 | IQ2000_INSN_WXR30, "wxr30", "wxr30", 32, |
a92e0d0a | 1294 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a | 1295 | }, |
4030fa5a | 1296 | /* wxr30u $rt,$_index,$count */ |
47b1a55a | 1297 | { |
4030fa5a | 1298 | IQ2000_INSN_WXR30U, "wxr30u", "wxr30u", 32, |
a92e0d0a | 1299 | { 0|A(YIELD_INSN)|A(USES_RT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1300 | }, |
1301 | /* ldw $rt,$lo16($base) */ | |
1302 | { | |
1303 | IQ2000_INSN_LDW, "ldw", "ldw", 32, | |
a92e0d0a | 1304 | { 0|A(USES_RT)|A(LOAD_DELAY)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1305 | }, |
1306 | /* sdw $rt,$lo16($base) */ | |
1307 | { | |
1308 | IQ2000_INSN_SDW, "sdw", "sdw", 32, | |
a92e0d0a | 1309 | { 0|A(USES_RT)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1310 | }, |
1311 | /* j $jmptarg */ | |
1312 | { | |
1313 | IQ2000_INSN_J, "j", "j", 32, | |
a92e0d0a | 1314 | { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1315 | }, |
1316 | /* jal $jmptarg */ | |
1317 | { | |
1318 | IQ2000_INSN_JAL, "jal", "jal", 32, | |
a92e0d0a | 1319 | { 0|A(USES_R31)|A(UNCOND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1320 | }, |
1321 | /* bmb $rs,$rt,$offset */ | |
1322 | { | |
1323 | IQ2000_INSN_BMB, "bmb", "bmb", 32, | |
a92e0d0a | 1324 | { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ2000), 0 } } } } |
47b1a55a SC |
1325 | }, |
1326 | /* andoui $rt,$rs,$hi16 */ | |
1327 | { | |
1328 | IQ2000_INSN_ANDOUI_Q10, "andoui-q10", "andoui", 32, | |
a92e0d0a | 1329 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1330 | }, |
1331 | /* andoui ${rt-rs},$hi16 */ | |
1332 | { | |
1333 | -1, "andoui2-q10", "andoui", 32, | |
a92e0d0a | 1334 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1335 | }, |
1336 | /* orui $rt,$rs,$hi16 */ | |
1337 | { | |
1338 | IQ2000_INSN_ORUI_Q10, "orui-q10", "orui", 32, | |
a92e0d0a | 1339 | { 0|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1340 | }, |
1341 | /* orui ${rt-rs},$hi16 */ | |
1342 | { | |
1343 | -1, "orui2-q10", "orui", 32, | |
a92e0d0a | 1344 | { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1345 | }, |
1346 | /* mrgb $rd,$rs,$rt,$maskq10 */ | |
1347 | { | |
1348 | IQ2000_INSN_MRGBQ10, "mrgbq10", "mrgb", 32, | |
a92e0d0a | 1349 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1350 | }, |
1351 | /* mrgb ${rd-rs},$rt,$maskq10 */ | |
1352 | { | |
1353 | -1, "mrgbq102", "mrgb", 32, | |
a92e0d0a | 1354 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1355 | }, |
1356 | /* j $jmptarg */ | |
1357 | { | |
1358 | IQ2000_INSN_JQ10, "jq10", "j", 32, | |
a92e0d0a | 1359 | { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1360 | }, |
1361 | /* jal $rt,$jmptarg */ | |
1362 | { | |
1363 | IQ2000_INSN_JALQ10, "jalq10", "jal", 32, | |
a92e0d0a | 1364 | { 0|A(USES_RT)|A(UNCOND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1365 | }, |
1366 | /* jal $jmptarg */ | |
1367 | { | |
1368 | IQ2000_INSN_JALQ10_2, "jalq10-2", "jal", 32, | |
a92e0d0a | 1369 | { 0|A(USES_RT)|A(UNCOND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1370 | }, |
1371 | /* bbil $rs($bitnum),$offset */ | |
1372 | { | |
1373 | IQ2000_INSN_BBIL, "bbil", "bbil", 32, | |
a92e0d0a | 1374 | { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1375 | }, |
1376 | /* bbinl $rs($bitnum),$offset */ | |
1377 | { | |
1378 | IQ2000_INSN_BBINL, "bbinl", "bbinl", 32, | |
a92e0d0a | 1379 | { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1380 | }, |
1381 | /* bbvl $rs,$rt,$offset */ | |
1382 | { | |
1383 | IQ2000_INSN_BBVL, "bbvl", "bbvl", 32, | |
a92e0d0a | 1384 | { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1385 | }, |
1386 | /* bbvnl $rs,$rt,$offset */ | |
1387 | { | |
1388 | IQ2000_INSN_BBVNL, "bbvnl", "bbvnl", 32, | |
a92e0d0a | 1389 | { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1390 | }, |
1391 | /* bgtzal $rs,$offset */ | |
1392 | { | |
1393 | IQ2000_INSN_BGTZAL, "bgtzal", "bgtzal", 32, | |
a92e0d0a | 1394 | { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1395 | }, |
1396 | /* bgtzall $rs,$offset */ | |
1397 | { | |
1398 | IQ2000_INSN_BGTZALL, "bgtzall", "bgtzall", 32, | |
a92e0d0a | 1399 | { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1400 | }, |
1401 | /* blezal $rs,$offset */ | |
1402 | { | |
1403 | IQ2000_INSN_BLEZAL, "blezal", "blezal", 32, | |
a92e0d0a | 1404 | { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1405 | }, |
1406 | /* blezall $rs,$offset */ | |
1407 | { | |
1408 | IQ2000_INSN_BLEZALL, "blezall", "blezall", 32, | |
a92e0d0a | 1409 | { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1410 | }, |
1411 | /* bgtz $rs,$offset */ | |
1412 | { | |
1413 | IQ2000_INSN_BGTZ_Q10, "bgtz-q10", "bgtz", 32, | |
a92e0d0a | 1414 | { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1415 | }, |
1416 | /* bgtzl $rs,$offset */ | |
1417 | { | |
1418 | IQ2000_INSN_BGTZL_Q10, "bgtzl-q10", "bgtzl", 32, | |
a92e0d0a | 1419 | { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1420 | }, |
1421 | /* blez $rs,$offset */ | |
1422 | { | |
1423 | IQ2000_INSN_BLEZ_Q10, "blez-q10", "blez", 32, | |
a92e0d0a | 1424 | { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1425 | }, |
1426 | /* blezl $rs,$offset */ | |
1427 | { | |
1428 | IQ2000_INSN_BLEZL_Q10, "blezl-q10", "blezl", 32, | |
a92e0d0a | 1429 | { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1430 | }, |
1431 | /* bmb $rs,$rt,$offset */ | |
1432 | { | |
1433 | IQ2000_INSN_BMB_Q10, "bmb-q10", "bmb", 32, | |
a92e0d0a | 1434 | { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1435 | }, |
1436 | /* bmbl $rs,$rt,$offset */ | |
1437 | { | |
1438 | IQ2000_INSN_BMBL, "bmbl", "bmbl", 32, | |
a92e0d0a | 1439 | { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1440 | }, |
1441 | /* bri $rs,$offset */ | |
1442 | { | |
1443 | IQ2000_INSN_BRI, "bri", "bri", 32, | |
a92e0d0a | 1444 | { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1445 | }, |
1446 | /* brv $rs,$offset */ | |
1447 | { | |
1448 | IQ2000_INSN_BRV, "brv", "brv", 32, | |
a92e0d0a | 1449 | { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1450 | }, |
1451 | /* bctx $rs,$offset */ | |
1452 | { | |
1453 | IQ2000_INSN_BCTX, "bctx", "bctx", 32, | |
a92e0d0a | 1454 | { 0|A(USES_RS)|A(UNCOND_CTI)|A(DELAY_SLOT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1455 | }, |
1456 | /* yield */ | |
1457 | { | |
1458 | IQ2000_INSN_YIELD, "yield", "yield", 32, | |
a92e0d0a | 1459 | { 0, { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1460 | }, |
1461 | /* crc32 $rd,$rs,$rt */ | |
1462 | { | |
1463 | IQ2000_INSN_CRC32, "crc32", "crc32", 32, | |
a92e0d0a | 1464 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1465 | }, |
1466 | /* crc32b $rd,$rs,$rt */ | |
1467 | { | |
1468 | IQ2000_INSN_CRC32B, "crc32b", "crc32b", 32, | |
a92e0d0a | 1469 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1470 | }, |
1471 | /* cnt1s $rd,$rs */ | |
1472 | { | |
1473 | IQ2000_INSN_CNT1S, "cnt1s", "cnt1s", 32, | |
a92e0d0a | 1474 | { 0|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1475 | }, |
1476 | /* avail $rd */ | |
1477 | { | |
1478 | IQ2000_INSN_AVAIL, "avail", "avail", 32, | |
a92e0d0a | 1479 | { 0|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1480 | }, |
1481 | /* free $rd,$rs */ | |
1482 | { | |
1483 | IQ2000_INSN_FREE, "free", "free", 32, | |
a92e0d0a | 1484 | { 0|A(USES_RD)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1485 | }, |
1486 | /* tstod $rd,$rs */ | |
1487 | { | |
1488 | IQ2000_INSN_TSTOD, "tstod", "tstod", 32, | |
a92e0d0a | 1489 | { 0|A(USES_RD)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1490 | }, |
1491 | /* cmphdr $rd */ | |
1492 | { | |
1493 | IQ2000_INSN_CMPHDR, "cmphdr", "cmphdr", 32, | |
a92e0d0a | 1494 | { 0|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1495 | }, |
1496 | /* mcid $rd,$rt */ | |
1497 | { | |
1498 | IQ2000_INSN_MCID, "mcid", "mcid", 32, | |
a92e0d0a | 1499 | { 0|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1500 | }, |
1501 | /* dba $rd */ | |
1502 | { | |
1503 | IQ2000_INSN_DBA, "dba", "dba", 32, | |
a92e0d0a | 1504 | { 0|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1505 | }, |
1506 | /* dbd $rd,$rs,$rt */ | |
1507 | { | |
1508 | IQ2000_INSN_DBD, "dbd", "dbd", 32, | |
a92e0d0a | 1509 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1510 | }, |
1511 | /* dpwt $rd,$rs */ | |
1512 | { | |
1513 | IQ2000_INSN_DPWT, "dpwt", "dpwt", 32, | |
a92e0d0a | 1514 | { 0|A(USES_RD)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1515 | }, |
1516 | /* chkhdr $rd,$rs */ | |
1517 | { | |
1518 | IQ2000_INSN_CHKHDRQ10, "chkhdrq10", "chkhdr", 32, | |
a92e0d0a | 1519 | { 0|A(USES_RD)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1520 | }, |
1521 | /* rba $rd,$rs,$rt */ | |
1522 | { | |
1523 | IQ2000_INSN_RBA, "rba", "rba", 32, | |
a92e0d0a | 1524 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1525 | }, |
1526 | /* rbal $rd,$rs,$rt */ | |
1527 | { | |
1528 | IQ2000_INSN_RBAL, "rbal", "rbal", 32, | |
a92e0d0a | 1529 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1530 | }, |
1531 | /* rbar $rd,$rs,$rt */ | |
1532 | { | |
1533 | IQ2000_INSN_RBAR, "rbar", "rbar", 32, | |
a92e0d0a | 1534 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1535 | }, |
1536 | /* wba $rd,$rs,$rt */ | |
1537 | { | |
1538 | IQ2000_INSN_WBA, "wba", "wba", 32, | |
a92e0d0a | 1539 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1540 | }, |
1541 | /* wbau $rd,$rs,$rt */ | |
1542 | { | |
1543 | IQ2000_INSN_WBAU, "wbau", "wbau", 32, | |
a92e0d0a | 1544 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1545 | }, |
1546 | /* wbac $rd,$rs,$rt */ | |
1547 | { | |
1548 | IQ2000_INSN_WBAC, "wbac", "wbac", 32, | |
a92e0d0a | 1549 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1550 | }, |
1551 | /* rbi $rd,$rs,$rt,$bytecount */ | |
1552 | { | |
1553 | IQ2000_INSN_RBI, "rbi", "rbi", 32, | |
a92e0d0a | 1554 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1555 | }, |
1556 | /* rbil $rd,$rs,$rt,$bytecount */ | |
1557 | { | |
1558 | IQ2000_INSN_RBIL, "rbil", "rbil", 32, | |
a92e0d0a | 1559 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1560 | }, |
1561 | /* rbir $rd,$rs,$rt,$bytecount */ | |
1562 | { | |
1563 | IQ2000_INSN_RBIR, "rbir", "rbir", 32, | |
a92e0d0a | 1564 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1565 | }, |
1566 | /* wbi $rd,$rs,$rt,$bytecount */ | |
1567 | { | |
1568 | IQ2000_INSN_WBI, "wbi", "wbi", 32, | |
a92e0d0a | 1569 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1570 | }, |
1571 | /* wbic $rd,$rs,$rt,$bytecount */ | |
1572 | { | |
1573 | IQ2000_INSN_WBIC, "wbic", "wbic", 32, | |
a92e0d0a | 1574 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1575 | }, |
1576 | /* wbiu $rd,$rs,$rt,$bytecount */ | |
1577 | { | |
1578 | IQ2000_INSN_WBIU, "wbiu", "wbiu", 32, | |
a92e0d0a | 1579 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1580 | }, |
1581 | /* pkrli $rd,$rs,$rt,$bytecount */ | |
1582 | { | |
1583 | IQ2000_INSN_PKRLI, "pkrli", "pkrli", 32, | |
a92e0d0a | 1584 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1585 | }, |
1586 | /* pkrlih $rd,$rs,$rt,$bytecount */ | |
1587 | { | |
1588 | IQ2000_INSN_PKRLIH, "pkrlih", "pkrlih", 32, | |
a92e0d0a | 1589 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1590 | }, |
1591 | /* pkrliu $rd,$rs,$rt,$bytecount */ | |
1592 | { | |
1593 | IQ2000_INSN_PKRLIU, "pkrliu", "pkrliu", 32, | |
a92e0d0a | 1594 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1595 | }, |
1596 | /* pkrlic $rd,$rs,$rt,$bytecount */ | |
1597 | { | |
1598 | IQ2000_INSN_PKRLIC, "pkrlic", "pkrlic", 32, | |
a92e0d0a | 1599 | { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1600 | }, |
1601 | /* pkrla $rd,$rs,$rt */ | |
1602 | { | |
1603 | IQ2000_INSN_PKRLA, "pkrla", "pkrla", 32, | |
a92e0d0a | 1604 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1605 | }, |
1606 | /* pkrlau $rd,$rs,$rt */ | |
1607 | { | |
1608 | IQ2000_INSN_PKRLAU, "pkrlau", "pkrlau", 32, | |
a92e0d0a | 1609 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1610 | }, |
1611 | /* pkrlah $rd,$rs,$rt */ | |
1612 | { | |
1613 | IQ2000_INSN_PKRLAH, "pkrlah", "pkrlah", 32, | |
a92e0d0a | 1614 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1615 | }, |
1616 | /* pkrlac $rd,$rs,$rt */ | |
1617 | { | |
1618 | IQ2000_INSN_PKRLAC, "pkrlac", "pkrlac", 32, | |
a92e0d0a | 1619 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1620 | }, |
1621 | /* lock $rd,$rt */ | |
1622 | { | |
1623 | IQ2000_INSN_LOCK, "lock", "lock", 32, | |
a92e0d0a | 1624 | { 0|A(USES_RT)|A(USES_RD), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1625 | }, |
1626 | /* unlk $rd,$rt */ | |
1627 | { | |
1628 | IQ2000_INSN_UNLK, "unlk", "unlk", 32, | |
a92e0d0a | 1629 | { 0|A(USES_RD)|A(USES_RT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1630 | }, |
1631 | /* swrd $rd,$rt */ | |
1632 | { | |
1633 | IQ2000_INSN_SWRD, "swrd", "swrd", 32, | |
a92e0d0a | 1634 | { 0|A(USES_RD)|A(USES_RT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1635 | }, |
1636 | /* swrdl $rd,$rt */ | |
1637 | { | |
1638 | IQ2000_INSN_SWRDL, "swrdl", "swrdl", 32, | |
a92e0d0a | 1639 | { 0|A(USES_RD)|A(USES_RT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1640 | }, |
1641 | /* swwr $rd,$rs,$rt */ | |
1642 | { | |
1643 | IQ2000_INSN_SWWR, "swwr", "swwr", 32, | |
a92e0d0a | 1644 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1645 | }, |
1646 | /* swwru $rd,$rs,$rt */ | |
1647 | { | |
1648 | IQ2000_INSN_SWWRU, "swwru", "swwru", 32, | |
a92e0d0a | 1649 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1650 | }, |
1651 | /* dwrd $rd,$rt */ | |
1652 | { | |
1653 | IQ2000_INSN_DWRD, "dwrd", "dwrd", 32, | |
a92e0d0a | 1654 | { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1655 | }, |
1656 | /* dwrdl $rd,$rt */ | |
1657 | { | |
1658 | IQ2000_INSN_DWRDL, "dwrdl", "dwrdl", 32, | |
a92e0d0a | 1659 | { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1660 | }, |
1661 | /* cam36 $rd,$rt,${cam-z},${cam-y} */ | |
1662 | { | |
1663 | IQ2000_INSN_CAM36, "cam36", "cam36", 32, | |
a92e0d0a | 1664 | { 0|A(USES_RD)|A(USES_RT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1665 | }, |
1666 | /* cam72 $rd,$rt,${cam-y},${cam-z} */ | |
1667 | { | |
1668 | IQ2000_INSN_CAM72, "cam72", "cam72", 32, | |
a92e0d0a | 1669 | { 0|A(USES_RD)|A(USES_RT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1670 | }, |
1671 | /* cam144 $rd,$rt,${cam-y},${cam-z} */ | |
1672 | { | |
1673 | IQ2000_INSN_CAM144, "cam144", "cam144", 32, | |
a92e0d0a | 1674 | { 0|A(USES_RD)|A(USES_RT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1675 | }, |
1676 | /* cam288 $rd,$rt,${cam-y},${cam-z} */ | |
1677 | { | |
1678 | IQ2000_INSN_CAM288, "cam288", "cam288", 32, | |
a92e0d0a | 1679 | { 0|A(USES_RD)|A(USES_RT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1680 | }, |
1681 | /* cm32and $rd,$rs,$rt */ | |
1682 | { | |
1683 | IQ2000_INSN_CM32AND, "cm32and", "cm32and", 32, | |
a92e0d0a | 1684 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1685 | }, |
1686 | /* cm32andn $rd,$rs,$rt */ | |
1687 | { | |
1688 | IQ2000_INSN_CM32ANDN, "cm32andn", "cm32andn", 32, | |
a92e0d0a | 1689 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1690 | }, |
1691 | /* cm32or $rd,$rs,$rt */ | |
1692 | { | |
1693 | IQ2000_INSN_CM32OR, "cm32or", "cm32or", 32, | |
a92e0d0a | 1694 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1695 | }, |
1696 | /* cm32ra $rd,$rs,$rt */ | |
1697 | { | |
1698 | IQ2000_INSN_CM32RA, "cm32ra", "cm32ra", 32, | |
a92e0d0a | 1699 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1700 | }, |
1701 | /* cm32rd $rd,$rt */ | |
1702 | { | |
1703 | IQ2000_INSN_CM32RD, "cm32rd", "cm32rd", 32, | |
a92e0d0a | 1704 | { 0|A(USES_RD)|A(USES_RT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1705 | }, |
1706 | /* cm32ri $rd,$rt */ | |
1707 | { | |
1708 | IQ2000_INSN_CM32RI, "cm32ri", "cm32ri", 32, | |
a92e0d0a | 1709 | { 0|A(USES_RD)|A(USES_RT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1710 | }, |
1711 | /* cm32rs $rd,$rs,$rt */ | |
1712 | { | |
1713 | IQ2000_INSN_CM32RS, "cm32rs", "cm32rs", 32, | |
a92e0d0a | 1714 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1715 | }, |
1716 | /* cm32sa $rd,$rs,$rt */ | |
1717 | { | |
1718 | IQ2000_INSN_CM32SA, "cm32sa", "cm32sa", 32, | |
a92e0d0a | 1719 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1720 | }, |
1721 | /* cm32sd $rd,$rt */ | |
1722 | { | |
1723 | IQ2000_INSN_CM32SD, "cm32sd", "cm32sd", 32, | |
a92e0d0a | 1724 | { 0|A(USES_RD)|A(USES_RT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1725 | }, |
1726 | /* cm32si $rd,$rt */ | |
1727 | { | |
1728 | IQ2000_INSN_CM32SI, "cm32si", "cm32si", 32, | |
a92e0d0a | 1729 | { 0|A(USES_RD)|A(USES_RT), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1730 | }, |
1731 | /* cm32ss $rd,$rs,$rt */ | |
1732 | { | |
1733 | IQ2000_INSN_CM32SS, "cm32ss", "cm32ss", 32, | |
a92e0d0a | 1734 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1735 | }, |
1736 | /* cm32xor $rd,$rs,$rt */ | |
1737 | { | |
1738 | IQ2000_INSN_CM32XOR, "cm32xor", "cm32xor", 32, | |
a92e0d0a | 1739 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1740 | }, |
1741 | /* cm64clr $rd,$rt */ | |
1742 | { | |
1743 | IQ2000_INSN_CM64CLR, "cm64clr", "cm64clr", 32, | |
a92e0d0a | 1744 | { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1745 | }, |
1746 | /* cm64ra $rd,$rs,$rt */ | |
1747 | { | |
1748 | IQ2000_INSN_CM64RA, "cm64ra", "cm64ra", 32, | |
a92e0d0a | 1749 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1750 | }, |
1751 | /* cm64rd $rd,$rt */ | |
1752 | { | |
1753 | IQ2000_INSN_CM64RD, "cm64rd", "cm64rd", 32, | |
a92e0d0a | 1754 | { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1755 | }, |
1756 | /* cm64ri $rd,$rt */ | |
1757 | { | |
1758 | IQ2000_INSN_CM64RI, "cm64ri", "cm64ri", 32, | |
a92e0d0a | 1759 | { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1760 | }, |
1761 | /* cm64ria2 $rd,$rs,$rt */ | |
1762 | { | |
1763 | IQ2000_INSN_CM64RIA2, "cm64ria2", "cm64ria2", 32, | |
a92e0d0a | 1764 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1765 | }, |
1766 | /* cm64rs $rd,$rs,$rt */ | |
1767 | { | |
1768 | IQ2000_INSN_CM64RS, "cm64rs", "cm64rs", 32, | |
a92e0d0a | 1769 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1770 | }, |
1771 | /* cm64sa $rd,$rs,$rt */ | |
1772 | { | |
1773 | IQ2000_INSN_CM64SA, "cm64sa", "cm64sa", 32, | |
a92e0d0a | 1774 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1775 | }, |
1776 | /* cm64sd $rd,$rt */ | |
1777 | { | |
1778 | IQ2000_INSN_CM64SD, "cm64sd", "cm64sd", 32, | |
a92e0d0a | 1779 | { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1780 | }, |
1781 | /* cm64si $rd,$rt */ | |
1782 | { | |
1783 | IQ2000_INSN_CM64SI, "cm64si", "cm64si", 32, | |
a92e0d0a | 1784 | { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1785 | }, |
1786 | /* cm64sia2 $rd,$rs,$rt */ | |
1787 | { | |
1788 | IQ2000_INSN_CM64SIA2, "cm64sia2", "cm64sia2", 32, | |
a92e0d0a | 1789 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1790 | }, |
1791 | /* cm64ss $rd,$rs,$rt */ | |
1792 | { | |
1793 | IQ2000_INSN_CM64SS, "cm64ss", "cm64ss", 32, | |
a92e0d0a | 1794 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1795 | }, |
1796 | /* cm128ria2 $rd,$rs,$rt */ | |
1797 | { | |
1798 | IQ2000_INSN_CM128RIA2, "cm128ria2", "cm128ria2", 32, | |
a92e0d0a | 1799 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1800 | }, |
1801 | /* cm128ria3 $rd,$rs,$rt,${cm-3z} */ | |
1802 | { | |
1803 | IQ2000_INSN_CM128RIA3, "cm128ria3", "cm128ria3", 32, | |
a92e0d0a | 1804 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1805 | }, |
1806 | /* cm128ria4 $rd,$rs,$rt,${cm-4z} */ | |
1807 | { | |
1808 | IQ2000_INSN_CM128RIA4, "cm128ria4", "cm128ria4", 32, | |
a92e0d0a | 1809 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1810 | }, |
1811 | /* cm128sia2 $rd,$rs,$rt */ | |
1812 | { | |
1813 | IQ2000_INSN_CM128SIA2, "cm128sia2", "cm128sia2", 32, | |
a92e0d0a | 1814 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1815 | }, |
1816 | /* cm128sia3 $rd,$rs,$rt,${cm-3z} */ | |
1817 | { | |
1818 | IQ2000_INSN_CM128SIA3, "cm128sia3", "cm128sia3", 32, | |
a92e0d0a | 1819 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1820 | }, |
1821 | /* cm128sia4 $rd,$rs,$rt,${cm-4z} */ | |
1822 | { | |
1823 | IQ2000_INSN_CM128SIA4, "cm128sia4", "cm128sia4", 32, | |
a92e0d0a | 1824 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1825 | }, |
1826 | /* cm128vsa $rd,$rs,$rt */ | |
1827 | { | |
1828 | IQ2000_INSN_CM128VSA, "cm128vsa", "cm128vsa", 32, | |
a92e0d0a | 1829 | { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1830 | }, |
1831 | /* cfc $rd,$rt */ | |
1832 | { | |
1833 | IQ2000_INSN_CFC, "cfc", "cfc", 32, | |
a92e0d0a | 1834 | { 0|A(YIELD_INSN)|A(USES_RD)|A(LOAD_DELAY), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1835 | }, |
1836 | /* ctc $rs,$rt */ | |
1837 | { | |
1838 | IQ2000_INSN_CTC, "ctc", "ctc", 32, | |
a92e0d0a | 1839 | { 0|A(USES_RS), { { { (1<<MACH_IQ10), 0 } } } } |
47b1a55a SC |
1840 | }, |
1841 | }; | |
1842 | ||
1843 | #undef OP | |
1844 | #undef A | |
1845 | ||
1846 | /* Initialize anything needed to be done once, before any cpu_open call. */ | |
47b1a55a SC |
1847 | |
1848 | static void | |
47b0e7ad | 1849 | init_tables (void) |
47b1a55a SC |
1850 | { |
1851 | } | |
1852 | ||
a6743a54 AM |
1853 | #ifndef opcodes_error_handler |
1854 | #define opcodes_error_handler(...) \ | |
1855 | fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr) | |
1856 | #endif | |
1857 | ||
47b0e7ad NC |
1858 | static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); |
1859 | static void build_hw_table (CGEN_CPU_TABLE *); | |
1860 | static void build_ifield_table (CGEN_CPU_TABLE *); | |
1861 | static void build_operand_table (CGEN_CPU_TABLE *); | |
1862 | static void build_insn_table (CGEN_CPU_TABLE *); | |
1863 | static void iq2000_cgen_rebuild_tables (CGEN_CPU_TABLE *); | |
47b1a55a SC |
1864 | |
1865 | /* Subroutine of iq2000_cgen_cpu_open to look up a mach via its bfd name. */ | |
1866 | ||
1867 | static const CGEN_MACH * | |
47b0e7ad | 1868 | lookup_mach_via_bfd_name (const CGEN_MACH *table, const char *name) |
47b1a55a SC |
1869 | { |
1870 | while (table->name) | |
1871 | { | |
1872 | if (strcmp (name, table->bfd_name) == 0) | |
1873 | return table; | |
1874 | ++table; | |
1875 | } | |
42742084 | 1876 | return NULL; |
47b1a55a SC |
1877 | } |
1878 | ||
1879 | /* Subroutine of iq2000_cgen_cpu_open to build the hardware table. */ | |
1880 | ||
1881 | static void | |
47b0e7ad | 1882 | build_hw_table (CGEN_CPU_TABLE *cd) |
47b1a55a SC |
1883 | { |
1884 | int i; | |
1885 | int machs = cd->machs; | |
1886 | const CGEN_HW_ENTRY *init = & iq2000_cgen_hw_table[0]; | |
1887 | /* MAX_HW is only an upper bound on the number of selected entries. | |
1888 | However each entry is indexed by it's enum so there can be holes in | |
1889 | the table. */ | |
1890 | const CGEN_HW_ENTRY **selected = | |
1891 | (const CGEN_HW_ENTRY **) xmalloc (MAX_HW * sizeof (CGEN_HW_ENTRY *)); | |
1892 | ||
1893 | cd->hw_table.init_entries = init; | |
1894 | cd->hw_table.entry_size = sizeof (CGEN_HW_ENTRY); | |
1895 | memset (selected, 0, MAX_HW * sizeof (CGEN_HW_ENTRY *)); | |
1896 | /* ??? For now we just use machs to determine which ones we want. */ | |
1897 | for (i = 0; init[i].name != NULL; ++i) | |
1898 | if (CGEN_HW_ATTR_VALUE (&init[i], CGEN_HW_MACH) | |
1899 | & machs) | |
1900 | selected[init[i].type] = &init[i]; | |
1901 | cd->hw_table.entries = selected; | |
1902 | cd->hw_table.num_entries = MAX_HW; | |
1903 | } | |
1904 | ||
1905 | /* Subroutine of iq2000_cgen_cpu_open to build the hardware table. */ | |
1906 | ||
1907 | static void | |
47b0e7ad | 1908 | build_ifield_table (CGEN_CPU_TABLE *cd) |
47b1a55a SC |
1909 | { |
1910 | cd->ifld_table = & iq2000_cgen_ifld_table[0]; | |
1911 | } | |
1912 | ||
1913 | /* Subroutine of iq2000_cgen_cpu_open to build the hardware table. */ | |
1914 | ||
1915 | static void | |
47b0e7ad | 1916 | build_operand_table (CGEN_CPU_TABLE *cd) |
47b1a55a SC |
1917 | { |
1918 | int i; | |
1919 | int machs = cd->machs; | |
1920 | const CGEN_OPERAND *init = & iq2000_cgen_operand_table[0]; | |
1921 | /* MAX_OPERANDS is only an upper bound on the number of selected entries. | |
1922 | However each entry is indexed by it's enum so there can be holes in | |
1923 | the table. */ | |
47b0e7ad | 1924 | const CGEN_OPERAND **selected = xmalloc (MAX_OPERANDS * sizeof (* selected)); |
47b1a55a SC |
1925 | |
1926 | cd->operand_table.init_entries = init; | |
1927 | cd->operand_table.entry_size = sizeof (CGEN_OPERAND); | |
1928 | memset (selected, 0, MAX_OPERANDS * sizeof (CGEN_OPERAND *)); | |
1929 | /* ??? For now we just use mach to determine which ones we want. */ | |
1930 | for (i = 0; init[i].name != NULL; ++i) | |
1931 | if (CGEN_OPERAND_ATTR_VALUE (&init[i], CGEN_OPERAND_MACH) | |
1932 | & machs) | |
1933 | selected[init[i].type] = &init[i]; | |
1934 | cd->operand_table.entries = selected; | |
1935 | cd->operand_table.num_entries = MAX_OPERANDS; | |
1936 | } | |
1937 | ||
1938 | /* Subroutine of iq2000_cgen_cpu_open to build the hardware table. | |
1939 | ??? This could leave out insns not supported by the specified mach/isa, | |
1940 | but that would cause errors like "foo only supported by bar" to become | |
1941 | "unknown insn", so for now we include all insns and require the app to | |
1942 | do the checking later. | |
1943 | ??? On the other hand, parsing of such insns may require their hardware or | |
1944 | operand elements to be in the table [which they mightn't be]. */ | |
1945 | ||
1946 | static void | |
47b0e7ad | 1947 | build_insn_table (CGEN_CPU_TABLE *cd) |
47b1a55a SC |
1948 | { |
1949 | int i; | |
1950 | const CGEN_IBASE *ib = & iq2000_cgen_insn_table[0]; | |
47b0e7ad | 1951 | CGEN_INSN *insns = xmalloc (MAX_INSNS * sizeof (CGEN_INSN)); |
47b1a55a SC |
1952 | |
1953 | memset (insns, 0, MAX_INSNS * sizeof (CGEN_INSN)); | |
1954 | for (i = 0; i < MAX_INSNS; ++i) | |
1955 | insns[i].base = &ib[i]; | |
1956 | cd->insn_table.init_entries = insns; | |
1957 | cd->insn_table.entry_size = sizeof (CGEN_IBASE); | |
1958 | cd->insn_table.num_init_entries = MAX_INSNS; | |
1959 | } | |
1960 | ||
1961 | /* Subroutine of iq2000_cgen_cpu_open to rebuild the tables. */ | |
1962 | ||
1963 | static void | |
47b0e7ad | 1964 | iq2000_cgen_rebuild_tables (CGEN_CPU_TABLE *cd) |
47b1a55a SC |
1965 | { |
1966 | int i; | |
a92e0d0a | 1967 | CGEN_BITSET *isas = cd->isas; |
47b1a55a SC |
1968 | unsigned int machs = cd->machs; |
1969 | ||
1970 | cd->int_insn_p = CGEN_INT_INSN_P; | |
1971 | ||
1972 | /* Data derived from the isa spec. */ | |
1973 | #define UNSET (CGEN_SIZE_UNKNOWN + 1) | |
1974 | cd->default_insn_bitsize = UNSET; | |
1975 | cd->base_insn_bitsize = UNSET; | |
47b0e7ad | 1976 | cd->min_insn_bitsize = 65535; /* Some ridiculously big number. */ |
47b1a55a SC |
1977 | cd->max_insn_bitsize = 0; |
1978 | for (i = 0; i < MAX_ISAS; ++i) | |
a92e0d0a | 1979 | if (cgen_bitset_contains (isas, i)) |
47b1a55a SC |
1980 | { |
1981 | const CGEN_ISA *isa = & iq2000_cgen_isa_table[i]; | |
1982 | ||
1983 | /* Default insn sizes of all selected isas must be | |
1984 | equal or we set the result to 0, meaning "unknown". */ | |
1985 | if (cd->default_insn_bitsize == UNSET) | |
1986 | cd->default_insn_bitsize = isa->default_insn_bitsize; | |
1987 | else if (isa->default_insn_bitsize == cd->default_insn_bitsize) | |
47b0e7ad | 1988 | ; /* This is ok. */ |
47b1a55a SC |
1989 | else |
1990 | cd->default_insn_bitsize = CGEN_SIZE_UNKNOWN; | |
1991 | ||
1992 | /* Base insn sizes of all selected isas must be equal | |
1993 | or we set the result to 0, meaning "unknown". */ | |
1994 | if (cd->base_insn_bitsize == UNSET) | |
1995 | cd->base_insn_bitsize = isa->base_insn_bitsize; | |
1996 | else if (isa->base_insn_bitsize == cd->base_insn_bitsize) | |
47b0e7ad | 1997 | ; /* This is ok. */ |
47b1a55a SC |
1998 | else |
1999 | cd->base_insn_bitsize = CGEN_SIZE_UNKNOWN; | |
2000 | ||
2001 | /* Set min,max insn sizes. */ | |
2002 | if (isa->min_insn_bitsize < cd->min_insn_bitsize) | |
2003 | cd->min_insn_bitsize = isa->min_insn_bitsize; | |
2004 | if (isa->max_insn_bitsize > cd->max_insn_bitsize) | |
2005 | cd->max_insn_bitsize = isa->max_insn_bitsize; | |
2006 | } | |
2007 | ||
2008 | /* Data derived from the mach spec. */ | |
2009 | for (i = 0; i < MAX_MACHS; ++i) | |
2010 | if (((1 << i) & machs) != 0) | |
2011 | { | |
2012 | const CGEN_MACH *mach = & iq2000_cgen_mach_table[i]; | |
2013 | ||
2014 | if (mach->insn_chunk_bitsize != 0) | |
2015 | { | |
2016 | if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) | |
2017 | { | |
a6743a54 AM |
2018 | opcodes_error_handler |
2019 | (/* xgettext:c-format */ | |
2020 | _("internal error: iq2000_cgen_rebuild_tables: " | |
2021 | "conflicting insn-chunk-bitsize values: `%d' vs. `%d'"), | |
2022 | cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); | |
47b1a55a SC |
2023 | abort (); |
2024 | } | |
2025 | ||
2026 | cd->insn_chunk_bitsize = mach->insn_chunk_bitsize; | |
2027 | } | |
2028 | } | |
2029 | ||
2030 | /* Determine which hw elements are used by MACH. */ | |
2031 | build_hw_table (cd); | |
2032 | ||
2033 | /* Build the ifield table. */ | |
2034 | build_ifield_table (cd); | |
2035 | ||
2036 | /* Determine which operands are used by MACH/ISA. */ | |
2037 | build_operand_table (cd); | |
2038 | ||
2039 | /* Build the instruction table. */ | |
2040 | build_insn_table (cd); | |
2041 | } | |
2042 | ||
2043 | /* Initialize a cpu table and return a descriptor. | |
2044 | It's much like opening a file, and must be the first function called. | |
2045 | The arguments are a set of (type/value) pairs, terminated with | |
2046 | CGEN_CPU_OPEN_END. | |
2047 | ||
2048 | Currently supported values: | |
2049 | CGEN_CPU_OPEN_ISAS: bitmap of values in enum isa_attr | |
2050 | CGEN_CPU_OPEN_MACHS: bitmap of values in enum mach_attr | |
2051 | CGEN_CPU_OPEN_BFDMACH: specify 1 mach using bfd name | |
2052 | CGEN_CPU_OPEN_ENDIAN: specify endian choice | |
b3db6d07 | 2053 | CGEN_CPU_OPEN_INSN_ENDIAN: specify instruction endian choice |
47b1a55a SC |
2054 | CGEN_CPU_OPEN_END: terminates arguments |
2055 | ||
2056 | ??? Simultaneous multiple isas might not make sense, but it's not (yet) | |
37ec9240 | 2057 | precluded. */ |
47b1a55a SC |
2058 | |
2059 | CGEN_CPU_DESC | |
2060 | iq2000_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) | |
2061 | { | |
2062 | CGEN_CPU_TABLE *cd = (CGEN_CPU_TABLE *) xmalloc (sizeof (CGEN_CPU_TABLE)); | |
2063 | static int init_p; | |
a92e0d0a | 2064 | CGEN_BITSET *isas = 0; /* 0 = "unspecified" */ |
47b1a55a SC |
2065 | unsigned int machs = 0; /* 0 = "unspecified" */ |
2066 | enum cgen_endian endian = CGEN_ENDIAN_UNKNOWN; | |
b3db6d07 | 2067 | enum cgen_endian insn_endian = CGEN_ENDIAN_UNKNOWN; |
47b1a55a SC |
2068 | va_list ap; |
2069 | ||
2070 | if (! init_p) | |
2071 | { | |
2072 | init_tables (); | |
2073 | init_p = 1; | |
2074 | } | |
2075 | ||
2076 | memset (cd, 0, sizeof (*cd)); | |
2077 | ||
2078 | va_start (ap, arg_type); | |
2079 | while (arg_type != CGEN_CPU_OPEN_END) | |
2080 | { | |
2081 | switch (arg_type) | |
2082 | { | |
2083 | case CGEN_CPU_OPEN_ISAS : | |
a92e0d0a | 2084 | isas = va_arg (ap, CGEN_BITSET *); |
47b1a55a SC |
2085 | break; |
2086 | case CGEN_CPU_OPEN_MACHS : | |
2087 | machs = va_arg (ap, unsigned int); | |
2088 | break; | |
2089 | case CGEN_CPU_OPEN_BFDMACH : | |
2090 | { | |
2091 | const char *name = va_arg (ap, const char *); | |
2092 | const CGEN_MACH *mach = | |
2093 | lookup_mach_via_bfd_name (iq2000_cgen_mach_table, name); | |
2094 | ||
42742084 AM |
2095 | if (mach != NULL) |
2096 | machs |= 1 << mach->num; | |
47b1a55a SC |
2097 | break; |
2098 | } | |
2099 | case CGEN_CPU_OPEN_ENDIAN : | |
2100 | endian = va_arg (ap, enum cgen_endian); | |
2101 | break; | |
b3db6d07 JM |
2102 | case CGEN_CPU_OPEN_INSN_ENDIAN : |
2103 | insn_endian = va_arg (ap, enum cgen_endian); | |
2104 | break; | |
47b1a55a | 2105 | default : |
a6743a54 AM |
2106 | opcodes_error_handler |
2107 | (/* xgettext:c-format */ | |
2108 | _("internal error: iq2000_cgen_cpu_open: " | |
2109 | "unsupported argument `%d'"), | |
2110 | arg_type); | |
47b1a55a SC |
2111 | abort (); /* ??? return NULL? */ |
2112 | } | |
2113 | arg_type = va_arg (ap, enum cgen_cpu_open_arg); | |
2114 | } | |
2115 | va_end (ap); | |
2116 | ||
47b0e7ad | 2117 | /* Mach unspecified means "all". */ |
47b1a55a SC |
2118 | if (machs == 0) |
2119 | machs = (1 << MAX_MACHS) - 1; | |
47b0e7ad | 2120 | /* Base mach is always selected. */ |
47b1a55a | 2121 | machs |= 1; |
47b1a55a SC |
2122 | if (endian == CGEN_ENDIAN_UNKNOWN) |
2123 | { | |
2124 | /* ??? If target has only one, could have a default. */ | |
a6743a54 AM |
2125 | opcodes_error_handler |
2126 | (/* xgettext:c-format */ | |
2127 | _("internal error: iq2000_cgen_cpu_open: no endianness specified")); | |
47b1a55a SC |
2128 | abort (); |
2129 | } | |
2130 | ||
a92e0d0a | 2131 | cd->isas = cgen_bitset_copy (isas); |
47b1a55a SC |
2132 | cd->machs = machs; |
2133 | cd->endian = endian; | |
b3db6d07 JM |
2134 | cd->insn_endian |
2135 | = (insn_endian == CGEN_ENDIAN_UNKNOWN ? endian : insn_endian); | |
47b1a55a SC |
2136 | |
2137 | /* Table (re)builder. */ | |
2138 | cd->rebuild_tables = iq2000_cgen_rebuild_tables; | |
2139 | iq2000_cgen_rebuild_tables (cd); | |
2140 | ||
2141 | /* Default to not allowing signed overflow. */ | |
2142 | cd->signed_overflow_ok_p = 0; | |
43e65147 | 2143 | |
47b1a55a SC |
2144 | return (CGEN_CPU_DESC) cd; |
2145 | } | |
2146 | ||
2147 | /* Cover fn to iq2000_cgen_cpu_open to handle the simple case of 1 isa, 1 mach. | |
2148 | MACH_NAME is the bfd name of the mach. */ | |
2149 | ||
2150 | CGEN_CPU_DESC | |
47b0e7ad | 2151 | iq2000_cgen_cpu_open_1 (const char *mach_name, enum cgen_endian endian) |
47b1a55a SC |
2152 | { |
2153 | return iq2000_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name, | |
2154 | CGEN_CPU_OPEN_ENDIAN, endian, | |
2155 | CGEN_CPU_OPEN_END); | |
2156 | } | |
2157 | ||
2158 | /* Close a cpu table. | |
2159 | ??? This can live in a machine independent file, but there's currently | |
2160 | no place to put this file (there's no libcgen). libopcodes is the wrong | |
2161 | place as some simulator ports use this but they don't use libopcodes. */ | |
2162 | ||
2163 | void | |
47b0e7ad | 2164 | iq2000_cgen_cpu_close (CGEN_CPU_DESC cd) |
47b1a55a SC |
2165 | { |
2166 | unsigned int i; | |
75798298 | 2167 | const CGEN_INSN *insns; |
47b1a55a SC |
2168 | |
2169 | if (cd->macro_insn_table.init_entries) | |
2170 | { | |
2171 | insns = cd->macro_insn_table.init_entries; | |
2172 | for (i = 0; i < cd->macro_insn_table.num_init_entries; ++i, ++insns) | |
47b0e7ad NC |
2173 | if (CGEN_INSN_RX ((insns))) |
2174 | regfree (CGEN_INSN_RX (insns)); | |
47b1a55a SC |
2175 | } |
2176 | ||
2177 | if (cd->insn_table.init_entries) | |
2178 | { | |
2179 | insns = cd->insn_table.init_entries; | |
2180 | for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns) | |
47b0e7ad NC |
2181 | if (CGEN_INSN_RX (insns)) |
2182 | regfree (CGEN_INSN_RX (insns)); | |
43e65147 | 2183 | } |
47b1a55a | 2184 | |
d96bf37b AM |
2185 | free ((CGEN_INSN *) cd->macro_insn_table.init_entries); |
2186 | free ((CGEN_INSN *) cd->insn_table.init_entries); | |
2187 | free ((CGEN_HW_ENTRY *) cd->hw_table.entries); | |
2188 | free ((CGEN_HW_ENTRY *) cd->operand_table.entries); | |
47b1a55a SC |
2189 | free (cd); |
2190 | } | |
2191 |