Introduce refresh_window method
[deliverable/binutils-gdb.git] / opcodes / bpf-opc.c
CommitLineData
79472b45
JM
1/* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */
2/* Instruction opcode table for bpf.
3
4THIS FILE IS MACHINE GENERATED WITH CGEN.
5
6Copyright (C) 1996-2019 Free Software Foundation, Inc.
7
8This file is part of the GNU Binutils and/or GDB, the GNU debugger.
9
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.
14
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.
19
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.
23
24*/
25
26#include "sysdep.h"
27#include "ansidecl.h"
28#include "bfd.h"
29#include "symcat.h"
30#include "bpf-desc.h"
31#include "bpf-opc.h"
32#include "libiberty.h"
33
34/* -- opc.c */
35\f
36/* -- asm.c */
37/* The hash functions are recorded here to help keep assembler code out of
38 the disassembler and vice versa. */
39
40static int asm_hash_insn_p (const CGEN_INSN *);
41static unsigned int asm_hash_insn (const char *);
42static int dis_hash_insn_p (const CGEN_INSN *);
43static unsigned int dis_hash_insn (const char *, CGEN_INSN_INT);
44
45/* Instruction formats. */
46
47#define F(f) & bpf_cgen_ifld_table[BPF_##f]
48static const CGEN_IFMT ifmt_empty ATTRIBUTE_UNUSED = {
49 0, 0, 0x0, { { 0 } }
50};
51
52static const CGEN_IFMT ifmt_addile ATTRIBUTE_UNUSED = {
53 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
54};
55
56static const CGEN_IFMT ifmt_addrle ATTRIBUTE_UNUSED = {
57 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
58};
59
60static const CGEN_IFMT ifmt_negle ATTRIBUTE_UNUSED = {
61 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
62};
63
64static const CGEN_IFMT ifmt_addibe ATTRIBUTE_UNUSED = {
65 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
66};
67
68static const CGEN_IFMT ifmt_addrbe ATTRIBUTE_UNUSED = {
69 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
70};
71
72static const CGEN_IFMT ifmt_negbe ATTRIBUTE_UNUSED = {
73 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
74};
75
76static const CGEN_IFMT ifmt_endlele ATTRIBUTE_UNUSED = {
77 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
78};
79
80static const CGEN_IFMT ifmt_endlebe ATTRIBUTE_UNUSED = {
81 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
82};
83
84static const CGEN_IFMT ifmt_lddwle ATTRIBUTE_UNUSED = {
85 8, 128, 0xff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
86};
87
88static const CGEN_IFMT ifmt_lddwbe ATTRIBUTE_UNUSED = {
89 8, 128, 0xff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
90};
91
92static const CGEN_IFMT ifmt_ldabswle ATTRIBUTE_UNUSED = {
93 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
94};
95
96static const CGEN_IFMT ifmt_ldabswbe ATTRIBUTE_UNUSED = {
97 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
98};
99
100static const CGEN_IFMT ifmt_ldxwle ATTRIBUTE_UNUSED = {
101 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
102};
103
104static const CGEN_IFMT ifmt_ldxwbe ATTRIBUTE_UNUSED = {
105 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
106};
107
108static const CGEN_IFMT ifmt_stble ATTRIBUTE_UNUSED = {
109 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
110};
111
112static const CGEN_IFMT ifmt_stbbe ATTRIBUTE_UNUSED = {
113 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
114};
115
116static const CGEN_IFMT ifmt_jeqile ATTRIBUTE_UNUSED = {
117 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
118};
119
120static const CGEN_IFMT ifmt_jeqrle ATTRIBUTE_UNUSED = {
121 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
122};
123
124static const CGEN_IFMT ifmt_jeqibe ATTRIBUTE_UNUSED = {
125 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
126};
127
128static const CGEN_IFMT ifmt_jeqrbe ATTRIBUTE_UNUSED = {
129 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
130};
131
132static const CGEN_IFMT ifmt_ja ATTRIBUTE_UNUSED = {
133 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
134};
135
136static const CGEN_IFMT ifmt_call ATTRIBUTE_UNUSED = {
137 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
138};
139
140static const CGEN_IFMT ifmt_exit ATTRIBUTE_UNUSED = {
141 8, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
142};
143
144#undef F
145
146#define A(a) (1 << CGEN_INSN_##a)
147#define OPERAND(op) BPF_OPERAND_##op
148#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
149#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
150
151/* The instruction table. */
152
153static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
154{
155 /* Special null first entry.
156 A `num' value of zero is thus invalid.
157 Also, the special `invalid' insn resides here. */
158 { { 0, 0, 0, 0 }, {{0}}, 0, {0}},
159/* add $dstle,$imm32 */
160 {
161 { 0, 0, 0, 0 },
162 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
163 & ifmt_addile, { 0x7 }
164 },
165/* add $dstle,$srcle */
166 {
167 { 0, 0, 0, 0 },
168 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
169 & ifmt_addrle, { 0xf }
170 },
171/* add32 $dstle,$imm32 */
172 {
173 { 0, 0, 0, 0 },
174 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
175 & ifmt_addile, { 0x4 }
176 },
177/* add32 $dstle,$srcle */
178 {
179 { 0, 0, 0, 0 },
180 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
181 & ifmt_addrle, { 0xc }
182 },
183/* sub $dstle,$imm32 */
184 {
185 { 0, 0, 0, 0 },
186 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
187 & ifmt_addile, { 0x17 }
188 },
189/* sub $dstle,$srcle */
190 {
191 { 0, 0, 0, 0 },
192 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
193 & ifmt_addrle, { 0x1f }
194 },
195/* sub32 $dstle,$imm32 */
196 {
197 { 0, 0, 0, 0 },
198 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
199 & ifmt_addile, { 0x14 }
200 },
201/* sub32 $dstle,$srcle */
202 {
203 { 0, 0, 0, 0 },
204 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
205 & ifmt_addrle, { 0x1c }
206 },
207/* mul $dstle,$imm32 */
208 {
209 { 0, 0, 0, 0 },
210 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
211 & ifmt_addile, { 0x27 }
212 },
213/* mul $dstle,$srcle */
214 {
215 { 0, 0, 0, 0 },
216 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
217 & ifmt_addrle, { 0x2f }
218 },
219/* mul32 $dstle,$imm32 */
220 {
221 { 0, 0, 0, 0 },
222 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
223 & ifmt_addile, { 0x24 }
224 },
225/* mul32 $dstle,$srcle */
226 {
227 { 0, 0, 0, 0 },
228 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
229 & ifmt_addrle, { 0x2c }
230 },
231/* div $dstle,$imm32 */
232 {
233 { 0, 0, 0, 0 },
234 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
235 & ifmt_addile, { 0x37 }
236 },
237/* div $dstle,$srcle */
238 {
239 { 0, 0, 0, 0 },
240 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
241 & ifmt_addrle, { 0x3f }
242 },
243/* div32 $dstle,$imm32 */
244 {
245 { 0, 0, 0, 0 },
246 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
247 & ifmt_addile, { 0x34 }
248 },
249/* div32 $dstle,$srcle */
250 {
251 { 0, 0, 0, 0 },
252 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
253 & ifmt_addrle, { 0x3c }
254 },
255/* or $dstle,$imm32 */
256 {
257 { 0, 0, 0, 0 },
258 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
259 & ifmt_addile, { 0x47 }
260 },
261/* or $dstle,$srcle */
262 {
263 { 0, 0, 0, 0 },
264 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
265 & ifmt_addrle, { 0x4f }
266 },
267/* or32 $dstle,$imm32 */
268 {
269 { 0, 0, 0, 0 },
270 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
271 & ifmt_addile, { 0x44 }
272 },
273/* or32 $dstle,$srcle */
274 {
275 { 0, 0, 0, 0 },
276 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
277 & ifmt_addrle, { 0x4c }
278 },
279/* and $dstle,$imm32 */
280 {
281 { 0, 0, 0, 0 },
282 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
283 & ifmt_addile, { 0x57 }
284 },
285/* and $dstle,$srcle */
286 {
287 { 0, 0, 0, 0 },
288 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
289 & ifmt_addrle, { 0x5f }
290 },
291/* and32 $dstle,$imm32 */
292 {
293 { 0, 0, 0, 0 },
294 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
295 & ifmt_addile, { 0x54 }
296 },
297/* and32 $dstle,$srcle */
298 {
299 { 0, 0, 0, 0 },
300 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
301 & ifmt_addrle, { 0x5c }
302 },
303/* lsh $dstle,$imm32 */
304 {
305 { 0, 0, 0, 0 },
306 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
307 & ifmt_addile, { 0x67 }
308 },
309/* lsh $dstle,$srcle */
310 {
311 { 0, 0, 0, 0 },
312 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
313 & ifmt_addrle, { 0x6f }
314 },
315/* lsh32 $dstle,$imm32 */
316 {
317 { 0, 0, 0, 0 },
318 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
319 & ifmt_addile, { 0x64 }
320 },
321/* lsh32 $dstle,$srcle */
322 {
323 { 0, 0, 0, 0 },
324 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
325 & ifmt_addrle, { 0x6c }
326 },
327/* rsh $dstle,$imm32 */
328 {
329 { 0, 0, 0, 0 },
330 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
331 & ifmt_addile, { 0x77 }
332 },
333/* rsh $dstle,$srcle */
334 {
335 { 0, 0, 0, 0 },
336 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
337 & ifmt_addrle, { 0x7f }
338 },
339/* rsh32 $dstle,$imm32 */
340 {
341 { 0, 0, 0, 0 },
342 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
343 & ifmt_addile, { 0x74 }
344 },
345/* rsh32 $dstle,$srcle */
346 {
347 { 0, 0, 0, 0 },
348 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
349 & ifmt_addrle, { 0x7c }
350 },
351/* mod $dstle,$imm32 */
352 {
353 { 0, 0, 0, 0 },
354 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
355 & ifmt_addile, { 0x97 }
356 },
357/* mod $dstle,$srcle */
358 {
359 { 0, 0, 0, 0 },
360 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
361 & ifmt_addrle, { 0x9f }
362 },
363/* mod32 $dstle,$imm32 */
364 {
365 { 0, 0, 0, 0 },
366 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
367 & ifmt_addile, { 0x94 }
368 },
369/* mod32 $dstle,$srcle */
370 {
371 { 0, 0, 0, 0 },
372 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
373 & ifmt_addrle, { 0x9c }
374 },
375/* xor $dstle,$imm32 */
376 {
377 { 0, 0, 0, 0 },
378 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
379 & ifmt_addile, { 0xa7 }
380 },
381/* xor $dstle,$srcle */
382 {
383 { 0, 0, 0, 0 },
384 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
385 & ifmt_addrle, { 0xaf }
386 },
387/* xor32 $dstle,$imm32 */
388 {
389 { 0, 0, 0, 0 },
390 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
391 & ifmt_addile, { 0xa4 }
392 },
393/* xor32 $dstle,$srcle */
394 {
395 { 0, 0, 0, 0 },
396 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
397 & ifmt_addrle, { 0xac }
398 },
399/* mov $dstle,$imm32 */
400 {
401 { 0, 0, 0, 0 },
402 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
403 & ifmt_addile, { 0xb7 }
404 },
405/* mov $dstle,$srcle */
406 {
407 { 0, 0, 0, 0 },
408 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
409 & ifmt_addrle, { 0xbf }
410 },
411/* mov32 $dstle,$imm32 */
412 {
413 { 0, 0, 0, 0 },
414 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
415 & ifmt_addile, { 0xb4 }
416 },
417/* mov32 $dstle,$srcle */
418 {
419 { 0, 0, 0, 0 },
420 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
421 & ifmt_addrle, { 0xbc }
422 },
423/* arsh $dstle,$imm32 */
424 {
425 { 0, 0, 0, 0 },
426 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
427 & ifmt_addile, { 0xc7 }
428 },
429/* arsh $dstle,$srcle */
430 {
431 { 0, 0, 0, 0 },
432 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
433 & ifmt_addrle, { 0xcf }
434 },
435/* arsh32 $dstle,$imm32 */
436 {
437 { 0, 0, 0, 0 },
438 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), 0 } },
439 & ifmt_addile, { 0xc4 }
440 },
441/* arsh32 $dstle,$srcle */
442 {
443 { 0, 0, 0, 0 },
444 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), 0 } },
445 & ifmt_addrle, { 0xcc }
446 },
447/* neg $dstle */
448 {
449 { 0, 0, 0, 0 },
450 { { MNEM, ' ', OP (DSTLE), 0 } },
451 & ifmt_negle, { 0x8f }
452 },
453/* neg32 $dstle */
454 {
455 { 0, 0, 0, 0 },
456 { { MNEM, ' ', OP (DSTLE), 0 } },
457 & ifmt_negle, { 0x8c }
458 },
459/* add $dstbe,$imm32 */
460 {
461 { 0, 0, 0, 0 },
462 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
463 & ifmt_addibe, { 0x7 }
464 },
465/* add $dstbe,$srcbe */
466 {
467 { 0, 0, 0, 0 },
468 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
469 & ifmt_addrbe, { 0xf }
470 },
471/* add32 $dstbe,$imm32 */
472 {
473 { 0, 0, 0, 0 },
474 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
475 & ifmt_addibe, { 0x4 }
476 },
477/* add32 $dstbe,$srcbe */
478 {
479 { 0, 0, 0, 0 },
480 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
481 & ifmt_addrbe, { 0xc }
482 },
483/* sub $dstbe,$imm32 */
484 {
485 { 0, 0, 0, 0 },
486 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
487 & ifmt_addibe, { 0x17 }
488 },
489/* sub $dstbe,$srcbe */
490 {
491 { 0, 0, 0, 0 },
492 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
493 & ifmt_addrbe, { 0x1f }
494 },
495/* sub32 $dstbe,$imm32 */
496 {
497 { 0, 0, 0, 0 },
498 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
499 & ifmt_addibe, { 0x14 }
500 },
501/* sub32 $dstbe,$srcbe */
502 {
503 { 0, 0, 0, 0 },
504 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
505 & ifmt_addrbe, { 0x1c }
506 },
507/* mul $dstbe,$imm32 */
508 {
509 { 0, 0, 0, 0 },
510 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
511 & ifmt_addibe, { 0x27 }
512 },
513/* mul $dstbe,$srcbe */
514 {
515 { 0, 0, 0, 0 },
516 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
517 & ifmt_addrbe, { 0x2f }
518 },
519/* mul32 $dstbe,$imm32 */
520 {
521 { 0, 0, 0, 0 },
522 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
523 & ifmt_addibe, { 0x24 }
524 },
525/* mul32 $dstbe,$srcbe */
526 {
527 { 0, 0, 0, 0 },
528 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
529 & ifmt_addrbe, { 0x2c }
530 },
531/* div $dstbe,$imm32 */
532 {
533 { 0, 0, 0, 0 },
534 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
535 & ifmt_addibe, { 0x37 }
536 },
537/* div $dstbe,$srcbe */
538 {
539 { 0, 0, 0, 0 },
540 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
541 & ifmt_addrbe, { 0x3f }
542 },
543/* div32 $dstbe,$imm32 */
544 {
545 { 0, 0, 0, 0 },
546 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
547 & ifmt_addibe, { 0x34 }
548 },
549/* div32 $dstbe,$srcbe */
550 {
551 { 0, 0, 0, 0 },
552 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
553 & ifmt_addrbe, { 0x3c }
554 },
555/* or $dstbe,$imm32 */
556 {
557 { 0, 0, 0, 0 },
558 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
559 & ifmt_addibe, { 0x47 }
560 },
561/* or $dstbe,$srcbe */
562 {
563 { 0, 0, 0, 0 },
564 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
565 & ifmt_addrbe, { 0x4f }
566 },
567/* or32 $dstbe,$imm32 */
568 {
569 { 0, 0, 0, 0 },
570 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
571 & ifmt_addibe, { 0x44 }
572 },
573/* or32 $dstbe,$srcbe */
574 {
575 { 0, 0, 0, 0 },
576 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
577 & ifmt_addrbe, { 0x4c }
578 },
579/* and $dstbe,$imm32 */
580 {
581 { 0, 0, 0, 0 },
582 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
583 & ifmt_addibe, { 0x57 }
584 },
585/* and $dstbe,$srcbe */
586 {
587 { 0, 0, 0, 0 },
588 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
589 & ifmt_addrbe, { 0x5f }
590 },
591/* and32 $dstbe,$imm32 */
592 {
593 { 0, 0, 0, 0 },
594 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
595 & ifmt_addibe, { 0x54 }
596 },
597/* and32 $dstbe,$srcbe */
598 {
599 { 0, 0, 0, 0 },
600 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
601 & ifmt_addrbe, { 0x5c }
602 },
603/* lsh $dstbe,$imm32 */
604 {
605 { 0, 0, 0, 0 },
606 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
607 & ifmt_addibe, { 0x67 }
608 },
609/* lsh $dstbe,$srcbe */
610 {
611 { 0, 0, 0, 0 },
612 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
613 & ifmt_addrbe, { 0x6f }
614 },
615/* lsh32 $dstbe,$imm32 */
616 {
617 { 0, 0, 0, 0 },
618 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
619 & ifmt_addibe, { 0x64 }
620 },
621/* lsh32 $dstbe,$srcbe */
622 {
623 { 0, 0, 0, 0 },
624 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
625 & ifmt_addrbe, { 0x6c }
626 },
627/* rsh $dstbe,$imm32 */
628 {
629 { 0, 0, 0, 0 },
630 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
631 & ifmt_addibe, { 0x77 }
632 },
633/* rsh $dstbe,$srcbe */
634 {
635 { 0, 0, 0, 0 },
636 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
637 & ifmt_addrbe, { 0x7f }
638 },
639/* rsh32 $dstbe,$imm32 */
640 {
641 { 0, 0, 0, 0 },
642 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
643 & ifmt_addibe, { 0x74 }
644 },
645/* rsh32 $dstbe,$srcbe */
646 {
647 { 0, 0, 0, 0 },
648 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
649 & ifmt_addrbe, { 0x7c }
650 },
651/* mod $dstbe,$imm32 */
652 {
653 { 0, 0, 0, 0 },
654 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
655 & ifmt_addibe, { 0x97 }
656 },
657/* mod $dstbe,$srcbe */
658 {
659 { 0, 0, 0, 0 },
660 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
661 & ifmt_addrbe, { 0x9f }
662 },
663/* mod32 $dstbe,$imm32 */
664 {
665 { 0, 0, 0, 0 },
666 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
667 & ifmt_addibe, { 0x94 }
668 },
669/* mod32 $dstbe,$srcbe */
670 {
671 { 0, 0, 0, 0 },
672 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
673 & ifmt_addrbe, { 0x9c }
674 },
675/* xor $dstbe,$imm32 */
676 {
677 { 0, 0, 0, 0 },
678 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
679 & ifmt_addibe, { 0xa7 }
680 },
681/* xor $dstbe,$srcbe */
682 {
683 { 0, 0, 0, 0 },
684 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
685 & ifmt_addrbe, { 0xaf }
686 },
687/* xor32 $dstbe,$imm32 */
688 {
689 { 0, 0, 0, 0 },
690 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
691 & ifmt_addibe, { 0xa4 }
692 },
693/* xor32 $dstbe,$srcbe */
694 {
695 { 0, 0, 0, 0 },
696 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
697 & ifmt_addrbe, { 0xac }
698 },
699/* mov $dstbe,$imm32 */
700 {
701 { 0, 0, 0, 0 },
702 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
703 & ifmt_addibe, { 0xb7 }
704 },
705/* mov $dstbe,$srcbe */
706 {
707 { 0, 0, 0, 0 },
708 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
709 & ifmt_addrbe, { 0xbf }
710 },
711/* mov32 $dstbe,$imm32 */
712 {
713 { 0, 0, 0, 0 },
714 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
715 & ifmt_addibe, { 0xb4 }
716 },
717/* mov32 $dstbe,$srcbe */
718 {
719 { 0, 0, 0, 0 },
720 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
721 & ifmt_addrbe, { 0xbc }
722 },
723/* arsh $dstbe,$imm32 */
724 {
725 { 0, 0, 0, 0 },
726 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
727 & ifmt_addibe, { 0xc7 }
728 },
729/* arsh $dstbe,$srcbe */
730 {
731 { 0, 0, 0, 0 },
732 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
733 & ifmt_addrbe, { 0xcf }
734 },
735/* arsh32 $dstbe,$imm32 */
736 {
737 { 0, 0, 0, 0 },
738 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), 0 } },
739 & ifmt_addibe, { 0xc4 }
740 },
741/* arsh32 $dstbe,$srcbe */
742 {
743 { 0, 0, 0, 0 },
744 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), 0 } },
745 & ifmt_addrbe, { 0xcc }
746 },
747/* neg $dstbe */
748 {
749 { 0, 0, 0, 0 },
750 { { MNEM, ' ', OP (DSTBE), 0 } },
751 & ifmt_negbe, { 0x8f }
752 },
753/* neg32 $dstbe */
754 {
755 { 0, 0, 0, 0 },
756 { { MNEM, ' ', OP (DSTBE), 0 } },
757 & ifmt_negbe, { 0x8c }
758 },
759/* endle $dstle,$endsize */
760 {
761 { 0, 0, 0, 0 },
762 { { MNEM, ' ', OP (DSTLE), ',', OP (ENDSIZE), 0 } },
763 & ifmt_endlele, { 0xd4 }
764 },
765/* endbe $dstle,$endsize */
766 {
767 { 0, 0, 0, 0 },
768 { { MNEM, ' ', OP (DSTLE), ',', OP (ENDSIZE), 0 } },
769 & ifmt_endlele, { 0xdc }
770 },
771/* endle $dstbe,$endsize */
772 {
773 { 0, 0, 0, 0 },
774 { { MNEM, ' ', OP (DSTBE), ',', OP (ENDSIZE), 0 } },
775 & ifmt_endlebe, { 0xd4 }
776 },
777/* endbe $dstbe,$endsize */
778 {
779 { 0, 0, 0, 0 },
780 { { MNEM, ' ', OP (DSTBE), ',', OP (ENDSIZE), 0 } },
781 & ifmt_endlebe, { 0xdc }
782 },
783/* lddw $dstle,$imm64 */
784 {
785 { 0, 0, 0, 0 },
786 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM64), 0 } },
787 & ifmt_lddwle, { 0x18 }
788 },
789/* lddw $dstbe,$imm64 */
790 {
791 { 0, 0, 0, 0 },
792 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM64), 0 } },
793 & ifmt_lddwbe, { 0x18 }
794 },
795/* ldabsw $dstle,$srcle,$imm32 */
796 {
797 { 0, 0, 0, 0 },
798 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (IMM32), 0 } },
799 & ifmt_ldabswle, { 0x20 }
800 },
801/* ldabsh $dstle,$srcle,$imm32 */
802 {
803 { 0, 0, 0, 0 },
804 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (IMM32), 0 } },
805 & ifmt_ldabswle, { 0x28 }
806 },
807/* ldabsb $dstle,$srcle,$imm32 */
808 {
809 { 0, 0, 0, 0 },
810 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (IMM32), 0 } },
811 & ifmt_ldabswle, { 0x30 }
812 },
813/* ldabsdw $dstle,$srcle,$imm32 */
814 {
815 { 0, 0, 0, 0 },
816 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (IMM32), 0 } },
817 & ifmt_ldabswle, { 0x38 }
818 },
819/* ldindw $dstle,$srcle,$imm32 */
820 {
821 { 0, 0, 0, 0 },
822 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (IMM32), 0 } },
823 & ifmt_ldabswle, { 0x40 }
824 },
825/* ldindh $dstle,$srcle,$imm32 */
826 {
827 { 0, 0, 0, 0 },
828 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (IMM32), 0 } },
829 & ifmt_ldabswle, { 0x48 }
830 },
831/* ldindb $dstle,$srcle,$imm32 */
832 {
833 { 0, 0, 0, 0 },
834 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (IMM32), 0 } },
835 & ifmt_ldabswle, { 0x50 }
836 },
837/* ldinddw $dstle,$srcle,$imm32 */
838 {
839 { 0, 0, 0, 0 },
840 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (IMM32), 0 } },
841 & ifmt_ldabswle, { 0x58 }
842 },
843/* ldabsw $dstbe,$srcbe,$imm32 */
844 {
845 { 0, 0, 0, 0 },
846 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (IMM32), 0 } },
847 & ifmt_ldabswbe, { 0x20 }
848 },
849/* ldabsh $dstbe,$srcbe,$imm32 */
850 {
851 { 0, 0, 0, 0 },
852 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (IMM32), 0 } },
853 & ifmt_ldabswbe, { 0x28 }
854 },
855/* ldabsb $dstbe,$srcbe,$imm32 */
856 {
857 { 0, 0, 0, 0 },
858 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (IMM32), 0 } },
859 & ifmt_ldabswbe, { 0x30 }
860 },
861/* ldabsdw $dstbe,$srcbe,$imm32 */
862 {
863 { 0, 0, 0, 0 },
864 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (IMM32), 0 } },
865 & ifmt_ldabswbe, { 0x38 }
866 },
867/* ldindw $dstbe,$srcbe,$imm32 */
868 {
869 { 0, 0, 0, 0 },
870 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (IMM32), 0 } },
871 & ifmt_ldabswbe, { 0x40 }
872 },
873/* ldindh $dstbe,$srcbe,$imm32 */
874 {
875 { 0, 0, 0, 0 },
876 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (IMM32), 0 } },
877 & ifmt_ldabswbe, { 0x48 }
878 },
879/* ldindb $dstbe,$srcbe,$imm32 */
880 {
881 { 0, 0, 0, 0 },
882 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (IMM32), 0 } },
883 & ifmt_ldabswbe, { 0x50 }
884 },
885/* ldinddw $dstbe,$srcbe,$imm32 */
886 {
887 { 0, 0, 0, 0 },
888 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (IMM32), 0 } },
889 & ifmt_ldabswbe, { 0x58 }
890 },
891/* ldxw $dstle,[$srcle+$offset16] */
892 {
893 { 0, 0, 0, 0 },
894 { { MNEM, ' ', OP (DSTLE), ',', '[', OP (SRCLE), '+', OP (OFFSET16), ']', 0 } },
895 & ifmt_ldxwle, { 0x61 }
896 },
897/* ldxh $dstle,[$srcle+$offset16] */
898 {
899 { 0, 0, 0, 0 },
900 { { MNEM, ' ', OP (DSTLE), ',', '[', OP (SRCLE), '+', OP (OFFSET16), ']', 0 } },
901 & ifmt_ldxwle, { 0x69 }
902 },
903/* ldxb $dstle,[$srcle+$offset16] */
904 {
905 { 0, 0, 0, 0 },
906 { { MNEM, ' ', OP (DSTLE), ',', '[', OP (SRCLE), '+', OP (OFFSET16), ']', 0 } },
907 & ifmt_ldxwle, { 0x71 }
908 },
909/* ldxdw $dstle,[$srcle+$offset16] */
910 {
911 { 0, 0, 0, 0 },
912 { { MNEM, ' ', OP (DSTLE), ',', '[', OP (SRCLE), '+', OP (OFFSET16), ']', 0 } },
913 & ifmt_ldxwle, { 0x79 }
914 },
915/* stxw [$dstle+$offset16],$srcle */
916 {
917 { 0, 0, 0, 0 },
918 { { MNEM, ' ', '[', OP (DSTLE), '+', OP (OFFSET16), ']', ',', OP (SRCLE), 0 } },
919 & ifmt_ldxwle, { 0x63 }
920 },
921/* stxh [$dstle+$offset16],$srcle */
922 {
923 { 0, 0, 0, 0 },
924 { { MNEM, ' ', '[', OP (DSTLE), '+', OP (OFFSET16), ']', ',', OP (SRCLE), 0 } },
925 & ifmt_ldxwle, { 0x6b }
926 },
927/* stxb [$dstle+$offset16],$srcle */
928 {
929 { 0, 0, 0, 0 },
930 { { MNEM, ' ', '[', OP (DSTLE), '+', OP (OFFSET16), ']', ',', OP (SRCLE), 0 } },
931 & ifmt_ldxwle, { 0x73 }
932 },
933/* stxdw [$dstle+$offset16],$srcle */
934 {
935 { 0, 0, 0, 0 },
936 { { MNEM, ' ', '[', OP (DSTLE), '+', OP (OFFSET16), ']', ',', OP (SRCLE), 0 } },
937 & ifmt_ldxwle, { 0x7b }
938 },
939/* ldxw $dstbe,[$srcbe+$offset16] */
940 {
941 { 0, 0, 0, 0 },
942 { { MNEM, ' ', OP (DSTBE), ',', '[', OP (SRCBE), '+', OP (OFFSET16), ']', 0 } },
943 & ifmt_ldxwbe, { 0x61 }
944 },
945/* ldxh $dstbe,[$srcbe+$offset16] */
946 {
947 { 0, 0, 0, 0 },
948 { { MNEM, ' ', OP (DSTBE), ',', '[', OP (SRCBE), '+', OP (OFFSET16), ']', 0 } },
949 & ifmt_ldxwbe, { 0x69 }
950 },
951/* ldxb $dstbe,[$srcbe+$offset16] */
952 {
953 { 0, 0, 0, 0 },
954 { { MNEM, ' ', OP (DSTBE), ',', '[', OP (SRCBE), '+', OP (OFFSET16), ']', 0 } },
955 & ifmt_ldxwbe, { 0x71 }
956 },
957/* ldxdw $dstbe,[$srcbe+$offset16] */
958 {
959 { 0, 0, 0, 0 },
960 { { MNEM, ' ', OP (DSTBE), ',', '[', OP (SRCBE), '+', OP (OFFSET16), ']', 0 } },
961 & ifmt_ldxwbe, { 0x79 }
962 },
963/* stxw [$dstbe+$offset16],$srcbe */
964 {
965 { 0, 0, 0, 0 },
966 { { MNEM, ' ', '[', OP (DSTBE), '+', OP (OFFSET16), ']', ',', OP (SRCBE), 0 } },
967 & ifmt_ldxwbe, { 0x63 }
968 },
969/* stxh [$dstbe+$offset16],$srcbe */
970 {
971 { 0, 0, 0, 0 },
972 { { MNEM, ' ', '[', OP (DSTBE), '+', OP (OFFSET16), ']', ',', OP (SRCBE), 0 } },
973 & ifmt_ldxwbe, { 0x6b }
974 },
975/* stxb [$dstbe+$offset16],$srcbe */
976 {
977 { 0, 0, 0, 0 },
978 { { MNEM, ' ', '[', OP (DSTBE), '+', OP (OFFSET16), ']', ',', OP (SRCBE), 0 } },
979 & ifmt_ldxwbe, { 0x73 }
980 },
981/* stxdw [$dstbe+$offset16],$srcbe */
982 {
983 { 0, 0, 0, 0 },
984 { { MNEM, ' ', '[', OP (DSTBE), '+', OP (OFFSET16), ']', ',', OP (SRCBE), 0 } },
985 & ifmt_ldxwbe, { 0x7b }
986 },
987/* stb [$dstle+$offset16],$imm32 */
988 {
989 { 0, 0, 0, 0 },
990 { { MNEM, ' ', '[', OP (DSTLE), '+', OP (OFFSET16), ']', ',', OP (IMM32), 0 } },
991 & ifmt_stble, { 0x72 }
992 },
993/* sth [$dstle+$offset16],$imm32 */
994 {
995 { 0, 0, 0, 0 },
996 { { MNEM, ' ', '[', OP (DSTLE), '+', OP (OFFSET16), ']', ',', OP (IMM32), 0 } },
997 & ifmt_stble, { 0x6a }
998 },
999/* stw [$dstle+$offset16],$imm32 */
1000 {
1001 { 0, 0, 0, 0 },
1002 { { MNEM, ' ', '[', OP (DSTLE), '+', OP (OFFSET16), ']', ',', OP (IMM32), 0 } },
1003 & ifmt_stble, { 0x62 }
1004 },
1005/* stdw [$dstle+$offset16],$imm32 */
1006 {
1007 { 0, 0, 0, 0 },
1008 { { MNEM, ' ', '[', OP (DSTLE), '+', OP (OFFSET16), ']', ',', OP (IMM32), 0 } },
1009 & ifmt_stble, { 0x7a }
1010 },
1011/* stb [$dstbe+$offset16],$imm32 */
1012 {
1013 { 0, 0, 0, 0 },
1014 { { MNEM, ' ', '[', OP (DSTBE), '+', OP (OFFSET16), ']', ',', OP (IMM32), 0 } },
1015 & ifmt_stbbe, { 0x72 }
1016 },
1017/* sth [$dstbe+$offset16],$imm32 */
1018 {
1019 { 0, 0, 0, 0 },
1020 { { MNEM, ' ', '[', OP (DSTBE), '+', OP (OFFSET16), ']', ',', OP (IMM32), 0 } },
1021 & ifmt_stbbe, { 0x6a }
1022 },
1023/* stw [$dstbe+$offset16],$imm32 */
1024 {
1025 { 0, 0, 0, 0 },
1026 { { MNEM, ' ', '[', OP (DSTBE), '+', OP (OFFSET16), ']', ',', OP (IMM32), 0 } },
1027 & ifmt_stbbe, { 0x62 }
1028 },
1029/* stdw [$dstbe+$offset16],$imm32 */
1030 {
1031 { 0, 0, 0, 0 },
1032 { { MNEM, ' ', '[', OP (DSTBE), '+', OP (OFFSET16), ']', ',', OP (IMM32), 0 } },
1033 & ifmt_stbbe, { 0x7a }
1034 },
1035/* jeq $dstle,$imm32,$disp16 */
1036 {
1037 { 0, 0, 0, 0 },
1038 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1039 & ifmt_jeqile, { 0x15 }
1040 },
1041/* jeq $dstle,$srcle,$disp16 */
1042 {
1043 { 0, 0, 0, 0 },
1044 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
1045 & ifmt_jeqrle, { 0x1d }
1046 },
1047/* jgt $dstle,$imm32,$disp16 */
1048 {
1049 { 0, 0, 0, 0 },
1050 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1051 & ifmt_jeqile, { 0x25 }
1052 },
1053/* jgt $dstle,$srcle,$disp16 */
1054 {
1055 { 0, 0, 0, 0 },
1056 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
1057 & ifmt_jeqrle, { 0x2d }
1058 },
1059/* jge $dstle,$imm32,$disp16 */
1060 {
1061 { 0, 0, 0, 0 },
1062 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1063 & ifmt_jeqile, { 0x35 }
1064 },
1065/* jge $dstle,$srcle,$disp16 */
1066 {
1067 { 0, 0, 0, 0 },
1068 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
1069 & ifmt_jeqrle, { 0x3d }
1070 },
1071/* jlt $dstle,$imm32,$disp16 */
1072 {
1073 { 0, 0, 0, 0 },
1074 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1075 & ifmt_jeqile, { 0xa5 }
1076 },
1077/* jlt $dstle,$srcle,$disp16 */
1078 {
1079 { 0, 0, 0, 0 },
1080 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
1081 & ifmt_jeqrle, { 0xad }
1082 },
1083/* jle $dstle,$imm32,$disp16 */
1084 {
1085 { 0, 0, 0, 0 },
1086 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1087 & ifmt_jeqile, { 0xb5 }
1088 },
1089/* jle $dstle,$srcle,$disp16 */
1090 {
1091 { 0, 0, 0, 0 },
1092 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
1093 & ifmt_jeqrle, { 0xbd }
1094 },
1095/* jset $dstle,$imm32,$disp16 */
1096 {
1097 { 0, 0, 0, 0 },
1098 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1099 & ifmt_jeqile, { 0x45 }
1100 },
1101/* jset $dstle,$srcle,$disp16 */
1102 {
1103 { 0, 0, 0, 0 },
1104 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
1105 & ifmt_jeqrle, { 0x4d }
1106 },
1107/* jne $dstle,$imm32,$disp16 */
1108 {
1109 { 0, 0, 0, 0 },
1110 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1111 & ifmt_jeqile, { 0x55 }
1112 },
1113/* jne $dstle,$srcle,$disp16 */
1114 {
1115 { 0, 0, 0, 0 },
1116 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
1117 & ifmt_jeqrle, { 0x5d }
1118 },
1119/* jsgt $dstle,$imm32,$disp16 */
1120 {
1121 { 0, 0, 0, 0 },
1122 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1123 & ifmt_jeqile, { 0x65 }
1124 },
1125/* jsgt $dstle,$srcle,$disp16 */
1126 {
1127 { 0, 0, 0, 0 },
1128 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
1129 & ifmt_jeqrle, { 0x6d }
1130 },
1131/* jsge $dstle,$imm32,$disp16 */
1132 {
1133 { 0, 0, 0, 0 },
1134 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1135 & ifmt_jeqile, { 0x75 }
1136 },
1137/* jsge $dstle,$srcle,$disp16 */
1138 {
1139 { 0, 0, 0, 0 },
1140 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
1141 & ifmt_jeqrle, { 0x7d }
1142 },
1143/* jslt $dstle,$imm32,$disp16 */
1144 {
1145 { 0, 0, 0, 0 },
1146 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1147 & ifmt_jeqile, { 0xc5 }
1148 },
1149/* jslt $dstle,$srcle,$disp16 */
1150 {
1151 { 0, 0, 0, 0 },
1152 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
1153 & ifmt_jeqrle, { 0xcd }
1154 },
1155/* jsle $dstle,$imm32,$disp16 */
1156 {
1157 { 0, 0, 0, 0 },
1158 { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1159 & ifmt_jeqile, { 0xd5 }
1160 },
1161/* jsle $dstle,$srcle,$disp16 */
1162 {
1163 { 0, 0, 0, 0 },
1164 { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
1165 & ifmt_jeqrle, { 0xdd }
1166 },
1167/* jeq $dstbe,$imm32,$disp16 */
1168 {
1169 { 0, 0, 0, 0 },
1170 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1171 & ifmt_jeqibe, { 0x15 }
1172 },
1173/* jeq $dstbe,$srcbe,$disp16 */
1174 {
1175 { 0, 0, 0, 0 },
1176 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
1177 & ifmt_jeqrbe, { 0x1d }
1178 },
1179/* jgt $dstbe,$imm32,$disp16 */
1180 {
1181 { 0, 0, 0, 0 },
1182 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1183 & ifmt_jeqibe, { 0x25 }
1184 },
1185/* jgt $dstbe,$srcbe,$disp16 */
1186 {
1187 { 0, 0, 0, 0 },
1188 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
1189 & ifmt_jeqrbe, { 0x2d }
1190 },
1191/* jge $dstbe,$imm32,$disp16 */
1192 {
1193 { 0, 0, 0, 0 },
1194 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1195 & ifmt_jeqibe, { 0x35 }
1196 },
1197/* jge $dstbe,$srcbe,$disp16 */
1198 {
1199 { 0, 0, 0, 0 },
1200 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
1201 & ifmt_jeqrbe, { 0x3d }
1202 },
1203/* jlt $dstbe,$imm32,$disp16 */
1204 {
1205 { 0, 0, 0, 0 },
1206 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1207 & ifmt_jeqibe, { 0xa5 }
1208 },
1209/* jlt $dstbe,$srcbe,$disp16 */
1210 {
1211 { 0, 0, 0, 0 },
1212 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
1213 & ifmt_jeqrbe, { 0xad }
1214 },
1215/* jle $dstbe,$imm32,$disp16 */
1216 {
1217 { 0, 0, 0, 0 },
1218 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1219 & ifmt_jeqibe, { 0xb5 }
1220 },
1221/* jle $dstbe,$srcbe,$disp16 */
1222 {
1223 { 0, 0, 0, 0 },
1224 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
1225 & ifmt_jeqrbe, { 0xbd }
1226 },
1227/* jset $dstbe,$imm32,$disp16 */
1228 {
1229 { 0, 0, 0, 0 },
1230 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1231 & ifmt_jeqibe, { 0x45 }
1232 },
1233/* jset $dstbe,$srcbe,$disp16 */
1234 {
1235 { 0, 0, 0, 0 },
1236 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
1237 & ifmt_jeqrbe, { 0x4d }
1238 },
1239/* jne $dstbe,$imm32,$disp16 */
1240 {
1241 { 0, 0, 0, 0 },
1242 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1243 & ifmt_jeqibe, { 0x55 }
1244 },
1245/* jne $dstbe,$srcbe,$disp16 */
1246 {
1247 { 0, 0, 0, 0 },
1248 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
1249 & ifmt_jeqrbe, { 0x5d }
1250 },
1251/* jsgt $dstbe,$imm32,$disp16 */
1252 {
1253 { 0, 0, 0, 0 },
1254 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1255 & ifmt_jeqibe, { 0x65 }
1256 },
1257/* jsgt $dstbe,$srcbe,$disp16 */
1258 {
1259 { 0, 0, 0, 0 },
1260 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
1261 & ifmt_jeqrbe, { 0x6d }
1262 },
1263/* jsge $dstbe,$imm32,$disp16 */
1264 {
1265 { 0, 0, 0, 0 },
1266 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1267 & ifmt_jeqibe, { 0x75 }
1268 },
1269/* jsge $dstbe,$srcbe,$disp16 */
1270 {
1271 { 0, 0, 0, 0 },
1272 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
1273 & ifmt_jeqrbe, { 0x7d }
1274 },
1275/* jslt $dstbe,$imm32,$disp16 */
1276 {
1277 { 0, 0, 0, 0 },
1278 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1279 & ifmt_jeqibe, { 0xc5 }
1280 },
1281/* jslt $dstbe,$srcbe,$disp16 */
1282 {
1283 { 0, 0, 0, 0 },
1284 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
1285 & ifmt_jeqrbe, { 0xcd }
1286 },
1287/* jsle $dstbe,$imm32,$disp16 */
1288 {
1289 { 0, 0, 0, 0 },
1290 { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
1291 & ifmt_jeqibe, { 0xd5 }
1292 },
1293/* jsle $dstbe,$srcbe,$disp16 */
1294 {
1295 { 0, 0, 0, 0 },
1296 { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
1297 & ifmt_jeqrbe, { 0xdd }
1298 },
1299/* ja $disp16 */
1300 {
1301 { 0, 0, 0, 0 },
1302 { { MNEM, ' ', OP (DISP16), 0 } },
1303 & ifmt_ja, { 0x5 }
1304 },
1305/* call $disp32 */
1306 {
1307 { 0, 0, 0, 0 },
1308 { { MNEM, ' ', OP (DISP32), 0 } },
1309 & ifmt_call, { 0x85 }
1310 },
1311/* exit */
1312 {
1313 { 0, 0, 0, 0 },
1314 { { MNEM, 0 } },
1315 & ifmt_exit, { 0x95 }
1316 },
1317/* xadddw [$dstle+$offset16],$srcle */
1318 {
1319 { 0, 0, 0, 0 },
1320 { { MNEM, ' ', '[', OP (DSTLE), '+', OP (OFFSET16), ']', ',', OP (SRCLE), 0 } },
1321 & ifmt_ldxwle, { 0xdb }
1322 },
1323/* xaddw [$dstle+$offset16],$srcle */
1324 {
1325 { 0, 0, 0, 0 },
1326 { { MNEM, ' ', '[', OP (DSTLE), '+', OP (OFFSET16), ']', ',', OP (SRCLE), 0 } },
1327 & ifmt_ldxwle, { 0xc3 }
1328 },
1329/* xadddw [$dstbe+$offset16],$srcbe */
1330 {
1331 { 0, 0, 0, 0 },
1332 { { MNEM, ' ', '[', OP (DSTBE), '+', OP (OFFSET16), ']', ',', OP (SRCBE), 0 } },
1333 & ifmt_ldxwbe, { 0xdb }
1334 },
1335/* xaddw [$dstbe+$offset16],$srcbe */
1336 {
1337 { 0, 0, 0, 0 },
1338 { { MNEM, ' ', '[', OP (DSTBE), '+', OP (OFFSET16), ']', ',', OP (SRCBE), 0 } },
1339 & ifmt_ldxwbe, { 0xc3 }
1340 },
1341};
1342
1343#undef A
1344#undef OPERAND
1345#undef MNEM
1346#undef OP
1347
1348/* Formats for ALIAS macro-insns. */
1349
1350#define F(f) & bpf_cgen_ifld_table[BPF_##f]
1351#undef F
1352
1353/* Each non-simple macro entry points to an array of expansion possibilities. */
1354
1355#define A(a) (1 << CGEN_INSN_##a)
1356#define OPERAND(op) BPF_OPERAND_##op
1357#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
1358#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
1359
1360/* The macro instruction table. */
1361
1362static const CGEN_IBASE bpf_cgen_macro_insn_table[] =
1363{
1364};
1365
1366/* The macro instruction opcode table. */
1367
1368static const CGEN_OPCODE bpf_cgen_macro_insn_opcode_table[] =
1369{
1370};
1371
1372#undef A
1373#undef OPERAND
1374#undef MNEM
1375#undef OP
1376
1377#ifndef CGEN_ASM_HASH_P
1378#define CGEN_ASM_HASH_P(insn) 1
1379#endif
1380
1381#ifndef CGEN_DIS_HASH_P
1382#define CGEN_DIS_HASH_P(insn) 1
1383#endif
1384
1385/* Return non-zero if INSN is to be added to the hash table.
1386 Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file. */
1387
1388static int
1389asm_hash_insn_p (const CGEN_INSN *insn ATTRIBUTE_UNUSED)
1390{
1391 return CGEN_ASM_HASH_P (insn);
1392}
1393
1394static int
1395dis_hash_insn_p (const CGEN_INSN *insn)
1396{
1397 /* If building the hash table and the NO-DIS attribute is present,
1398 ignore. */
1399 if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_NO_DIS))
1400 return 0;
1401 return CGEN_DIS_HASH_P (insn);
1402}
1403
1404#ifndef CGEN_ASM_HASH
1405#define CGEN_ASM_HASH_SIZE 127
1406#ifdef CGEN_MNEMONIC_OPERANDS
1407#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE)
1408#else
1409#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE) /*FIXME*/
1410#endif
1411#endif
1412
1413/* It doesn't make much sense to provide a default here,
1414 but while this is under development we do.
1415 BUFFER is a pointer to the bytes of the insn, target order.
1416 VALUE is the first base_insn_bitsize bits as an int in host order. */
1417
1418#ifndef CGEN_DIS_HASH
1419#define CGEN_DIS_HASH_SIZE 256
1420#define CGEN_DIS_HASH(buf, value) (*(unsigned char *) (buf))
1421#endif
1422
1423/* The result is the hash value of the insn.
1424 Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file. */
1425
1426static unsigned int
1427asm_hash_insn (const char *mnem)
1428{
1429 return CGEN_ASM_HASH (mnem);
1430}
1431
1432/* BUF is a pointer to the bytes of the insn, target order.
1433 VALUE is the first base_insn_bitsize bits as an int in host order. */
1434
1435static unsigned int
1436dis_hash_insn (const char *buf ATTRIBUTE_UNUSED,
1437 CGEN_INSN_INT value ATTRIBUTE_UNUSED)
1438{
1439 return CGEN_DIS_HASH (buf, value);
1440}
1441
1442/* Set the recorded length of the insn in the CGEN_FIELDS struct. */
1443
1444static void
1445set_fields_bitsize (CGEN_FIELDS *fields, int size)
1446{
1447 CGEN_FIELDS_BITSIZE (fields) = size;
1448}
1449
1450/* Function to call before using the operand instance table.
1451 This plugs the opcode entries and macro instructions into the cpu table. */
1452
1453void
1454bpf_cgen_init_opcode_table (CGEN_CPU_DESC cd)
1455{
1456 int i;
1457 int num_macros = (sizeof (bpf_cgen_macro_insn_table) /
1458 sizeof (bpf_cgen_macro_insn_table[0]));
1459 const CGEN_IBASE *ib = & bpf_cgen_macro_insn_table[0];
1460 const CGEN_OPCODE *oc = & bpf_cgen_macro_insn_opcode_table[0];
1461 CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
1462
1463 /* This test has been added to avoid a warning generated
1464 if memset is called with a third argument of value zero. */
1465 if (num_macros >= 1)
1466 memset (insns, 0, num_macros * sizeof (CGEN_INSN));
1467 for (i = 0; i < num_macros; ++i)
1468 {
1469 insns[i].base = &ib[i];
1470 insns[i].opcode = &oc[i];
1471 bpf_cgen_build_insn_regex (& insns[i]);
1472 }
1473 cd->macro_insn_table.init_entries = insns;
1474 cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE);
1475 cd->macro_insn_table.num_init_entries = num_macros;
1476
1477 oc = & bpf_cgen_insn_opcode_table[0];
1478 insns = (CGEN_INSN *) cd->insn_table.init_entries;
1479 for (i = 0; i < MAX_INSNS; ++i)
1480 {
1481 insns[i].opcode = &oc[i];
1482 bpf_cgen_build_insn_regex (& insns[i]);
1483 }
1484
1485 cd->sizeof_fields = sizeof (CGEN_FIELDS);
1486 cd->set_fields_bitsize = set_fields_bitsize;
1487
1488 cd->asm_hash_p = asm_hash_insn_p;
1489 cd->asm_hash = asm_hash_insn;
1490 cd->asm_hash_size = CGEN_ASM_HASH_SIZE;
1491
1492 cd->dis_hash_p = dis_hash_insn_p;
1493 cd->dis_hash = dis_hash_insn;
1494 cd->dis_hash_size = CGEN_DIS_HASH_SIZE;
1495}
This page took 0.087237 seconds and 4 git commands to generate.