1 /* Generic opcode table support for targets using CGEN. -*- C -*-
2 CGEN: Cpu tools GENerator
4 THIS FILE IS USED TO GENERATE fr30-opc.c.
6 Copyright (C) 1998 Free Software Foundation, Inc.
8 This file is part of the GNU Binutils and GDB, the GNU debugger.
10 This program 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 2, or (at your option)
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software Foundation, Inc.,
22 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
27 #include "libiberty.h"
33 /* Used by the ifield rtx function. */
34 #define FLD(f) (fields->f)
36 /* The hash functions are recorded here to help keep assembler code out of
37 the disassembler and vice versa. */
39 static int asm_hash_insn_p PARAMS ((const CGEN_INSN *));
40 static unsigned int asm_hash_insn PARAMS ((const char *));
41 static int dis_hash_insn_p PARAMS ((const CGEN_INSN *));
42 static unsigned int dis_hash_insn PARAMS ((const char *, CGEN_INSN_INT));
44 /* Look up instruction INSN_VALUE and extract its fields.
45 INSN, if non-null, is the insn table entry.
46 Otherwise INSN_VALUE is examined to compute it.
47 LENGTH is the bit length of INSN_VALUE if known, otherwise 0.
48 0 is only valid if `insn == NULL && ! CGEN_INT_INSN_P'.
49 If INSN != NULL, LENGTH must be valid.
50 ALIAS_P is non-zero if alias insns are to be included in the search.
52 The result is a pointer to the insn table entry, or NULL if the instruction
56 fr30_cgen_lookup_insn (od, insn, insn_value, length, fields, alias_p)
58 const CGEN_INSN *insn;
59 CGEN_INSN_BYTES insn_value;
64 unsigned char buf[CGEN_MAX_INSN_SIZE];
66 CGEN_INSN_INT base_insn;
68 CGEN_EXTRACT_INFO *info = NULL;
70 CGEN_EXTRACT_INFO ex_info;
71 CGEN_EXTRACT_INFO *info = &ex_info;
75 cgen_put_insn_value (od, buf, length, insn_value);
77 base_insn = insn_value; /*???*/
79 ex_info.dis_info = NULL;
80 ex_info.insn_bytes = insn_value;
82 base_insn = cgen_get_insn_value (od, buf, length);
88 const CGEN_INSN_LIST *insn_list;
90 /* The instructions are stored in hash lists.
91 Pick the first one and keep trying until we find the right one. */
93 insn_list = CGEN_DIS_LOOKUP_INSN (od, bufp, base_insn);
94 while (insn_list != NULL)
96 insn = insn_list->insn;
99 || ! CGEN_INSN_ATTR (insn, CGEN_INSN_ALIAS))
101 /* Basic bit mask must be correct. */
102 /* ??? May wish to allow target to defer this check until the
104 if ((base_insn & CGEN_INSN_BASE_MASK (insn))
105 == CGEN_INSN_BASE_VALUE (insn))
107 /* ??? 0 is passed for `pc' */
108 int elength = (*CGEN_EXTRACT_FN (insn)) (od, insn, info,
114 if (length != 0 && length != elength)
121 insn_list = CGEN_DIS_NEXT_INSN (insn_list);
126 /* Sanity check: can't pass an alias insn if ! alias_p. */
128 && CGEN_INSN_ATTR (insn, CGEN_INSN_ALIAS))
130 /* Sanity check: length must be correct. */
131 if (length != CGEN_INSN_BITSIZE (insn))
134 /* ??? 0 is passed for `pc' */
135 length = (*CGEN_EXTRACT_FN (insn)) (od, insn, info, base_insn, fields,
137 /* Sanity check: must succeed.
138 Could relax this later if it ever proves useful. */
147 /* Fill in the operand instances used by INSN whose operands are FIELDS.
148 INDICES is a pointer to a buffer of MAX_OPERAND_INSTANCES ints to be filled
152 fr30_cgen_get_insn_operands (od, insn, fields, indices)
154 const CGEN_INSN * insn;
155 const CGEN_FIELDS * fields;
158 const CGEN_OPERAND_INSTANCE *opinst;
161 for (i = 0, opinst = CGEN_INSN_OPERANDS (insn);
163 && CGEN_OPERAND_INSTANCE_TYPE (opinst) != CGEN_OPERAND_INSTANCE_END;
166 const CGEN_OPERAND *op = CGEN_OPERAND_INSTANCE_OPERAND (opinst);
168 indices[i] = CGEN_OPERAND_INSTANCE_INDEX (opinst);
170 indices[i] = fr30_cgen_get_int_operand (CGEN_OPERAND_INDEX (op),
175 /* Cover function to fr30_cgen_get_insn_operands when either INSN or FIELDS
177 The INSN, INSN_VALUE, and LENGTH arguments are passed to
178 fr30_cgen_lookup_insn unchanged.
180 The result is the insn table entry or NULL if the instruction wasn't
184 fr30_cgen_lookup_get_insn_operands (od, insn, insn_value, length, indices)
186 const CGEN_INSN *insn;
187 CGEN_INSN_BYTES insn_value;
193 /* Pass non-zero for ALIAS_P only if INSN != NULL.
194 If INSN == NULL, we want a real insn. */
195 insn = fr30_cgen_lookup_insn (od, insn, insn_value, length, &fields,
200 fr30_cgen_get_insn_operands (od, insn, &fields, indices);
205 static const CGEN_ATTR_ENTRY MACH_attr[] =
207 { "base", MACH_BASE },
208 { "fr30", MACH_FR30 },
213 const CGEN_ATTR_TABLE fr30_cgen_hardware_attr_table[] =
215 { "CACHE-ADDR", NULL },
216 { "FUN-ACCESS", NULL },
222 const CGEN_ATTR_TABLE fr30_cgen_operand_attr_table[] =
224 { "ABS-ADDR", NULL },
225 { "HASH-PREFIX", NULL },
226 { "NEGATIVE", NULL },
227 { "PCREL-ADDR", NULL },
229 { "SEM-ONLY", NULL },
230 { "SIGN-OPT", NULL },
232 { "UNSIGNED", NULL },
237 const CGEN_ATTR_TABLE fr30_cgen_insn_attr_table[] =
240 { "COND-CTI", NULL },
241 { "DELAY-SLOT", NULL },
243 { "NOT-IN-DELAY-SLOT", NULL },
245 { "RELAXABLE", NULL },
246 { "SKIP-CTI", NULL },
247 { "UNCOND-CTI", NULL },
252 CGEN_KEYWORD_ENTRY fr30_cgen_opval_h_gr_entries[] =
275 CGEN_KEYWORD fr30_cgen_opval_h_gr =
277 & fr30_cgen_opval_h_gr_entries[0],
281 CGEN_KEYWORD_ENTRY fr30_cgen_opval_h_cr_entries[] =
301 CGEN_KEYWORD fr30_cgen_opval_h_cr =
303 & fr30_cgen_opval_h_cr_entries[0],
307 CGEN_KEYWORD_ENTRY fr30_cgen_opval_h_dr_entries[] =
317 CGEN_KEYWORD fr30_cgen_opval_h_dr =
319 & fr30_cgen_opval_h_dr_entries[0],
323 CGEN_KEYWORD_ENTRY fr30_cgen_opval_h_ps_entries[] =
328 CGEN_KEYWORD fr30_cgen_opval_h_ps =
330 & fr30_cgen_opval_h_ps_entries[0],
334 CGEN_KEYWORD_ENTRY fr30_cgen_opval_h_r13_entries[] =
339 CGEN_KEYWORD fr30_cgen_opval_h_r13 =
341 & fr30_cgen_opval_h_r13_entries[0],
345 CGEN_KEYWORD_ENTRY fr30_cgen_opval_h_r14_entries[] =
350 CGEN_KEYWORD fr30_cgen_opval_h_r14 =
352 & fr30_cgen_opval_h_r14_entries[0],
356 CGEN_KEYWORD_ENTRY fr30_cgen_opval_h_r15_entries[] =
361 CGEN_KEYWORD fr30_cgen_opval_h_r15 =
363 & fr30_cgen_opval_h_r15_entries[0],
368 /* The hardware table. */
370 #define HW_ENT(n) fr30_cgen_hw_entries[n]
371 static const CGEN_HW_ENTRY fr30_cgen_hw_entries[] =
373 { HW_H_PC, & HW_ENT (HW_H_PC + 1), "h-pc", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0|(1<<CGEN_HW_PROFILE)|(1<<CGEN_HW_PC), { 0 } } },
374 { HW_H_MEMORY, & HW_ENT (HW_H_MEMORY + 1), "h-memory", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0, { 0 } } },
375 { HW_H_SINT, & HW_ENT (HW_H_SINT + 1), "h-sint", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0, { 0 } } },
376 { HW_H_UINT, & HW_ENT (HW_H_UINT + 1), "h-uint", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0, { 0 } } },
377 { HW_H_ADDR, & HW_ENT (HW_H_ADDR + 1), "h-addr", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0, { 0 } } },
378 { HW_H_IADDR, & HW_ENT (HW_H_IADDR + 1), "h-iaddr", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0, { 0 } } },
379 { HW_H_GR, & HW_ENT (HW_H_GR + 1), "h-gr", CGEN_ASM_KEYWORD, (PTR) & fr30_cgen_opval_h_gr, { 0, 0|(1<<CGEN_HW_CACHE_ADDR)|(1<<CGEN_HW_PROFILE), { 0 } } },
380 { HW_H_CR, & HW_ENT (HW_H_CR + 1), "h-cr", CGEN_ASM_KEYWORD, (PTR) & fr30_cgen_opval_h_cr, { 0, 0, { 0 } } },
381 { HW_H_DR, & HW_ENT (HW_H_DR + 1), "h-dr", CGEN_ASM_KEYWORD, (PTR) & fr30_cgen_opval_h_dr, { 0, 0|(1<<CGEN_HW_FUN_ACCESS), { 0 } } },
382 { HW_H_PS, & HW_ENT (HW_H_PS + 1), "h-ps", CGEN_ASM_KEYWORD, (PTR) & fr30_cgen_opval_h_ps, { 0, 0|(1<<CGEN_HW_FUN_ACCESS), { 0 } } },
383 { HW_H_R13, & HW_ENT (HW_H_R13 + 1), "h-r13", CGEN_ASM_KEYWORD, (PTR) & fr30_cgen_opval_h_r13, { 0, 0, { 0 } } },
384 { HW_H_R14, & HW_ENT (HW_H_R14 + 1), "h-r14", CGEN_ASM_KEYWORD, (PTR) & fr30_cgen_opval_h_r14, { 0, 0, { 0 } } },
385 { HW_H_R15, & HW_ENT (HW_H_R15 + 1), "h-r15", CGEN_ASM_KEYWORD, (PTR) & fr30_cgen_opval_h_r15, { 0, 0, { 0 } } },
386 { HW_H_NBIT, & HW_ENT (HW_H_NBIT + 1), "h-nbit", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0, { 0 } } },
387 { HW_H_ZBIT, & HW_ENT (HW_H_ZBIT + 1), "h-zbit", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0, { 0 } } },
388 { HW_H_VBIT, & HW_ENT (HW_H_VBIT + 1), "h-vbit", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0, { 0 } } },
389 { HW_H_CBIT, & HW_ENT (HW_H_CBIT + 1), "h-cbit", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0, { 0 } } },
390 { HW_H_IBIT, & HW_ENT (HW_H_IBIT + 1), "h-ibit", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0, { 0 } } },
391 { HW_H_SBIT, & HW_ENT (HW_H_SBIT + 1), "h-sbit", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0, { 0 } } },
392 { HW_H_CCR, & HW_ENT (HW_H_CCR + 1), "h-ccr", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0|(1<<CGEN_HW_FUN_ACCESS), { 0 } } },
393 { HW_H_SCR, & HW_ENT (HW_H_SCR + 1), "h-scr", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0|(1<<CGEN_HW_FUN_ACCESS), { 0 } } },
394 { HW_H_ILM, & HW_ENT (HW_H_ILM + 1), "h-ilm", CGEN_ASM_KEYWORD, (PTR) 0, { 0, 0|(1<<CGEN_HW_FUN_ACCESS), { 0 } } },
398 /* The instruction field table. */
400 static const CGEN_IFLD fr30_cgen_ifld_table[] =
402 { FR30_F_NIL, "f-nil", 0, 0, 0, 0, { 0, 0, { 0 } } },
403 { FR30_F_OP1, "f-op1", 0, 16, 0, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
404 { FR30_F_OP2, "f-op2", 0, 16, 4, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
405 { FR30_F_OP3, "f-op3", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
406 { FR30_F_OP4, "f-op4", 0, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
407 { FR30_F_OP5, "f-op5", 0, 16, 4, 1, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
408 { FR30_F_CC, "f-cc", 0, 16, 4, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
409 { FR30_F_CCC, "f-ccc", 16, 16, 0, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
410 { FR30_F_RJ, "f-Rj", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
411 { FR30_F_RI, "f-Ri", 0, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
412 { FR30_F_RS1, "f-Rs1", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
413 { FR30_F_RS2, "f-Rs2", 0, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
414 { FR30_F_RJC, "f-Rjc", 16, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
415 { FR30_F_RIC, "f-Ric", 16, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
416 { FR30_F_CRJ, "f-CRj", 16, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
417 { FR30_F_CRI, "f-CRi", 16, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
418 { FR30_F_U4, "f-u4", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
419 { FR30_F_U4C, "f-u4c", 0, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
420 { FR30_F_I4, "f-i4", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_SIGNED), { 0 } } },
421 { FR30_F_M4, "f-m4", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
422 { FR30_F_U8, "f-u8", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
423 { FR30_F_I8, "f-i8", 0, 16, 4, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
424 { FR30_F_I20_4, "f-i20-4", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
425 { FR30_F_I20_16, "f-i20-16", 16, 16, 0, 16, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
426 { FR30_F_I32, "f-i32", 16, 32, 0, 32, { 0, 0|(1<<CGEN_IFLD_SIGN_OPT)|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
427 { FR30_F_UDISP6, "f-udisp6", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
428 { FR30_F_DISP8, "f-disp8", 0, 16, 4, 8, { 0, 0|(1<<CGEN_IFLD_SIGNED), { 0 } } },
429 { FR30_F_DISP9, "f-disp9", 0, 16, 4, 8, { 0, 0|(1<<CGEN_IFLD_SIGNED), { 0 } } },
430 { FR30_F_DISP10, "f-disp10", 0, 16, 4, 8, { 0, 0|(1<<CGEN_IFLD_SIGNED), { 0 } } },
431 { FR30_F_S10, "f-s10", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_SIGNED), { 0 } } },
432 { FR30_F_U10, "f-u10", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
433 { FR30_F_REL9, "f-rel9", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_PCREL_ADDR)|(1<<CGEN_IFLD_SIGNED), { 0 } } },
434 { FR30_F_DIR8, "f-dir8", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
435 { FR30_F_DIR9, "f-dir9", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
436 { FR30_F_DIR10, "f-dir10", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
437 { FR30_F_REL12, "f-rel12", 0, 16, 5, 11, { 0, 0|(1<<CGEN_IFLD_PCREL_ADDR)|(1<<CGEN_IFLD_SIGNED), { 0 } } },
438 { FR30_F_REGLIST_HI_ST, "f-reglist_hi_st", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
439 { FR30_F_REGLIST_LOW_ST, "f-reglist_low_st", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
440 { FR30_F_REGLIST_HI_LD, "f-reglist_hi_ld", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
441 { FR30_F_REGLIST_LOW_LD, "f-reglist_low_ld", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED), { 0 } } },
445 /* The operand table. */
447 #define OPERAND(op) CONCAT2 (FR30_OPERAND_,op)
448 #define OP_ENT(op) fr30_cgen_operand_table[OPERAND (op)]
450 const CGEN_OPERAND fr30_cgen_operand_table[MAX_OPERANDS] =
452 /* pc: program counter */
453 { "pc", & HW_ENT (HW_H_PC), 0, 0,
454 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY), { 0 } } },
455 /* Ri: destination register */
456 { "Ri", & HW_ENT (HW_H_GR), 12, 4,
457 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
458 /* Rj: source register */
459 { "Rj", & HW_ENT (HW_H_GR), 8, 4,
460 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
461 /* Ric: target register coproc insn */
462 { "Ric", & HW_ENT (HW_H_GR), 12, 4,
463 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
464 /* Rjc: source register coproc insn */
465 { "Rjc", & HW_ENT (HW_H_GR), 8, 4,
466 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
467 /* CRi: coprocessor register */
468 { "CRi", & HW_ENT (HW_H_CR), 12, 4,
469 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
470 /* CRj: coprocessor register */
471 { "CRj", & HW_ENT (HW_H_CR), 8, 4,
472 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
473 /* Rs1: dedicated register */
474 { "Rs1", & HW_ENT (HW_H_DR), 8, 4,
475 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
476 /* Rs2: dedicated register */
477 { "Rs2", & HW_ENT (HW_H_DR), 12, 4,
478 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
479 /* R13: General Register 13 */
480 { "R13", & HW_ENT (HW_H_R13), 0, 0,
482 /* R14: General Register 14 */
483 { "R14", & HW_ENT (HW_H_R14), 0, 0,
485 /* R15: General Register 15 */
486 { "R15", & HW_ENT (HW_H_R15), 0, 0,
488 /* ps: Program Status register */
489 { "ps", & HW_ENT (HW_H_PS), 0, 0,
491 /* u4: 4 bit unsigned immediate */
492 { "u4", & HW_ENT (HW_H_UINT), 8, 4,
493 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
494 /* u4c: 4 bit unsigned immediate */
495 { "u4c", & HW_ENT (HW_H_UINT), 12, 4,
496 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
497 /* u8: 8 bit unsigned immediate */
498 { "u8", & HW_ENT (HW_H_UINT), 8, 8,
499 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
500 /* i8: 8 bit unsigned immediate */
501 { "i8", & HW_ENT (HW_H_UINT), 4, 8,
502 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
503 /* udisp6: 6 bit unsigned immediate */
504 { "udisp6", & HW_ENT (HW_H_UINT), 8, 4,
505 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
506 /* disp8: 8 bit signed immediate */
507 { "disp8", & HW_ENT (HW_H_SINT), 4, 8,
508 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_SIGNED), { 0 } } },
509 /* disp9: 9 bit signed immediate */
510 { "disp9", & HW_ENT (HW_H_SINT), 4, 8,
511 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_SIGNED), { 0 } } },
512 /* disp10: 10 bit signed immediate */
513 { "disp10", & HW_ENT (HW_H_SINT), 4, 8,
514 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_SIGNED), { 0 } } },
515 /* s10: 10 bit signed immediate */
516 { "s10", & HW_ENT (HW_H_SINT), 8, 8,
517 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_SIGNED), { 0 } } },
518 /* u10: 10 bit unsigned immediate */
519 { "u10", & HW_ENT (HW_H_UINT), 8, 8,
520 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
521 /* i32: 32 bit immediate */
522 { "i32", & HW_ENT (HW_H_UINT), 0, 32,
523 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_SIGN_OPT)|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
524 /* m4: 4 bit negative immediate */
525 { "m4", & HW_ENT (HW_H_SINT), 8, 4,
526 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
527 /* i20: 20 bit immediate */
528 { "i20", & HW_ENT (HW_H_UINT), 0, 20,
529 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_UNSIGNED)|(1<<CGEN_OPERAND_VIRTUAL), { 0 } } },
530 /* dir8: 8 bit direct address */
531 { "dir8", & HW_ENT (HW_H_UINT), 8, 8,
532 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
533 /* dir9: 9 bit direct address */
534 { "dir9", & HW_ENT (HW_H_UINT), 8, 8,
535 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
536 /* dir10: 10 bit direct address */
537 { "dir10", & HW_ENT (HW_H_UINT), 8, 8,
538 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
539 /* label9: 9 bit pc relative address */
540 { "label9", & HW_ENT (HW_H_IADDR), 8, 8,
541 { 0, 0|(1<<CGEN_OPERAND_PCREL_ADDR)|(1<<CGEN_OPERAND_SIGNED), { 0 } } },
542 /* label12: 12 bit pc relative address */
543 { "label12", & HW_ENT (HW_H_IADDR), 5, 11,
544 { 0, 0|(1<<CGEN_OPERAND_PCREL_ADDR)|(1<<CGEN_OPERAND_SIGNED), { 0 } } },
545 /* reglist_low_ld: 8 bit register mask for ldm */
546 { "reglist_low_ld", & HW_ENT (HW_H_UINT), 8, 8,
547 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
548 /* reglist_hi_ld: 8 bit register mask for ldm */
549 { "reglist_hi_ld", & HW_ENT (HW_H_UINT), 8, 8,
550 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
551 /* reglist_low_st: 8 bit register mask for ldm */
552 { "reglist_low_st", & HW_ENT (HW_H_UINT), 8, 8,
553 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
554 /* reglist_hi_st: 8 bit register mask for ldm */
555 { "reglist_hi_st", & HW_ENT (HW_H_UINT), 8, 8,
556 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
557 /* cc: condition codes */
558 { "cc", & HW_ENT (HW_H_UINT), 4, 4,
559 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
560 /* ccc: coprocessor calc */
561 { "ccc", & HW_ENT (HW_H_UINT), 0, 8,
562 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_UNSIGNED), { 0 } } },
563 /* nbit: negative bit */
564 { "nbit", & HW_ENT (HW_H_NBIT), 0, 0,
565 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY), { 0 } } },
566 /* vbit: overflow bit */
567 { "vbit", & HW_ENT (HW_H_VBIT), 0, 0,
568 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY), { 0 } } },
570 { "zbit", & HW_ENT (HW_H_ZBIT), 0, 0,
571 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY), { 0 } } },
572 /* cbit: carry bit */
573 { "cbit", & HW_ENT (HW_H_CBIT), 0, 0,
574 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY), { 0 } } },
575 /* ibit: interrupt bit */
576 { "ibit", & HW_ENT (HW_H_IBIT), 0, 0,
577 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY), { 0 } } },
578 /* sbit: stack bit */
579 { "sbit", & HW_ENT (HW_H_SBIT), 0, 0,
580 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY), { 0 } } },
581 /* ccr: condition code bits */
582 { "ccr", & HW_ENT (HW_H_CCR), 0, 0,
583 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY), { 0 } } },
584 /* scr: system condition bits */
585 { "scr", & HW_ENT (HW_H_SCR), 0, 0,
586 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY), { 0 } } },
587 /* ilm: condition code bits */
588 { "ilm", & HW_ENT (HW_H_ILM), 0, 0,
589 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY), { 0 } } },
592 /* Operand references. */
594 #define INPUT CGEN_OPERAND_INSTANCE_INPUT
595 #define OUTPUT CGEN_OPERAND_INSTANCE_OUTPUT
596 #define COND_REF CGEN_OPERAND_INSTANCE_COND_REF
598 static const CGEN_OPERAND_INSTANCE fmt_add_ops[] = {
599 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
600 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
601 { OUTPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
602 { OUTPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, 0 },
603 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
604 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
605 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
609 static const CGEN_OPERAND_INSTANCE fmt_addi_ops[] = {
610 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
611 { INPUT, "u4", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (U4), 0, 0 },
612 { OUTPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
613 { OUTPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, 0 },
614 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
615 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
616 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
620 static const CGEN_OPERAND_INSTANCE fmt_add2_ops[] = {
621 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
622 { INPUT, "m4", & HW_ENT (HW_H_SINT), CGEN_MODE_SI, & OP_ENT (M4), 0, 0 },
623 { OUTPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
624 { OUTPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, 0 },
625 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
626 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
627 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
631 static const CGEN_OPERAND_INSTANCE fmt_addc_ops[] = {
632 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
633 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
634 { INPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, 0 },
635 { OUTPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
636 { OUTPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, 0 },
637 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
638 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
639 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
643 static const CGEN_OPERAND_INSTANCE fmt_addn_ops[] = {
644 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
645 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
646 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
650 static const CGEN_OPERAND_INSTANCE fmt_addni_ops[] = {
651 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
652 { INPUT, "u4", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (U4), 0, 0 },
653 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
657 static const CGEN_OPERAND_INSTANCE fmt_addn2_ops[] = {
658 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
659 { INPUT, "m4", & HW_ENT (HW_H_SINT), CGEN_MODE_SI, & OP_ENT (M4), 0, 0 },
660 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
664 static const CGEN_OPERAND_INSTANCE fmt_cmp_ops[] = {
665 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
666 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
667 { OUTPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
668 { OUTPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, 0 },
669 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
670 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
674 static const CGEN_OPERAND_INSTANCE fmt_cmpi_ops[] = {
675 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
676 { INPUT, "u4", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (U4), 0, 0 },
677 { OUTPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
678 { OUTPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, 0 },
679 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
680 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
684 static const CGEN_OPERAND_INSTANCE fmt_cmp2_ops[] = {
685 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
686 { INPUT, "m4", & HW_ENT (HW_H_SINT), CGEN_MODE_SI, & OP_ENT (M4), 0, 0 },
687 { OUTPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
688 { OUTPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, 0 },
689 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
690 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
694 static const CGEN_OPERAND_INSTANCE fmt_and_ops[] = {
695 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
696 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
697 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
698 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
699 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
703 static const CGEN_OPERAND_INSTANCE fmt_andm_ops[] = {
704 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RI), 0, 0 },
705 { INPUT, "h_memory_Ri", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
706 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
707 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
708 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
709 { OUTPUT, "h_memory_Ri", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
713 static const CGEN_OPERAND_INSTANCE fmt_andh_ops[] = {
714 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RI), 0, 0 },
715 { INPUT, "h_memory_Ri", & HW_ENT (HW_H_MEMORY), CGEN_MODE_HI, 0, 0, 0 },
716 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_HI, & OP_ENT (RJ), 0, 0 },
717 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
718 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
719 { OUTPUT, "h_memory_Ri", & HW_ENT (HW_H_MEMORY), CGEN_MODE_HI, 0, 0, 0 },
723 static const CGEN_OPERAND_INSTANCE fmt_andb_ops[] = {
724 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RI), 0, 0 },
725 { INPUT, "h_memory_Ri", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
726 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_QI, & OP_ENT (RJ), 0, 0 },
727 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
728 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
729 { OUTPUT, "h_memory_Ri", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
733 static const CGEN_OPERAND_INSTANCE fmt_bandl_ops[] = {
734 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RI), 0, 0 },
735 { INPUT, "u4", & HW_ENT (HW_H_UINT), CGEN_MODE_QI, & OP_ENT (U4), 0, 0 },
736 { INPUT, "h_memory_Ri", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
737 { OUTPUT, "h_memory_Ri", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
741 static const CGEN_OPERAND_INSTANCE fmt_btstl_ops[] = {
742 { INPUT, "u4", & HW_ENT (HW_H_UINT), CGEN_MODE_QI, & OP_ENT (U4), 0, 0 },
743 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RI), 0, 0 },
744 { INPUT, "h_memory_Ri", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
745 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
746 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
750 static const CGEN_OPERAND_INSTANCE fmt_mul_ops[] = {
751 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
752 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
753 { INPUT, "h_dr_5", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 5, 0 },
754 { OUTPUT, "h_dr_5", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 5, 0 },
755 { OUTPUT, "h_dr_4", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 4, 0 },
756 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
757 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
758 { OUTPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
762 static const CGEN_OPERAND_INSTANCE fmt_mulu_ops[] = {
763 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
764 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
765 { INPUT, "h_dr_4", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 4, 0 },
766 { INPUT, "h_dr_5", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 5, 0 },
767 { OUTPUT, "h_dr_5", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 5, 0 },
768 { OUTPUT, "h_dr_4", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 4, 0 },
769 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
770 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
771 { OUTPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
775 static const CGEN_OPERAND_INSTANCE fmt_mulh_ops[] = {
776 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
777 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
778 { INPUT, "h_dr_5", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 5, 0 },
779 { OUTPUT, "h_dr_5", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 5, 0 },
780 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
781 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
785 static const CGEN_OPERAND_INSTANCE fmt_lsl_ops[] = {
786 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
787 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, COND_REF },
788 { OUTPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, COND_REF },
789 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, COND_REF },
790 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
791 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
795 static const CGEN_OPERAND_INSTANCE fmt_lsli_ops[] = {
796 { INPUT, "u4", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (U4), 0, 0 },
797 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, COND_REF },
798 { OUTPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, COND_REF },
799 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, COND_REF },
800 { OUTPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
801 { OUTPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
805 static const CGEN_OPERAND_INSTANCE fmt_ldi8_ops[] = {
806 { INPUT, "i8", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (I8), 0, 0 },
807 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
811 static const CGEN_OPERAND_INSTANCE fmt_ldi20_ops[] = {
812 { INPUT, "i20", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (I20), 0, 0 },
813 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
817 static const CGEN_OPERAND_INSTANCE fmt_ldi32_ops[] = {
818 { INPUT, "i32", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (I32), 0, 0 },
819 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
823 static const CGEN_OPERAND_INSTANCE fmt_ld_ops[] = {
824 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RJ), 0, 0 },
825 { INPUT, "h_memory_Rj", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
826 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
830 static const CGEN_OPERAND_INSTANCE fmt_lduh_ops[] = {
831 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RJ), 0, 0 },
832 { INPUT, "h_memory_Rj", & HW_ENT (HW_H_MEMORY), CGEN_MODE_UHI, 0, 0, 0 },
833 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
837 static const CGEN_OPERAND_INSTANCE fmt_ldub_ops[] = {
838 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RJ), 0, 0 },
839 { INPUT, "h_memory_Rj", & HW_ENT (HW_H_MEMORY), CGEN_MODE_UQI, 0, 0, 0 },
840 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
844 static const CGEN_OPERAND_INSTANCE fmt_ldr13_ops[] = {
845 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
846 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
847 { INPUT, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
848 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
852 static const CGEN_OPERAND_INSTANCE fmt_ldr13uh_ops[] = {
853 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
854 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
855 { INPUT, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_UHI, 0, 0, 0 },
856 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
860 static const CGEN_OPERAND_INSTANCE fmt_ldr13ub_ops[] = {
861 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
862 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
863 { INPUT, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_UQI, 0, 0, 0 },
864 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
868 static const CGEN_OPERAND_INSTANCE fmt_ldr14_ops[] = {
869 { INPUT, "disp10", & HW_ENT (HW_H_SINT), CGEN_MODE_SI, & OP_ENT (DISP10), 0, 0 },
870 { INPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, 0 },
871 { INPUT, "h_memory_add__VM_disp10_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
872 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
876 static const CGEN_OPERAND_INSTANCE fmt_ldr14uh_ops[] = {
877 { INPUT, "disp9", & HW_ENT (HW_H_SINT), CGEN_MODE_SI, & OP_ENT (DISP9), 0, 0 },
878 { INPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, 0 },
879 { INPUT, "h_memory_add__VM_disp9_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY), CGEN_MODE_UHI, 0, 0, 0 },
880 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
884 static const CGEN_OPERAND_INSTANCE fmt_ldr14ub_ops[] = {
885 { INPUT, "disp8", & HW_ENT (HW_H_SINT), CGEN_MODE_SI, & OP_ENT (DISP8), 0, 0 },
886 { INPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, 0 },
887 { INPUT, "h_memory_add__VM_disp8_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY), CGEN_MODE_UQI, 0, 0, 0 },
888 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
892 static const CGEN_OPERAND_INSTANCE fmt_ldr15_ops[] = {
893 { INPUT, "udisp6", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (UDISP6), 0, 0 },
894 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
895 { INPUT, "h_memory_add__VM_udisp6_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
896 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
900 static const CGEN_OPERAND_INSTANCE fmt_ldr15gr_ops[] = {
901 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
902 { INPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
903 { INPUT, "f_Ri", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, 0, 0, COND_REF },
904 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
905 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, COND_REF },
909 static const CGEN_OPERAND_INSTANCE fmt_ldr15dr_ops[] = {
910 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
911 { INPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
912 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
913 { OUTPUT, "Rs2", & HW_ENT (HW_H_DR), CGEN_MODE_SI, & OP_ENT (RS2), 0, 0 },
917 static const CGEN_OPERAND_INSTANCE fmt_ldr15ps_ops[] = {
918 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
919 { INPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
920 { OUTPUT, "ps", & HW_ENT (HW_H_PS), CGEN_MODE_USI, 0, 0, 0 },
921 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
925 static const CGEN_OPERAND_INSTANCE fmt_st_ops[] = {
926 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RJ), 0, 0 },
927 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
928 { OUTPUT, "h_memory_Rj", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
932 static const CGEN_OPERAND_INSTANCE fmt_sth_ops[] = {
933 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RJ), 0, 0 },
934 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
935 { OUTPUT, "h_memory_Rj", & HW_ENT (HW_H_MEMORY), CGEN_MODE_HI, 0, 0, 0 },
939 static const CGEN_OPERAND_INSTANCE fmt_stb_ops[] = {
940 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RJ), 0, 0 },
941 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
942 { OUTPUT, "h_memory_Rj", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
946 static const CGEN_OPERAND_INSTANCE fmt_str13_ops[] = {
947 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
948 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
949 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
950 { OUTPUT, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
954 static const CGEN_OPERAND_INSTANCE fmt_str13h_ops[] = {
955 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
956 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
957 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
958 { OUTPUT, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_HI, 0, 0, 0 },
962 static const CGEN_OPERAND_INSTANCE fmt_str13b_ops[] = {
963 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
964 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
965 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
966 { OUTPUT, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
970 static const CGEN_OPERAND_INSTANCE fmt_str14_ops[] = {
971 { INPUT, "disp10", & HW_ENT (HW_H_SINT), CGEN_MODE_SI, & OP_ENT (DISP10), 0, 0 },
972 { INPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, 0 },
973 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
974 { OUTPUT, "h_memory_add__VM_disp10_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
978 static const CGEN_OPERAND_INSTANCE fmt_str14h_ops[] = {
979 { INPUT, "disp9", & HW_ENT (HW_H_SINT), CGEN_MODE_SI, & OP_ENT (DISP9), 0, 0 },
980 { INPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, 0 },
981 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
982 { OUTPUT, "h_memory_add__VM_disp9_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY), CGEN_MODE_HI, 0, 0, 0 },
986 static const CGEN_OPERAND_INSTANCE fmt_str14b_ops[] = {
987 { INPUT, "disp8", & HW_ENT (HW_H_SINT), CGEN_MODE_SI, & OP_ENT (DISP8), 0, 0 },
988 { INPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, 0 },
989 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
990 { OUTPUT, "h_memory_add__VM_disp8_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
994 static const CGEN_OPERAND_INSTANCE fmt_str15_ops[] = {
995 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
996 { INPUT, "udisp6", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (UDISP6), 0, 0 },
997 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
998 { OUTPUT, "h_memory_add__VM_reg__VM_h_gr_15_udisp6", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1002 static const CGEN_OPERAND_INSTANCE fmt_str15gr_ops[] = {
1003 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1004 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1005 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1006 { OUTPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1010 static const CGEN_OPERAND_INSTANCE fmt_str15dr_ops[] = {
1011 { INPUT, "Rs2", & HW_ENT (HW_H_DR), CGEN_MODE_SI, & OP_ENT (RS2), 0, 0 },
1012 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1013 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1014 { OUTPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1018 static const CGEN_OPERAND_INSTANCE fmt_str15ps_ops[] = {
1019 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1020 { INPUT, "ps", & HW_ENT (HW_H_PS), CGEN_MODE_USI, 0, 0, 0 },
1021 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1022 { OUTPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1026 static const CGEN_OPERAND_INSTANCE fmt_mov_ops[] = {
1027 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RJ), 0, 0 },
1028 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1032 static const CGEN_OPERAND_INSTANCE fmt_movdr_ops[] = {
1033 { INPUT, "Rs1", & HW_ENT (HW_H_DR), CGEN_MODE_SI, & OP_ENT (RS1), 0, 0 },
1034 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1038 static const CGEN_OPERAND_INSTANCE fmt_movps_ops[] = {
1039 { INPUT, "ps", & HW_ENT (HW_H_PS), CGEN_MODE_USI, 0, 0, 0 },
1040 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1044 static const CGEN_OPERAND_INSTANCE fmt_mov2dr_ops[] = {
1045 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1046 { OUTPUT, "Rs1", & HW_ENT (HW_H_DR), CGEN_MODE_SI, & OP_ENT (RS1), 0, 0 },
1050 static const CGEN_OPERAND_INSTANCE fmt_mov2ps_ops[] = {
1051 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1052 { OUTPUT, "ps", & HW_ENT (HW_H_PS), CGEN_MODE_USI, 0, 0, 0 },
1056 static const CGEN_OPERAND_INSTANCE fmt_jmp_ops[] = {
1057 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1058 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, 0 },
1062 static const CGEN_OPERAND_INSTANCE fmt_callr_ops[] = {
1063 { INPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, 0 },
1064 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1065 { OUTPUT, "h_dr_1", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 1, 0 },
1066 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, 0 },
1070 static const CGEN_OPERAND_INSTANCE fmt_call_ops[] = {
1071 { INPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, 0 },
1072 { INPUT, "label12", & HW_ENT (HW_H_IADDR), CGEN_MODE_USI, & OP_ENT (LABEL12), 0, 0 },
1073 { OUTPUT, "h_dr_1", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 1, 0 },
1074 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, 0 },
1078 static const CGEN_OPERAND_INSTANCE fmt_ret_ops[] = {
1079 { INPUT, "h_dr_1", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 1, 0 },
1080 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, 0 },
1084 static const CGEN_OPERAND_INSTANCE fmt_int_ops[] = {
1085 { INPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_SI, 0, 0, 0 },
1086 { INPUT, "u8", & HW_ENT (HW_H_UINT), CGEN_MODE_SI, & OP_ENT (U8), 0, 0 },
1087 { OUTPUT, "h_dr_2", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 2, 0 },
1088 { OUTPUT, "ibit", & HW_ENT (HW_H_IBIT), CGEN_MODE_BI, 0, 0, 0 },
1089 { OUTPUT, "sbit", & HW_ENT (HW_H_SBIT), CGEN_MODE_BI, 0, 0, 0 },
1090 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_SI, 0, 0, 0 },
1094 static const CGEN_OPERAND_INSTANCE fmt_inte_ops[] = {
1095 { INPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_SI, 0, 0, 0 },
1096 { OUTPUT, "h_dr_2", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 2, 0 },
1097 { OUTPUT, "ibit", & HW_ENT (HW_H_IBIT), CGEN_MODE_BI, 0, 0, 0 },
1098 { OUTPUT, "ilm", & HW_ENT (HW_H_ILM), CGEN_MODE_UQI, 0, 0, 0 },
1099 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_SI, 0, 0, 0 },
1103 static const CGEN_OPERAND_INSTANCE fmt_reti_ops[] = {
1104 { INPUT, "sbit", & HW_ENT (HW_H_SBIT), CGEN_MODE_BI, 0, 0, 0 },
1105 { INPUT, "h_dr_2", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 2, COND_REF },
1106 { INPUT, "h_memory_reg__VM_h_dr_2", & HW_ENT (HW_H_MEMORY), CGEN_MODE_USI, 0, 0, COND_REF },
1107 { INPUT, "h_dr_3", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 3, COND_REF },
1108 { INPUT, "h_memory_reg__VM_h_dr_3", & HW_ENT (HW_H_MEMORY), CGEN_MODE_USI, 0, 0, COND_REF },
1109 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, COND_REF },
1110 { OUTPUT, "h_dr_2", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 2, COND_REF },
1111 { OUTPUT, "ps", & HW_ENT (HW_H_PS), CGEN_MODE_USI, 0, 0, COND_REF },
1112 { OUTPUT, "h_dr_3", & HW_ENT (HW_H_DR), CGEN_MODE_SI, 0, 3, COND_REF },
1116 static const CGEN_OPERAND_INSTANCE fmt_bra_ops[] = {
1117 { INPUT, "label9", & HW_ENT (HW_H_IADDR), CGEN_MODE_USI, & OP_ENT (LABEL9), 0, COND_REF },
1118 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, COND_REF },
1122 static const CGEN_OPERAND_INSTANCE fmt_beq_ops[] = {
1123 { INPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
1124 { INPUT, "label9", & HW_ENT (HW_H_IADDR), CGEN_MODE_USI, & OP_ENT (LABEL9), 0, COND_REF },
1125 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, COND_REF },
1129 static const CGEN_OPERAND_INSTANCE fmt_bc_ops[] = {
1130 { INPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, 0 },
1131 { INPUT, "label9", & HW_ENT (HW_H_IADDR), CGEN_MODE_USI, & OP_ENT (LABEL9), 0, COND_REF },
1132 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, COND_REF },
1136 static const CGEN_OPERAND_INSTANCE fmt_bn_ops[] = {
1137 { INPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
1138 { INPUT, "label9", & HW_ENT (HW_H_IADDR), CGEN_MODE_USI, & OP_ENT (LABEL9), 0, COND_REF },
1139 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, COND_REF },
1143 static const CGEN_OPERAND_INSTANCE fmt_bv_ops[] = {
1144 { INPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
1145 { INPUT, "label9", & HW_ENT (HW_H_IADDR), CGEN_MODE_USI, & OP_ENT (LABEL9), 0, COND_REF },
1146 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, COND_REF },
1150 static const CGEN_OPERAND_INSTANCE fmt_blt_ops[] = {
1151 { INPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
1152 { INPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
1153 { INPUT, "label9", & HW_ENT (HW_H_IADDR), CGEN_MODE_USI, & OP_ENT (LABEL9), 0, COND_REF },
1154 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, COND_REF },
1158 static const CGEN_OPERAND_INSTANCE fmt_ble_ops[] = {
1159 { INPUT, "vbit", & HW_ENT (HW_H_VBIT), CGEN_MODE_BI, 0, 0, 0 },
1160 { INPUT, "nbit", & HW_ENT (HW_H_NBIT), CGEN_MODE_BI, 0, 0, 0 },
1161 { INPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
1162 { INPUT, "label9", & HW_ENT (HW_H_IADDR), CGEN_MODE_USI, & OP_ENT (LABEL9), 0, COND_REF },
1163 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, COND_REF },
1167 static const CGEN_OPERAND_INSTANCE fmt_bls_ops[] = {
1168 { INPUT, "cbit", & HW_ENT (HW_H_CBIT), CGEN_MODE_BI, 0, 0, 0 },
1169 { INPUT, "zbit", & HW_ENT (HW_H_ZBIT), CGEN_MODE_BI, 0, 0, 0 },
1170 { INPUT, "label9", & HW_ENT (HW_H_IADDR), CGEN_MODE_USI, & OP_ENT (LABEL9), 0, COND_REF },
1171 { OUTPUT, "pc", & HW_ENT (HW_H_PC), CGEN_MODE_USI, 0, 0, COND_REF },
1175 static const CGEN_OPERAND_INSTANCE fmt_dmovr13_ops[] = {
1176 { INPUT, "dir10", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR10), 0, 0 },
1177 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1178 { OUTPUT, "h_memory_dir10", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1182 static const CGEN_OPERAND_INSTANCE fmt_dmovr13h_ops[] = {
1183 { INPUT, "dir9", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR9), 0, 0 },
1184 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1185 { OUTPUT, "h_memory_dir9", & HW_ENT (HW_H_MEMORY), CGEN_MODE_HI, 0, 0, 0 },
1189 static const CGEN_OPERAND_INSTANCE fmt_dmovr13b_ops[] = {
1190 { INPUT, "dir8", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR8), 0, 0 },
1191 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1192 { OUTPUT, "h_memory_dir8", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
1196 static const CGEN_OPERAND_INSTANCE fmt_dmovr13pi_ops[] = {
1197 { INPUT, "dir10", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR10), 0, 0 },
1198 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1199 { INPUT, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1200 { OUTPUT, "h_memory_dir10", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1201 { OUTPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1205 static const CGEN_OPERAND_INSTANCE fmt_dmovr13pih_ops[] = {
1206 { INPUT, "dir9", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR9), 0, 0 },
1207 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1208 { INPUT, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_HI, 0, 0, 0 },
1209 { OUTPUT, "h_memory_dir9", & HW_ENT (HW_H_MEMORY), CGEN_MODE_HI, 0, 0, 0 },
1210 { OUTPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1214 static const CGEN_OPERAND_INSTANCE fmt_dmovr13pib_ops[] = {
1215 { INPUT, "dir8", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR8), 0, 0 },
1216 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1217 { INPUT, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
1218 { OUTPUT, "h_memory_dir8", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
1219 { OUTPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1223 static const CGEN_OPERAND_INSTANCE fmt_dmovr15pi_ops[] = {
1224 { INPUT, "dir10", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR10), 0, 0 },
1225 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1226 { INPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1227 { OUTPUT, "h_memory_dir10", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1228 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1232 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13_ops[] = {
1233 { INPUT, "dir10", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR10), 0, 0 },
1234 { INPUT, "h_memory_dir10", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1235 { OUTPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1239 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13h_ops[] = {
1240 { INPUT, "dir9", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR9), 0, 0 },
1241 { INPUT, "h_memory_dir9", & HW_ENT (HW_H_MEMORY), CGEN_MODE_HI, 0, 0, 0 },
1242 { OUTPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1246 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13b_ops[] = {
1247 { INPUT, "dir8", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR8), 0, 0 },
1248 { INPUT, "h_memory_dir8", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
1249 { OUTPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1253 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13pi_ops[] = {
1254 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1255 { INPUT, "dir10", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR10), 0, 0 },
1256 { INPUT, "h_memory_dir10", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1257 { OUTPUT, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1258 { OUTPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1262 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13pih_ops[] = {
1263 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1264 { INPUT, "dir9", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR9), 0, 0 },
1265 { INPUT, "h_memory_dir9", & HW_ENT (HW_H_MEMORY), CGEN_MODE_HI, 0, 0, 0 },
1266 { OUTPUT, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_HI, 0, 0, 0 },
1267 { OUTPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1271 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13pib_ops[] = {
1272 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1273 { INPUT, "dir8", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR8), 0, 0 },
1274 { INPUT, "h_memory_dir8", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
1275 { OUTPUT, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY), CGEN_MODE_QI, 0, 0, 0 },
1276 { OUTPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, 0 },
1280 static const CGEN_OPERAND_INSTANCE fmt_dmov2r15pd_ops[] = {
1281 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1282 { INPUT, "dir10", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (DIR10), 0, 0 },
1283 { INPUT, "h_memory_dir10", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1284 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1285 { OUTPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1289 static const CGEN_OPERAND_INSTANCE fmt_andccr_ops[] = {
1290 { INPUT, "ccr", & HW_ENT (HW_H_CCR), CGEN_MODE_UQI, 0, 0, 0 },
1291 { INPUT, "u8", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (U8), 0, 0 },
1292 { OUTPUT, "ccr", & HW_ENT (HW_H_CCR), CGEN_MODE_UQI, 0, 0, 0 },
1296 static const CGEN_OPERAND_INSTANCE fmt_stilm_ops[] = {
1297 { INPUT, "u8", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (U8), 0, 0 },
1298 { OUTPUT, "ilm", & HW_ENT (HW_H_ILM), CGEN_MODE_UQI, 0, 0, 0 },
1302 static const CGEN_OPERAND_INSTANCE fmt_addsp_ops[] = {
1303 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1304 { INPUT, "s10", & HW_ENT (HW_H_SINT), CGEN_MODE_SI, & OP_ENT (S10), 0, 0 },
1305 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1309 static const CGEN_OPERAND_INSTANCE fmt_extsb_ops[] = {
1310 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_QI, & OP_ENT (RI), 0, 0 },
1311 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1315 static const CGEN_OPERAND_INSTANCE fmt_extub_ops[] = {
1316 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_UQI, & OP_ENT (RI), 0, 0 },
1317 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1321 static const CGEN_OPERAND_INSTANCE fmt_extsh_ops[] = {
1322 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_HI, & OP_ENT (RI), 0, 0 },
1323 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1327 static const CGEN_OPERAND_INSTANCE fmt_extuh_ops[] = {
1328 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_UHI, & OP_ENT (RI), 0, 0 },
1329 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1333 static const CGEN_OPERAND_INSTANCE fmt_ldm0_ops[] = {
1334 { INPUT, "reglist_low_ld", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (REGLIST_LOW_LD), 0, 0 },
1335 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, COND_REF },
1336 { INPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, COND_REF },
1337 { OUTPUT, "h_gr_0", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 0, COND_REF },
1338 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, COND_REF },
1339 { OUTPUT, "h_gr_1", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 1, COND_REF },
1340 { OUTPUT, "h_gr_2", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 2, COND_REF },
1341 { OUTPUT, "h_gr_3", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 3, COND_REF },
1342 { OUTPUT, "h_gr_4", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 4, COND_REF },
1343 { OUTPUT, "h_gr_5", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 5, COND_REF },
1344 { OUTPUT, "h_gr_6", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 6, COND_REF },
1345 { OUTPUT, "h_gr_7", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 7, COND_REF },
1349 static const CGEN_OPERAND_INSTANCE fmt_ldm1_ops[] = {
1350 { INPUT, "reglist_hi_ld", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (REGLIST_HI_LD), 0, 0 },
1351 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, COND_REF },
1352 { INPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, COND_REF },
1353 { OUTPUT, "h_gr_8", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 8, COND_REF },
1354 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, COND_REF },
1355 { OUTPUT, "h_gr_9", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 9, COND_REF },
1356 { OUTPUT, "h_gr_10", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 10, COND_REF },
1357 { OUTPUT, "h_gr_11", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 11, COND_REF },
1358 { OUTPUT, "h_gr_12", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 12, COND_REF },
1359 { OUTPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, COND_REF },
1360 { OUTPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, COND_REF },
1364 static const CGEN_OPERAND_INSTANCE fmt_stm0_ops[] = {
1365 { INPUT, "reglist_low_st", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (REGLIST_LOW_ST), 0, 0 },
1366 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, COND_REF },
1367 { INPUT, "h_gr_7", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 7, COND_REF },
1368 { INPUT, "h_gr_6", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 6, COND_REF },
1369 { INPUT, "h_gr_5", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 5, COND_REF },
1370 { INPUT, "h_gr_4", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 4, COND_REF },
1371 { INPUT, "h_gr_3", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 3, COND_REF },
1372 { INPUT, "h_gr_2", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 2, COND_REF },
1373 { INPUT, "h_gr_1", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 1, COND_REF },
1374 { INPUT, "h_gr_0", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 0, COND_REF },
1375 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, COND_REF },
1376 { OUTPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, COND_REF },
1380 static const CGEN_OPERAND_INSTANCE fmt_stm1_ops[] = {
1381 { INPUT, "reglist_hi_st", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (REGLIST_HI_ST), 0, 0 },
1382 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, COND_REF },
1383 { INPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, COND_REF },
1384 { INPUT, "h_gr_13", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 13, COND_REF },
1385 { INPUT, "h_gr_12", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 12, COND_REF },
1386 { INPUT, "h_gr_11", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 11, COND_REF },
1387 { INPUT, "h_gr_10", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 10, COND_REF },
1388 { INPUT, "h_gr_9", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 9, COND_REF },
1389 { INPUT, "h_gr_8", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 8, COND_REF },
1390 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, COND_REF },
1391 { OUTPUT, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, COND_REF },
1395 static const CGEN_OPERAND_INSTANCE fmt_enter_ops[] = {
1396 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1397 { INPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, 0 },
1398 { INPUT, "u10", & HW_ENT (HW_H_UINT), CGEN_MODE_USI, & OP_ENT (U10), 0, 0 },
1399 { OUTPUT, "h_memory_tmp", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1400 { OUTPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, 0 },
1401 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1405 static const CGEN_OPERAND_INSTANCE fmt_leave_ops[] = {
1406 { INPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, 0 },
1407 { INPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1408 { INPUT, "h_memory_sub__VM_reg__VM_h_gr_15_const__WI_4", & HW_ENT (HW_H_MEMORY), CGEN_MODE_SI, 0, 0, 0 },
1409 { OUTPUT, "h_gr_15", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 15, 0 },
1410 { OUTPUT, "h_gr_14", & HW_ENT (HW_H_GR), CGEN_MODE_SI, 0, 14, 0 },
1414 static const CGEN_OPERAND_INSTANCE fmt_xchb_ops[] = {
1415 { INPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1416 { INPUT, "Rj", & HW_ENT (HW_H_GR), CGEN_MODE_USI, & OP_ENT (RJ), 0, 0 },
1417 { INPUT, "h_memory_Rj", & HW_ENT (HW_H_MEMORY), CGEN_MODE_UQI, 0, 0, 0 },
1418 { OUTPUT, "Ri", & HW_ENT (HW_H_GR), CGEN_MODE_SI, & OP_ENT (RI), 0, 0 },
1419 { OUTPUT, "h_memory_Rj", & HW_ENT (HW_H_MEMORY), CGEN_MODE_UQI, 0, 0, 0 },
1427 /* Instruction formats. */
1429 #define F(f) & fr30_cgen_ifld_table[CONCAT2 (FR30_,f)]
1431 static const CGEN_IFMT fmt_add = {
1432 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1435 static const CGEN_IFMT fmt_addi = {
1436 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_U4), F (F_RI), 0 }
1439 static const CGEN_IFMT fmt_add2 = {
1440 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_M4), F (F_RI), 0 }
1443 static const CGEN_IFMT fmt_addc = {
1444 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1447 static const CGEN_IFMT fmt_addn = {
1448 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1451 static const CGEN_IFMT fmt_addni = {
1452 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_U4), F (F_RI), 0 }
1455 static const CGEN_IFMT fmt_addn2 = {
1456 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_M4), F (F_RI), 0 }
1459 static const CGEN_IFMT fmt_cmp = {
1460 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1463 static const CGEN_IFMT fmt_cmpi = {
1464 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_U4), F (F_RI), 0 }
1467 static const CGEN_IFMT fmt_cmp2 = {
1468 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_M4), F (F_RI), 0 }
1471 static const CGEN_IFMT fmt_and = {
1472 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1475 static const CGEN_IFMT fmt_andm = {
1476 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1479 static const CGEN_IFMT fmt_andh = {
1480 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1483 static const CGEN_IFMT fmt_andb = {
1484 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1487 static const CGEN_IFMT fmt_bandl = {
1488 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_U4), F (F_RI), 0 }
1491 static const CGEN_IFMT fmt_btstl = {
1492 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_U4), F (F_RI), 0 }
1495 static const CGEN_IFMT fmt_mul = {
1496 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1499 static const CGEN_IFMT fmt_mulu = {
1500 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1503 static const CGEN_IFMT fmt_mulh = {
1504 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1507 static const CGEN_IFMT fmt_div0s = {
1508 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1511 static const CGEN_IFMT fmt_div3 = {
1512 16, 16, 0xffff, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_OP4), 0 }
1515 static const CGEN_IFMT fmt_lsl = {
1516 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1519 static const CGEN_IFMT fmt_lsli = {
1520 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_U4), F (F_RI), 0 }
1523 static const CGEN_IFMT fmt_ldi8 = {
1524 16, 16, 0xf000, { F (F_OP1), F (F_I8), F (F_RI), 0 }
1527 static const CGEN_IFMT fmt_ldi20 = {
1528 16, 32, 0xff00, { F (F_OP1), F (F_I20), F (F_OP2), F (F_RI), 0 }
1531 static const CGEN_IFMT fmt_ldi32 = {
1532 16, 48, 0xfff0, { F (F_OP1), F (F_I32), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1535 static const CGEN_IFMT fmt_ld = {
1536 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1539 static const CGEN_IFMT fmt_lduh = {
1540 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1543 static const CGEN_IFMT fmt_ldub = {
1544 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1547 static const CGEN_IFMT fmt_ldr13 = {
1548 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1551 static const CGEN_IFMT fmt_ldr13uh = {
1552 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1555 static const CGEN_IFMT fmt_ldr13ub = {
1556 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1559 static const CGEN_IFMT fmt_ldr14 = {
1560 16, 16, 0xf000, { F (F_OP1), F (F_DISP10), F (F_RI), 0 }
1563 static const CGEN_IFMT fmt_ldr14uh = {
1564 16, 16, 0xf000, { F (F_OP1), F (F_DISP9), F (F_RI), 0 }
1567 static const CGEN_IFMT fmt_ldr14ub = {
1568 16, 16, 0xf000, { F (F_OP1), F (F_DISP8), F (F_RI), 0 }
1571 static const CGEN_IFMT fmt_ldr15 = {
1572 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_UDISP6), F (F_RI), 0 }
1575 static const CGEN_IFMT fmt_ldr15gr = {
1576 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1579 static const CGEN_IFMT fmt_ldr15dr = {
1580 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RS2), 0 }
1583 static const CGEN_IFMT fmt_ldr15ps = {
1584 16, 16, 0xffff, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_OP4), 0 }
1587 static const CGEN_IFMT fmt_st = {
1588 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1591 static const CGEN_IFMT fmt_sth = {
1592 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1595 static const CGEN_IFMT fmt_stb = {
1596 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1599 static const CGEN_IFMT fmt_str13 = {
1600 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1603 static const CGEN_IFMT fmt_str13h = {
1604 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1607 static const CGEN_IFMT fmt_str13b = {
1608 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1611 static const CGEN_IFMT fmt_str14 = {
1612 16, 16, 0xf000, { F (F_OP1), F (F_DISP10), F (F_RI), 0 }
1615 static const CGEN_IFMT fmt_str14h = {
1616 16, 16, 0xf000, { F (F_OP1), F (F_DISP9), F (F_RI), 0 }
1619 static const CGEN_IFMT fmt_str14b = {
1620 16, 16, 0xf000, { F (F_OP1), F (F_DISP8), F (F_RI), 0 }
1623 static const CGEN_IFMT fmt_str15 = {
1624 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_UDISP6), F (F_RI), 0 }
1627 static const CGEN_IFMT fmt_str15gr = {
1628 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1631 static const CGEN_IFMT fmt_str15dr = {
1632 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RS2), 0 }
1635 static const CGEN_IFMT fmt_str15ps = {
1636 16, 16, 0xffff, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_OP4), 0 }
1639 static const CGEN_IFMT fmt_mov = {
1640 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1643 static const CGEN_IFMT fmt_movdr = {
1644 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RS1), F (F_RI), 0 }
1647 static const CGEN_IFMT fmt_movps = {
1648 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1651 static const CGEN_IFMT fmt_mov2dr = {
1652 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RS1), F (F_RI), 0 }
1655 static const CGEN_IFMT fmt_mov2ps = {
1656 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1659 static const CGEN_IFMT fmt_jmp = {
1660 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1663 static const CGEN_IFMT fmt_callr = {
1664 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1667 static const CGEN_IFMT fmt_call = {
1668 16, 16, 0xf800, { F (F_OP1), F (F_OP5), F (F_REL12), 0 }
1671 static const CGEN_IFMT fmt_ret = {
1672 16, 16, 0xffff, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_OP4), 0 }
1675 static const CGEN_IFMT fmt_int = {
1676 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_U8), 0 }
1679 static const CGEN_IFMT fmt_inte = {
1680 16, 16, 0xffff, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_OP4), 0 }
1683 static const CGEN_IFMT fmt_reti = {
1684 16, 16, 0xffff, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_OP4), 0 }
1687 static const CGEN_IFMT fmt_bra = {
1688 16, 16, 0xff00, { F (F_OP1), F (F_CC), F (F_REL9), 0 }
1691 static const CGEN_IFMT fmt_beq = {
1692 16, 16, 0xff00, { F (F_OP1), F (F_CC), F (F_REL9), 0 }
1695 static const CGEN_IFMT fmt_bc = {
1696 16, 16, 0xff00, { F (F_OP1), F (F_CC), F (F_REL9), 0 }
1699 static const CGEN_IFMT fmt_bn = {
1700 16, 16, 0xff00, { F (F_OP1), F (F_CC), F (F_REL9), 0 }
1703 static const CGEN_IFMT fmt_bv = {
1704 16, 16, 0xff00, { F (F_OP1), F (F_CC), F (F_REL9), 0 }
1707 static const CGEN_IFMT fmt_blt = {
1708 16, 16, 0xff00, { F (F_OP1), F (F_CC), F (F_REL9), 0 }
1711 static const CGEN_IFMT fmt_ble = {
1712 16, 16, 0xff00, { F (F_OP1), F (F_CC), F (F_REL9), 0 }
1715 static const CGEN_IFMT fmt_bls = {
1716 16, 16, 0xff00, { F (F_OP1), F (F_CC), F (F_REL9), 0 }
1719 static const CGEN_IFMT fmt_dmovr13 = {
1720 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR10), 0 }
1723 static const CGEN_IFMT fmt_dmovr13h = {
1724 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR9), 0 }
1727 static const CGEN_IFMT fmt_dmovr13b = {
1728 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR8), 0 }
1731 static const CGEN_IFMT fmt_dmovr13pi = {
1732 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR10), 0 }
1735 static const CGEN_IFMT fmt_dmovr13pih = {
1736 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR9), 0 }
1739 static const CGEN_IFMT fmt_dmovr13pib = {
1740 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR8), 0 }
1743 static const CGEN_IFMT fmt_dmovr15pi = {
1744 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR10), 0 }
1747 static const CGEN_IFMT fmt_dmov2r13 = {
1748 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR10), 0 }
1751 static const CGEN_IFMT fmt_dmov2r13h = {
1752 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR9), 0 }
1755 static const CGEN_IFMT fmt_dmov2r13b = {
1756 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR8), 0 }
1759 static const CGEN_IFMT fmt_dmov2r13pi = {
1760 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR10), 0 }
1763 static const CGEN_IFMT fmt_dmov2r13pih = {
1764 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR9), 0 }
1767 static const CGEN_IFMT fmt_dmov2r13pib = {
1768 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR8), 0 }
1771 static const CGEN_IFMT fmt_dmov2r15pd = {
1772 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_DIR10), 0 }
1775 static const CGEN_IFMT fmt_ldres = {
1776 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_U4), F (F_RI), 0 }
1779 static const CGEN_IFMT fmt_copop = {
1780 16, 32, 0xfff0, { F (F_OP1), F (F_CCC), F (F_OP2), F (F_OP3), F (F_CRJ), F (F_U4C), F (F_CRI), 0 }
1783 static const CGEN_IFMT fmt_copld = {
1784 16, 32, 0xfff0, { F (F_OP1), F (F_CCC), F (F_OP2), F (F_OP3), F (F_RJC), F (F_U4C), F (F_CRI), 0 }
1787 static const CGEN_IFMT fmt_copst = {
1788 16, 32, 0xfff0, { F (F_OP1), F (F_CCC), F (F_OP2), F (F_OP3), F (F_CRJ), F (F_U4C), F (F_RIC), 0 }
1791 static const CGEN_IFMT fmt_andccr = {
1792 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_U8), 0 }
1795 static const CGEN_IFMT fmt_stilm = {
1796 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_U8), 0 }
1799 static const CGEN_IFMT fmt_addsp = {
1800 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_S10), 0 }
1803 static const CGEN_IFMT fmt_extsb = {
1804 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1807 static const CGEN_IFMT fmt_extub = {
1808 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1811 static const CGEN_IFMT fmt_extsh = {
1812 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1815 static const CGEN_IFMT fmt_extuh = {
1816 16, 16, 0xfff0, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_RI), 0 }
1819 static const CGEN_IFMT fmt_ldm0 = {
1820 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_REGLIST_LOW_LD), 0 }
1823 static const CGEN_IFMT fmt_ldm1 = {
1824 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_REGLIST_HI_LD), 0 }
1827 static const CGEN_IFMT fmt_stm0 = {
1828 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_REGLIST_LOW_ST), 0 }
1831 static const CGEN_IFMT fmt_stm1 = {
1832 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_REGLIST_HI_ST), 0 }
1835 static const CGEN_IFMT fmt_enter = {
1836 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_U10), 0 }
1839 static const CGEN_IFMT fmt_leave = {
1840 16, 16, 0xffff, { F (F_OP1), F (F_OP2), F (F_OP3), F (F_OP4), 0 }
1843 static const CGEN_IFMT fmt_xchb = {
1844 16, 16, 0xff00, { F (F_OP1), F (F_OP2), F (F_RJ), F (F_RI), 0 }
1849 #define A(a) (1 << CONCAT2 (CGEN_INSN_,a))
1850 #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
1851 #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
1853 /* The instruction table.
1854 This is currently non-static because the simulator accesses it
1857 const CGEN_INSN fr30_cgen_insn_table_entries[MAX_INSNS] =
1859 /* Special null first entry.
1860 A `num' value of zero is thus invalid.
1861 Also, the special `invalid' insn resides here. */
1866 FR30_INSN_ADD, "add", "add",
1867 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
1868 & fmt_add, { 0xa600 },
1869 (PTR) & fmt_add_ops[0],
1875 FR30_INSN_ADDI, "addi", "add",
1876 { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
1877 & fmt_addi, { 0xa400 },
1878 (PTR) & fmt_addi_ops[0],
1884 FR30_INSN_ADD2, "add2", "add2",
1885 { { MNEM, ' ', OP (M4), ',', OP (RI), 0 } },
1886 & fmt_add2, { 0xa500 },
1887 (PTR) & fmt_add2_ops[0],
1893 FR30_INSN_ADDC, "addc", "addc",
1894 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
1895 & fmt_addc, { 0xa700 },
1896 (PTR) & fmt_addc_ops[0],
1902 FR30_INSN_ADDN, "addn", "addn",
1903 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
1904 & fmt_addn, { 0xa200 },
1905 (PTR) & fmt_addn_ops[0],
1911 FR30_INSN_ADDNI, "addni", "addn",
1912 { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
1913 & fmt_addni, { 0xa000 },
1914 (PTR) & fmt_addni_ops[0],
1920 FR30_INSN_ADDN2, "addn2", "addn2",
1921 { { MNEM, ' ', OP (M4), ',', OP (RI), 0 } },
1922 & fmt_addn2, { 0xa100 },
1923 (PTR) & fmt_addn2_ops[0],
1929 FR30_INSN_SUB, "sub", "sub",
1930 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
1931 & fmt_add, { 0xac00 },
1932 (PTR) & fmt_add_ops[0],
1938 FR30_INSN_SUBC, "subc", "subc",
1939 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
1940 & fmt_addc, { 0xad00 },
1941 (PTR) & fmt_addc_ops[0],
1947 FR30_INSN_SUBN, "subn", "subn",
1948 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
1949 & fmt_addn, { 0xae00 },
1950 (PTR) & fmt_addn_ops[0],
1956 FR30_INSN_CMP, "cmp", "cmp",
1957 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
1958 & fmt_cmp, { 0xaa00 },
1959 (PTR) & fmt_cmp_ops[0],
1965 FR30_INSN_CMPI, "cmpi", "cmp",
1966 { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
1967 & fmt_cmpi, { 0xa800 },
1968 (PTR) & fmt_cmpi_ops[0],
1974 FR30_INSN_CMP2, "cmp2", "cmp2",
1975 { { MNEM, ' ', OP (M4), ',', OP (RI), 0 } },
1976 & fmt_cmp2, { 0xa900 },
1977 (PTR) & fmt_cmp2_ops[0],
1983 FR30_INSN_AND, "and", "and",
1984 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
1985 & fmt_and, { 0x8200 },
1986 (PTR) & fmt_and_ops[0],
1992 FR30_INSN_OR, "or", "or",
1993 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
1994 & fmt_and, { 0x9200 },
1995 (PTR) & fmt_and_ops[0],
2001 FR30_INSN_EOR, "eor", "eor",
2002 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
2003 & fmt_and, { 0x9a00 },
2004 (PTR) & fmt_and_ops[0],
2010 FR30_INSN_ANDM, "andm", "and",
2011 { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
2012 & fmt_andm, { 0x8400 },
2013 (PTR) & fmt_andm_ops[0],
2019 FR30_INSN_ANDH, "andh", "andh",
2020 { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
2021 & fmt_andh, { 0x8500 },
2022 (PTR) & fmt_andh_ops[0],
2028 FR30_INSN_ANDB, "andb", "andb",
2029 { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
2030 & fmt_andb, { 0x8600 },
2031 (PTR) & fmt_andb_ops[0],
2037 FR30_INSN_ORM, "orm", "or",
2038 { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
2039 & fmt_andm, { 0x9400 },
2040 (PTR) & fmt_andm_ops[0],
2046 FR30_INSN_ORH, "orh", "orh",
2047 { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
2048 & fmt_andh, { 0x9500 },
2049 (PTR) & fmt_andh_ops[0],
2055 FR30_INSN_ORB, "orb", "orb",
2056 { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
2057 & fmt_andb, { 0x9600 },
2058 (PTR) & fmt_andb_ops[0],
2064 FR30_INSN_EORM, "eorm", "eor",
2065 { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
2066 & fmt_andm, { 0x9c00 },
2067 (PTR) & fmt_andm_ops[0],
2073 FR30_INSN_EORH, "eorh", "eorh",
2074 { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
2075 & fmt_andh, { 0x9d00 },
2076 (PTR) & fmt_andh_ops[0],
2082 FR30_INSN_EORB, "eorb", "eorb",
2083 { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
2084 & fmt_andb, { 0x9e00 },
2085 (PTR) & fmt_andb_ops[0],
2088 /* bandl $u4,@$Ri */
2091 FR30_INSN_BANDL, "bandl", "bandl",
2092 { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
2093 & fmt_bandl, { 0x8000 },
2094 (PTR) & fmt_bandl_ops[0],
2100 FR30_INSN_BORL, "borl", "borl",
2101 { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
2102 & fmt_bandl, { 0x9000 },
2103 (PTR) & fmt_bandl_ops[0],
2106 /* beorl $u4,@$Ri */
2109 FR30_INSN_BEORL, "beorl", "beorl",
2110 { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
2111 & fmt_bandl, { 0x9800 },
2112 (PTR) & fmt_bandl_ops[0],
2115 /* bandh $u4,@$Ri */
2118 FR30_INSN_BANDH, "bandh", "bandh",
2119 { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
2120 & fmt_bandl, { 0x8100 },
2121 (PTR) & fmt_bandl_ops[0],
2127 FR30_INSN_BORH, "borh", "borh",
2128 { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
2129 & fmt_bandl, { 0x9100 },
2130 (PTR) & fmt_bandl_ops[0],
2133 /* beorh $u4,@$Ri */
2136 FR30_INSN_BEORH, "beorh", "beorh",
2137 { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
2138 & fmt_bandl, { 0x9900 },
2139 (PTR) & fmt_bandl_ops[0],
2142 /* btstl $u4,@$Ri */
2145 FR30_INSN_BTSTL, "btstl", "btstl",
2146 { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
2147 & fmt_btstl, { 0x8800 },
2148 (PTR) & fmt_btstl_ops[0],
2151 /* btsth $u4,@$Ri */
2154 FR30_INSN_BTSTH, "btsth", "btsth",
2155 { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
2156 & fmt_btstl, { 0x8900 },
2157 (PTR) & fmt_btstl_ops[0],
2163 FR30_INSN_MUL, "mul", "mul",
2164 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
2165 & fmt_mul, { 0xaf00 },
2166 (PTR) & fmt_mul_ops[0],
2172 FR30_INSN_MULU, "mulu", "mulu",
2173 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
2174 & fmt_mulu, { 0xab00 },
2175 (PTR) & fmt_mulu_ops[0],
2181 FR30_INSN_MULH, "mulh", "mulh",
2182 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
2183 & fmt_mulh, { 0xbf00 },
2184 (PTR) & fmt_mulh_ops[0],
2190 FR30_INSN_MULUH, "muluh", "muluh",
2191 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
2192 & fmt_mulh, { 0xbb00 },
2193 (PTR) & fmt_mulh_ops[0],
2199 FR30_INSN_DIV0S, "div0s", "div0s",
2200 { { MNEM, ' ', OP (RI), 0 } },
2201 & fmt_div0s, { 0x9740 },
2208 FR30_INSN_DIV0U, "div0u", "div0u",
2209 { { MNEM, ' ', OP (RI), 0 } },
2210 & fmt_div0s, { 0x9750 },
2217 FR30_INSN_DIV1, "div1", "div1",
2218 { { MNEM, ' ', OP (RI), 0 } },
2219 & fmt_div0s, { 0x9760 },
2226 FR30_INSN_DIV2, "div2", "div2",
2227 { { MNEM, ' ', OP (RI), 0 } },
2228 & fmt_div0s, { 0x9770 },
2235 FR30_INSN_DIV3, "div3", "div3",
2237 & fmt_div3, { 0x9f60 },
2244 FR30_INSN_DIV4S, "div4s", "div4s",
2246 & fmt_div3, { 0x9f70 },
2253 FR30_INSN_LSL, "lsl", "lsl",
2254 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
2255 & fmt_lsl, { 0xb600 },
2256 (PTR) & fmt_lsl_ops[0],
2262 FR30_INSN_LSLI, "lsli", "lsl",
2263 { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
2264 & fmt_lsli, { 0xb400 },
2265 (PTR) & fmt_lsli_ops[0],
2271 FR30_INSN_LSL2, "lsl2", "lsl2",
2272 { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
2273 & fmt_lsli, { 0xb500 },
2274 (PTR) & fmt_lsli_ops[0],
2280 FR30_INSN_LSR, "lsr", "lsr",
2281 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
2282 & fmt_lsl, { 0xb200 },
2283 (PTR) & fmt_lsl_ops[0],
2289 FR30_INSN_LSRI, "lsri", "lsr",
2290 { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
2291 & fmt_lsli, { 0xb000 },
2292 (PTR) & fmt_lsli_ops[0],
2298 FR30_INSN_LSR2, "lsr2", "lsr2",
2299 { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
2300 & fmt_lsli, { 0xb100 },
2301 (PTR) & fmt_lsli_ops[0],
2307 FR30_INSN_ASR, "asr", "asr",
2308 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
2309 & fmt_lsl, { 0xba00 },
2310 (PTR) & fmt_lsl_ops[0],
2316 FR30_INSN_ASRI, "asri", "asr",
2317 { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
2318 & fmt_lsli, { 0xb800 },
2319 (PTR) & fmt_lsli_ops[0],
2325 FR30_INSN_ASR2, "asr2", "asr2",
2326 { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
2327 & fmt_lsli, { 0xb900 },
2328 (PTR) & fmt_lsli_ops[0],
2334 FR30_INSN_LDI8, "ldi8", "ldi:8",
2335 { { MNEM, ' ', OP (I8), ',', OP (RI), 0 } },
2336 & fmt_ldi8, { 0xc000 },
2337 (PTR) & fmt_ldi8_ops[0],
2340 /* ldi:20 $i20,$Ri */
2343 FR30_INSN_LDI20, "ldi20", "ldi:20",
2344 { { MNEM, ' ', OP (I20), ',', OP (RI), 0 } },
2345 & fmt_ldi20, { 0x9b00 },
2346 (PTR) & fmt_ldi20_ops[0],
2347 { 0, 0|A(NOT_IN_DELAY_SLOT), { 0 } }
2349 /* ldi:32 $i32,$Ri */
2352 FR30_INSN_LDI32, "ldi32", "ldi:32",
2353 { { MNEM, ' ', OP (I32), ',', OP (RI), 0 } },
2354 & fmt_ldi32, { 0x9f80 },
2355 (PTR) & fmt_ldi32_ops[0],
2361 FR30_INSN_LD, "ld", "ld",
2362 { { MNEM, ' ', '@', OP (RJ), ',', OP (RI), 0 } },
2363 & fmt_ld, { 0x400 },
2364 (PTR) & fmt_ld_ops[0],
2370 FR30_INSN_LDUH, "lduh", "lduh",
2371 { { MNEM, ' ', '@', OP (RJ), ',', OP (RI), 0 } },
2372 & fmt_lduh, { 0x500 },
2373 (PTR) & fmt_lduh_ops[0],
2379 FR30_INSN_LDUB, "ldub", "ldub",
2380 { { MNEM, ' ', '@', OP (RJ), ',', OP (RI), 0 } },
2381 & fmt_ldub, { 0x600 },
2382 (PTR) & fmt_ldub_ops[0],
2385 /* ld @($R13,$Rj),$Ri */
2388 FR30_INSN_LDR13, "ldr13", "ld",
2389 { { MNEM, ' ', '@', '(', OP (R13), ',', OP (RJ), ')', ',', OP (RI), 0 } },
2390 & fmt_ldr13, { 0x0 },
2391 (PTR) & fmt_ldr13_ops[0],
2394 /* lduh @($R13,$Rj),$Ri */
2397 FR30_INSN_LDR13UH, "ldr13uh", "lduh",
2398 { { MNEM, ' ', '@', '(', OP (R13), ',', OP (RJ), ')', ',', OP (RI), 0 } },
2399 & fmt_ldr13uh, { 0x100 },
2400 (PTR) & fmt_ldr13uh_ops[0],
2403 /* ldub @($R13,$Rj),$Ri */
2406 FR30_INSN_LDR13UB, "ldr13ub", "ldub",
2407 { { MNEM, ' ', '@', '(', OP (R13), ',', OP (RJ), ')', ',', OP (RI), 0 } },
2408 & fmt_ldr13ub, { 0x200 },
2409 (PTR) & fmt_ldr13ub_ops[0],
2412 /* ld @($R14,$disp10),$Ri */
2415 FR30_INSN_LDR14, "ldr14", "ld",
2416 { { MNEM, ' ', '@', '(', OP (R14), ',', OP (DISP10), ')', ',', OP (RI), 0 } },
2417 & fmt_ldr14, { 0x2000 },
2418 (PTR) & fmt_ldr14_ops[0],
2421 /* lduh @($R14,$disp9),$Ri */
2424 FR30_INSN_LDR14UH, "ldr14uh", "lduh",
2425 { { MNEM, ' ', '@', '(', OP (R14), ',', OP (DISP9), ')', ',', OP (RI), 0 } },
2426 & fmt_ldr14uh, { 0x4000 },
2427 (PTR) & fmt_ldr14uh_ops[0],
2430 /* ldub @($R14,$disp8),$Ri */
2433 FR30_INSN_LDR14UB, "ldr14ub", "ldub",
2434 { { MNEM, ' ', '@', '(', OP (R14), ',', OP (DISP8), ')', ',', OP (RI), 0 } },
2435 & fmt_ldr14ub, { 0x6000 },
2436 (PTR) & fmt_ldr14ub_ops[0],
2439 /* ld @($R15,$udisp6),$Ri */
2442 FR30_INSN_LDR15, "ldr15", "ld",
2443 { { MNEM, ' ', '@', '(', OP (R15), ',', OP (UDISP6), ')', ',', OP (RI), 0 } },
2444 & fmt_ldr15, { 0x300 },
2445 (PTR) & fmt_ldr15_ops[0],
2451 FR30_INSN_LDR15GR, "ldr15gr", "ld",
2452 { { MNEM, ' ', '@', OP (R15), '+', ',', OP (RI), 0 } },
2453 & fmt_ldr15gr, { 0x700 },
2454 (PTR) & fmt_ldr15gr_ops[0],
2457 /* ld @$R15+,$Rs2 */
2460 FR30_INSN_LDR15DR, "ldr15dr", "ld",
2461 { { MNEM, ' ', '@', OP (R15), '+', ',', OP (RS2), 0 } },
2462 & fmt_ldr15dr, { 0x780 },
2463 (PTR) & fmt_ldr15dr_ops[0],
2469 FR30_INSN_LDR15PS, "ldr15ps", "ld",
2470 { { MNEM, ' ', '@', OP (R15), '+', ',', OP (PS), 0 } },
2471 & fmt_ldr15ps, { 0x790 },
2472 (PTR) & fmt_ldr15ps_ops[0],
2478 FR30_INSN_ST, "st", "st",
2479 { { MNEM, ' ', OP (RI), ',', '@', OP (RJ), 0 } },
2480 & fmt_st, { 0x1400 },
2481 (PTR) & fmt_st_ops[0],
2487 FR30_INSN_STH, "sth", "sth",
2488 { { MNEM, ' ', OP (RI), ',', '@', OP (RJ), 0 } },
2489 & fmt_sth, { 0x1500 },
2490 (PTR) & fmt_sth_ops[0],
2496 FR30_INSN_STB, "stb", "stb",
2497 { { MNEM, ' ', OP (RI), ',', '@', OP (RJ), 0 } },
2498 & fmt_stb, { 0x1600 },
2499 (PTR) & fmt_stb_ops[0],
2502 /* st $Ri,@($R13,$Rj) */
2505 FR30_INSN_STR13, "str13", "st",
2506 { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R13), ',', OP (RJ), ')', 0 } },
2507 & fmt_str13, { 0x1000 },
2508 (PTR) & fmt_str13_ops[0],
2511 /* sth $Ri,@($R13,$Rj) */
2514 FR30_INSN_STR13H, "str13h", "sth",
2515 { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R13), ',', OP (RJ), ')', 0 } },
2516 & fmt_str13h, { 0x1100 },
2517 (PTR) & fmt_str13h_ops[0],
2520 /* stb $Ri,@($R13,$Rj) */
2523 FR30_INSN_STR13B, "str13b", "stb",
2524 { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R13), ',', OP (RJ), ')', 0 } },
2525 & fmt_str13b, { 0x1200 },
2526 (PTR) & fmt_str13b_ops[0],
2529 /* st $Ri,@($R14,$disp10) */
2532 FR30_INSN_STR14, "str14", "st",
2533 { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R14), ',', OP (DISP10), ')', 0 } },
2534 & fmt_str14, { 0x3000 },
2535 (PTR) & fmt_str14_ops[0],
2538 /* sth $Ri,@($R14,$disp9) */
2541 FR30_INSN_STR14H, "str14h", "sth",
2542 { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R14), ',', OP (DISP9), ')', 0 } },
2543 & fmt_str14h, { 0x5000 },
2544 (PTR) & fmt_str14h_ops[0],
2547 /* stb $Ri,@($R14,$disp8) */
2550 FR30_INSN_STR14B, "str14b", "stb",
2551 { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R14), ',', OP (DISP8), ')', 0 } },
2552 & fmt_str14b, { 0x7000 },
2553 (PTR) & fmt_str14b_ops[0],
2556 /* st $Ri,@($R15,$udisp6) */
2559 FR30_INSN_STR15, "str15", "st",
2560 { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R15), ',', OP (UDISP6), ')', 0 } },
2561 & fmt_str15, { 0x1300 },
2562 (PTR) & fmt_str15_ops[0],
2568 FR30_INSN_STR15GR, "str15gr", "st",
2569 { { MNEM, ' ', OP (RI), ',', '@', '-', OP (R15), 0 } },
2570 & fmt_str15gr, { 0x1700 },
2571 (PTR) & fmt_str15gr_ops[0],
2574 /* st $Rs2,@-$R15 */
2577 FR30_INSN_STR15DR, "str15dr", "st",
2578 { { MNEM, ' ', OP (RS2), ',', '@', '-', OP (R15), 0 } },
2579 & fmt_str15dr, { 0x1780 },
2580 (PTR) & fmt_str15dr_ops[0],
2586 FR30_INSN_STR15PS, "str15ps", "st",
2587 { { MNEM, ' ', OP (PS), ',', '@', '-', OP (R15), 0 } },
2588 & fmt_str15ps, { 0x1790 },
2589 (PTR) & fmt_str15ps_ops[0],
2595 FR30_INSN_MOV, "mov", "mov",
2596 { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
2597 & fmt_mov, { 0x8b00 },
2598 (PTR) & fmt_mov_ops[0],
2604 FR30_INSN_MOVDR, "movdr", "mov",
2605 { { MNEM, ' ', OP (RS1), ',', OP (RI), 0 } },
2606 & fmt_movdr, { 0xb700 },
2607 (PTR) & fmt_movdr_ops[0],
2613 FR30_INSN_MOVPS, "movps", "mov",
2614 { { MNEM, ' ', OP (PS), ',', OP (RI), 0 } },
2615 & fmt_movps, { 0x1710 },
2616 (PTR) & fmt_movps_ops[0],
2622 FR30_INSN_MOV2DR, "mov2dr", "mov",
2623 { { MNEM, ' ', OP (RI), ',', OP (RS1), 0 } },
2624 & fmt_mov2dr, { 0xb300 },
2625 (PTR) & fmt_mov2dr_ops[0],
2631 FR30_INSN_MOV2PS, "mov2ps", "mov",
2632 { { MNEM, ' ', OP (RI), ',', OP (PS), 0 } },
2633 & fmt_mov2ps, { 0x710 },
2634 (PTR) & fmt_mov2ps_ops[0],
2640 FR30_INSN_JMP, "jmp", "jmp",
2641 { { MNEM, ' ', '@', OP (RI), 0 } },
2642 & fmt_jmp, { 0x9700 },
2643 (PTR) & fmt_jmp_ops[0],
2644 { 0, 0|A(UNCOND_CTI), { 0 } }
2649 FR30_INSN_JMPD, "jmpd", "jmp:d",
2650 { { MNEM, ' ', '@', OP (RI), 0 } },
2651 & fmt_jmp, { 0x9f00 },
2652 (PTR) & fmt_jmp_ops[0],
2653 { 0, 0|A(NOT_IN_DELAY_SLOT)|A(DELAY_SLOT)|A(UNCOND_CTI), { 0 } }
2658 FR30_INSN_CALLR, "callr", "call",
2659 { { MNEM, ' ', '@', OP (RI), 0 } },
2660 & fmt_callr, { 0x9710 },
2661 (PTR) & fmt_callr_ops[0],
2662 { 0, 0|A(UNCOND_CTI), { 0 } }
2667 FR30_INSN_CALLRD, "callrd", "call:d",
2668 { { MNEM, ' ', '@', OP (RI), 0 } },
2669 & fmt_callr, { 0x9f10 },
2670 (PTR) & fmt_callr_ops[0],
2671 { 0, 0|A(DELAY_SLOT)|A(UNCOND_CTI), { 0 } }
2676 FR30_INSN_CALL, "call", "call",
2677 { { MNEM, ' ', OP (LABEL12), 0 } },
2678 & fmt_call, { 0xd000 },
2679 (PTR) & fmt_call_ops[0],
2680 { 0, 0|A(UNCOND_CTI), { 0 } }
2682 /* call:d $label12 */
2685 FR30_INSN_CALLD, "calld", "call:d",
2686 { { MNEM, ' ', OP (LABEL12), 0 } },
2687 & fmt_call, { 0xd800 },
2688 (PTR) & fmt_call_ops[0],
2689 { 0, 0|A(DELAY_SLOT)|A(UNCOND_CTI), { 0 } }
2694 FR30_INSN_RET, "ret", "ret",
2696 & fmt_ret, { 0x9720 },
2697 (PTR) & fmt_ret_ops[0],
2698 { 0, 0|A(UNCOND_CTI), { 0 } }
2703 FR30_INSN_RET_D, "ret:d", "ret:d",
2705 & fmt_ret, { 0x9f20 },
2706 (PTR) & fmt_ret_ops[0],
2707 { 0, 0|A(DELAY_SLOT)|A(UNCOND_CTI), { 0 } }
2712 FR30_INSN_INT, "int", "int",
2713 { { MNEM, ' ', OP (U8), 0 } },
2714 & fmt_int, { 0x1f00 },
2715 (PTR) & fmt_int_ops[0],
2716 { 0, 0|A(UNCOND_CTI), { 0 } }
2721 FR30_INSN_INTE, "inte", "inte",
2723 & fmt_inte, { 0x9f30 },
2724 (PTR) & fmt_inte_ops[0],
2725 { 0, 0|A(UNCOND_CTI), { 0 } }
2730 FR30_INSN_RETI, "reti", "reti",
2732 & fmt_reti, { 0x9730 },
2733 (PTR) & fmt_reti_ops[0],
2734 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2739 FR30_INSN_BRA, "bra", "bra",
2740 { { MNEM, ' ', OP (LABEL9), 0 } },
2741 & fmt_bra, { 0xe000 },
2742 (PTR) & fmt_bra_ops[0],
2743 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2748 FR30_INSN_BRAD, "brad", "bra:d",
2749 { { MNEM, ' ', OP (LABEL9), 0 } },
2750 & fmt_bra, { 0xf000 },
2751 (PTR) & fmt_bra_ops[0],
2752 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2757 FR30_INSN_BNO, "bno", "bno",
2758 { { MNEM, ' ', OP (LABEL9), 0 } },
2759 & fmt_bra, { 0xe100 },
2760 (PTR) & fmt_bra_ops[0],
2761 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2766 FR30_INSN_BNOD, "bnod", "bno:d",
2767 { { MNEM, ' ', OP (LABEL9), 0 } },
2768 & fmt_bra, { 0xf100 },
2769 (PTR) & fmt_bra_ops[0],
2770 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2775 FR30_INSN_BEQ, "beq", "beq",
2776 { { MNEM, ' ', OP (LABEL9), 0 } },
2777 & fmt_beq, { 0xe200 },
2778 (PTR) & fmt_beq_ops[0],
2779 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2784 FR30_INSN_BEQD, "beqd", "beq:d",
2785 { { MNEM, ' ', OP (LABEL9), 0 } },
2786 & fmt_beq, { 0xf200 },
2787 (PTR) & fmt_beq_ops[0],
2788 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2793 FR30_INSN_BNE, "bne", "bne",
2794 { { MNEM, ' ', OP (LABEL9), 0 } },
2795 & fmt_beq, { 0xe300 },
2796 (PTR) & fmt_beq_ops[0],
2797 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2802 FR30_INSN_BNED, "bned", "bne:d",
2803 { { MNEM, ' ', OP (LABEL9), 0 } },
2804 & fmt_beq, { 0xf300 },
2805 (PTR) & fmt_beq_ops[0],
2806 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2811 FR30_INSN_BC, "bc", "bc",
2812 { { MNEM, ' ', OP (LABEL9), 0 } },
2813 & fmt_bc, { 0xe400 },
2814 (PTR) & fmt_bc_ops[0],
2815 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2820 FR30_INSN_BCD, "bcd", "bc:d",
2821 { { MNEM, ' ', OP (LABEL9), 0 } },
2822 & fmt_bc, { 0xf400 },
2823 (PTR) & fmt_bc_ops[0],
2824 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2829 FR30_INSN_BNC, "bnc", "bnc",
2830 { { MNEM, ' ', OP (LABEL9), 0 } },
2831 & fmt_bc, { 0xe500 },
2832 (PTR) & fmt_bc_ops[0],
2833 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2838 FR30_INSN_BNCD, "bncd", "bnc:d",
2839 { { MNEM, ' ', OP (LABEL9), 0 } },
2840 & fmt_bc, { 0xf500 },
2841 (PTR) & fmt_bc_ops[0],
2842 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2847 FR30_INSN_BN, "bn", "bn",
2848 { { MNEM, ' ', OP (LABEL9), 0 } },
2849 & fmt_bn, { 0xe600 },
2850 (PTR) & fmt_bn_ops[0],
2851 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2856 FR30_INSN_BND, "bnd", "bn:d",
2857 { { MNEM, ' ', OP (LABEL9), 0 } },
2858 & fmt_bn, { 0xf600 },
2859 (PTR) & fmt_bn_ops[0],
2860 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2865 FR30_INSN_BP, "bp", "bp",
2866 { { MNEM, ' ', OP (LABEL9), 0 } },
2867 & fmt_bn, { 0xe700 },
2868 (PTR) & fmt_bn_ops[0],
2869 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2874 FR30_INSN_BPD, "bpd", "bp:d",
2875 { { MNEM, ' ', OP (LABEL9), 0 } },
2876 & fmt_bn, { 0xf700 },
2877 (PTR) & fmt_bn_ops[0],
2878 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2883 FR30_INSN_BV, "bv", "bv",
2884 { { MNEM, ' ', OP (LABEL9), 0 } },
2885 & fmt_bv, { 0xe800 },
2886 (PTR) & fmt_bv_ops[0],
2887 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2892 FR30_INSN_BVD, "bvd", "bv:d",
2893 { { MNEM, ' ', OP (LABEL9), 0 } },
2894 & fmt_bv, { 0xf800 },
2895 (PTR) & fmt_bv_ops[0],
2896 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2901 FR30_INSN_BNV, "bnv", "bnv",
2902 { { MNEM, ' ', OP (LABEL9), 0 } },
2903 & fmt_bv, { 0xe900 },
2904 (PTR) & fmt_bv_ops[0],
2905 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2910 FR30_INSN_BNVD, "bnvd", "bnv:d",
2911 { { MNEM, ' ', OP (LABEL9), 0 } },
2912 & fmt_bv, { 0xf900 },
2913 (PTR) & fmt_bv_ops[0],
2914 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2919 FR30_INSN_BLT, "blt", "blt",
2920 { { MNEM, ' ', OP (LABEL9), 0 } },
2921 & fmt_blt, { 0xea00 },
2922 (PTR) & fmt_blt_ops[0],
2923 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2928 FR30_INSN_BLTD, "bltd", "blt:d",
2929 { { MNEM, ' ', OP (LABEL9), 0 } },
2930 & fmt_blt, { 0xfa00 },
2931 (PTR) & fmt_blt_ops[0],
2932 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2937 FR30_INSN_BGE, "bge", "bge",
2938 { { MNEM, ' ', OP (LABEL9), 0 } },
2939 & fmt_blt, { 0xeb00 },
2940 (PTR) & fmt_blt_ops[0],
2941 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2946 FR30_INSN_BGED, "bged", "bge:d",
2947 { { MNEM, ' ', OP (LABEL9), 0 } },
2948 & fmt_blt, { 0xfb00 },
2949 (PTR) & fmt_blt_ops[0],
2950 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2955 FR30_INSN_BLE, "ble", "ble",
2956 { { MNEM, ' ', OP (LABEL9), 0 } },
2957 & fmt_ble, { 0xec00 },
2958 (PTR) & fmt_ble_ops[0],
2959 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2964 FR30_INSN_BLED, "bled", "ble:d",
2965 { { MNEM, ' ', OP (LABEL9), 0 } },
2966 & fmt_ble, { 0xfc00 },
2967 (PTR) & fmt_ble_ops[0],
2968 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2973 FR30_INSN_BGT, "bgt", "bgt",
2974 { { MNEM, ' ', OP (LABEL9), 0 } },
2975 & fmt_ble, { 0xed00 },
2976 (PTR) & fmt_ble_ops[0],
2977 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
2982 FR30_INSN_BGTD, "bgtd", "bgt:d",
2983 { { MNEM, ' ', OP (LABEL9), 0 } },
2984 & fmt_ble, { 0xfd00 },
2985 (PTR) & fmt_ble_ops[0],
2986 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
2991 FR30_INSN_BLS, "bls", "bls",
2992 { { MNEM, ' ', OP (LABEL9), 0 } },
2993 & fmt_bls, { 0xee00 },
2994 (PTR) & fmt_bls_ops[0],
2995 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
3000 FR30_INSN_BLSD, "blsd", "bls:d",
3001 { { MNEM, ' ', OP (LABEL9), 0 } },
3002 & fmt_bls, { 0xfe00 },
3003 (PTR) & fmt_bls_ops[0],
3004 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
3009 FR30_INSN_BHI, "bhi", "bhi",
3010 { { MNEM, ' ', OP (LABEL9), 0 } },
3011 & fmt_bls, { 0xef00 },
3012 (PTR) & fmt_bls_ops[0],
3013 { 0, 0|A(COND_CTI)|A(COND_CTI), { 0 } }
3018 FR30_INSN_BHID, "bhid", "bhi:d",
3019 { { MNEM, ' ', OP (LABEL9), 0 } },
3020 & fmt_bls, { 0xff00 },
3021 (PTR) & fmt_bls_ops[0],
3022 { 0, 0|A(COND_CTI)|A(DELAY_SLOT)|A(COND_CTI), { 0 } }
3024 /* dmov $R13,@$dir10 */
3027 FR30_INSN_DMOVR13, "dmovr13", "dmov",
3028 { { MNEM, ' ', OP (R13), ',', '@', OP (DIR10), 0 } },
3029 & fmt_dmovr13, { 0x1800 },
3030 (PTR) & fmt_dmovr13_ops[0],
3033 /* dmovh $R13,@$dir9 */
3036 FR30_INSN_DMOVR13H, "dmovr13h", "dmovh",
3037 { { MNEM, ' ', OP (R13), ',', '@', OP (DIR9), 0 } },
3038 & fmt_dmovr13h, { 0x1900 },
3039 (PTR) & fmt_dmovr13h_ops[0],
3042 /* dmovb $R13,@$dir8 */
3045 FR30_INSN_DMOVR13B, "dmovr13b", "dmovb",
3046 { { MNEM, ' ', OP (R13), ',', '@', OP (DIR8), 0 } },
3047 & fmt_dmovr13b, { 0x1a00 },
3048 (PTR) & fmt_dmovr13b_ops[0],
3051 /* dmov @$R13+,@$dir10 */
3054 FR30_INSN_DMOVR13PI, "dmovr13pi", "dmov",
3055 { { MNEM, ' ', '@', OP (R13), '+', ',', '@', OP (DIR10), 0 } },
3056 & fmt_dmovr13pi, { 0x1c00 },
3057 (PTR) & fmt_dmovr13pi_ops[0],
3060 /* dmovh @$R13+,@$dir9 */
3063 FR30_INSN_DMOVR13PIH, "dmovr13pih", "dmovh",
3064 { { MNEM, ' ', '@', OP (R13), '+', ',', '@', OP (DIR9), 0 } },
3065 & fmt_dmovr13pih, { 0x1d00 },
3066 (PTR) & fmt_dmovr13pih_ops[0],
3069 /* dmovb @$R13+,@$dir8 */
3072 FR30_INSN_DMOVR13PIB, "dmovr13pib", "dmovb",
3073 { { MNEM, ' ', '@', OP (R13), '+', ',', '@', OP (DIR8), 0 } },
3074 & fmt_dmovr13pib, { 0x1e00 },
3075 (PTR) & fmt_dmovr13pib_ops[0],
3078 /* dmov @$R15+,@$dir10 */
3081 FR30_INSN_DMOVR15PI, "dmovr15pi", "dmov",
3082 { { MNEM, ' ', '@', OP (R15), '+', ',', '@', OP (DIR10), 0 } },
3083 & fmt_dmovr15pi, { 0x1b00 },
3084 (PTR) & fmt_dmovr15pi_ops[0],
3087 /* dmov @$dir10,$R13 */
3090 FR30_INSN_DMOV2R13, "dmov2r13", "dmov",
3091 { { MNEM, ' ', '@', OP (DIR10), ',', OP (R13), 0 } },
3092 & fmt_dmov2r13, { 0x800 },
3093 (PTR) & fmt_dmov2r13_ops[0],
3096 /* dmovh @$dir9,$R13 */
3099 FR30_INSN_DMOV2R13H, "dmov2r13h", "dmovh",
3100 { { MNEM, ' ', '@', OP (DIR9), ',', OP (R13), 0 } },
3101 & fmt_dmov2r13h, { 0x900 },
3102 (PTR) & fmt_dmov2r13h_ops[0],
3105 /* dmovb @$dir8,$R13 */
3108 FR30_INSN_DMOV2R13B, "dmov2r13b", "dmovb",
3109 { { MNEM, ' ', '@', OP (DIR8), ',', OP (R13), 0 } },
3110 & fmt_dmov2r13b, { 0xa00 },
3111 (PTR) & fmt_dmov2r13b_ops[0],
3114 /* dmov @$dir10,@$R13+ */
3117 FR30_INSN_DMOV2R13PI, "dmov2r13pi", "dmov",
3118 { { MNEM, ' ', '@', OP (DIR10), ',', '@', OP (R13), '+', 0 } },
3119 & fmt_dmov2r13pi, { 0xc00 },
3120 (PTR) & fmt_dmov2r13pi_ops[0],
3123 /* dmovh @$dir9,@$R13+ */
3126 FR30_INSN_DMOV2R13PIH, "dmov2r13pih", "dmovh",
3127 { { MNEM, ' ', '@', OP (DIR9), ',', '@', OP (R13), '+', 0 } },
3128 & fmt_dmov2r13pih, { 0xd00 },
3129 (PTR) & fmt_dmov2r13pih_ops[0],
3132 /* dmovb @$dir8,@$R13+ */
3135 FR30_INSN_DMOV2R13PIB, "dmov2r13pib", "dmovb",
3136 { { MNEM, ' ', '@', OP (DIR8), ',', '@', OP (R13), '+', 0 } },
3137 & fmt_dmov2r13pib, { 0xe00 },
3138 (PTR) & fmt_dmov2r13pib_ops[0],
3141 /* dmov @$dir10,@-$R15 */
3144 FR30_INSN_DMOV2R15PD, "dmov2r15pd", "dmov",
3145 { { MNEM, ' ', '@', OP (DIR10), ',', '@', '-', OP (R15), 0 } },
3146 & fmt_dmov2r15pd, { 0xb00 },
3147 (PTR) & fmt_dmov2r15pd_ops[0],
3150 /* ldres @$Ri+,$u4 */
3153 FR30_INSN_LDRES, "ldres", "ldres",
3154 { { MNEM, ' ', '@', OP (RI), '+', ',', OP (U4), 0 } },
3155 & fmt_ldres, { 0xbc00 },
3159 /* stres $u4,@$Ri+ */
3162 FR30_INSN_STRES, "stres", "stres",
3163 { { MNEM, ' ', OP (U4), ',', '@', OP (RI), '+', 0 } },
3164 & fmt_ldres, { 0xbd00 },
3168 /* copop $u4c,$ccc,$CRj,$CRi */
3171 FR30_INSN_COPOP, "copop", "copop",
3172 { { MNEM, ' ', OP (U4C), ',', OP (CCC), ',', OP (CRJ), ',', OP (CRI), 0 } },
3173 & fmt_copop, { 0x9fc0 },
3177 /* copld $u4c,$ccc,$Rjc,$CRi */
3180 FR30_INSN_COPLD, "copld", "copld",
3181 { { MNEM, ' ', OP (U4C), ',', OP (CCC), ',', OP (RJC), ',', OP (CRI), 0 } },
3182 & fmt_copld, { 0x9fd0 },
3186 /* copst $u4c,$ccc,$CRj,$Ric */
3189 FR30_INSN_COPST, "copst", "copst",
3190 { { MNEM, ' ', OP (U4C), ',', OP (CCC), ',', OP (CRJ), ',', OP (RIC), 0 } },
3191 & fmt_copst, { 0x9fe0 },
3195 /* copsv $u4c,$ccc,$CRj,$Ric */
3198 FR30_INSN_COPSV, "copsv", "copsv",
3199 { { MNEM, ' ', OP (U4C), ',', OP (CCC), ',', OP (CRJ), ',', OP (RIC), 0 } },
3200 & fmt_copst, { 0x9ff0 },
3207 FR30_INSN_NOP, "nop", "nop",
3209 & fmt_div3, { 0x9fa0 },
3216 FR30_INSN_ANDCCR, "andccr", "andccr",
3217 { { MNEM, ' ', OP (U8), 0 } },
3218 & fmt_andccr, { 0x8300 },
3219 (PTR) & fmt_andccr_ops[0],
3225 FR30_INSN_ORCCR, "orccr", "orccr",
3226 { { MNEM, ' ', OP (U8), 0 } },
3227 & fmt_andccr, { 0x9300 },
3228 (PTR) & fmt_andccr_ops[0],
3234 FR30_INSN_STILM, "stilm", "stilm",
3235 { { MNEM, ' ', OP (U8), 0 } },
3236 & fmt_stilm, { 0x8700 },
3237 (PTR) & fmt_stilm_ops[0],
3243 FR30_INSN_ADDSP, "addsp", "addsp",
3244 { { MNEM, ' ', OP (S10), 0 } },
3245 & fmt_addsp, { 0xa300 },
3246 (PTR) & fmt_addsp_ops[0],
3252 FR30_INSN_EXTSB, "extsb", "extsb",
3253 { { MNEM, ' ', OP (RI), 0 } },
3254 & fmt_extsb, { 0x9780 },
3255 (PTR) & fmt_extsb_ops[0],
3261 FR30_INSN_EXTUB, "extub", "extub",
3262 { { MNEM, ' ', OP (RI), 0 } },
3263 & fmt_extub, { 0x9790 },
3264 (PTR) & fmt_extub_ops[0],
3270 FR30_INSN_EXTSH, "extsh", "extsh",
3271 { { MNEM, ' ', OP (RI), 0 } },
3272 & fmt_extsh, { 0x97a0 },
3273 (PTR) & fmt_extsh_ops[0],
3279 FR30_INSN_EXTUH, "extuh", "extuh",
3280 { { MNEM, ' ', OP (RI), 0 } },
3281 & fmt_extuh, { 0x97b0 },
3282 (PTR) & fmt_extuh_ops[0],
3285 /* ldm0 ($reglist_low_ld) */
3288 FR30_INSN_LDM0, "ldm0", "ldm0",
3289 { { MNEM, ' ', '(', OP (REGLIST_LOW_LD), ')', 0 } },
3290 & fmt_ldm0, { 0x8c00 },
3291 (PTR) & fmt_ldm0_ops[0],
3294 /* ldm1 ($reglist_hi_ld) */
3297 FR30_INSN_LDM1, "ldm1", "ldm1",
3298 { { MNEM, ' ', '(', OP (REGLIST_HI_LD), ')', 0 } },
3299 & fmt_ldm1, { 0x8d00 },
3300 (PTR) & fmt_ldm1_ops[0],
3303 /* stm0 ($reglist_low_st) */
3306 FR30_INSN_STM0, "stm0", "stm0",
3307 { { MNEM, ' ', '(', OP (REGLIST_LOW_ST), ')', 0 } },
3308 & fmt_stm0, { 0x8e00 },
3309 (PTR) & fmt_stm0_ops[0],
3312 /* stm1 ($reglist_hi_st) */
3315 FR30_INSN_STM1, "stm1", "stm1",
3316 { { MNEM, ' ', '(', OP (REGLIST_HI_ST), ')', 0 } },
3317 & fmt_stm1, { 0x8f00 },
3318 (PTR) & fmt_stm1_ops[0],
3324 FR30_INSN_ENTER, "enter", "enter",
3325 { { MNEM, ' ', OP (U10), 0 } },
3326 & fmt_enter, { 0xf00 },
3327 (PTR) & fmt_enter_ops[0],
3333 FR30_INSN_LEAVE, "leave", "leave",
3335 & fmt_leave, { 0x9f90 },
3336 (PTR) & fmt_leave_ops[0],
3342 FR30_INSN_XCHB, "xchb", "xchb",
3343 { { MNEM, ' ', '@', OP (RJ), ',', OP (RI), 0 } },
3344 & fmt_xchb, { 0x8a00 },
3345 (PTR) & fmt_xchb_ops[0],
3354 static const CGEN_INSN_TABLE insn_table =
3356 & fr30_cgen_insn_table_entries[0],
3362 /* Formats for ALIAS macro-insns. */
3364 #define F(f) & fr30_cgen_ifld_table[CONCAT2 (FR30_,f)]
3366 static const CGEN_IFMT fmt_ldi8m = {
3367 16, 16, 0xf000, { F (F_OP1), F (F_I8), F (F_RI), 0 }
3370 static const CGEN_IFMT fmt_ldi20m = {
3371 16, 32, 0xff00, { F (F_OP1), F (F_I20), F (F_OP2), F (F_RI), 0 }
3374 static const CGEN_IFMT fmt_ldi32m = {
3375 16, 48, 0xfff0, { F (F_OP1), F (F_I32), F (F_OP2), F (F_OP3), F (F_RI), 0 }
3380 /* Each non-simple macro entry points to an array of expansion possibilities. */
3382 #define A(a) (1 << CONCAT2 (CGEN_INSN_,a))
3383 #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
3384 #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
3386 /* The macro instruction table. */
3388 static const CGEN_INSN macro_insn_table_entries[] =
3393 -1, "ldi8m", "ldi8",
3394 { { MNEM, ' ', OP (I8), ',', OP (RI), 0 } },
3395 & fmt_ldi8m, { 0xc000 },
3397 { 0, 0|A(NO_DIS)|A(ALIAS), { 0 } }
3399 /* ldi20 $i20,$Ri */
3402 -1, "ldi20m", "ldi20",
3403 { { MNEM, ' ', OP (I20), ',', OP (RI), 0 } },
3404 & fmt_ldi20m, { 0x9b00 },
3406 { 0, 0|A(NO_DIS)|A(ALIAS), { 0 } }
3408 /* ldi32 $i32,$Ri */
3411 -1, "ldi32m", "ldi32",
3412 { { MNEM, ' ', OP (I32), ',', OP (RI), 0 } },
3413 & fmt_ldi32m, { 0x9f80 },
3415 { 0, 0|A(NO_DIS)|A(ALIAS), { 0 } }
3423 static const CGEN_INSN_TABLE macro_insn_table =
3425 & macro_insn_table_entries[0],
3427 (sizeof (macro_insn_table_entries) /
3428 sizeof (macro_insn_table_entries[0])),
3437 /* Return non-zero if INSN is to be added to the hash table.
3438 Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file. */
3441 asm_hash_insn_p (insn)
3442 const CGEN_INSN * insn;
3444 return CGEN_ASM_HASH_P (insn);
3448 dis_hash_insn_p (insn)
3449 const CGEN_INSN * insn;
3451 /* If building the hash table and the NO-DIS attribute is present,
3453 if (CGEN_INSN_ATTR (insn, CGEN_INSN_NO_DIS))
3455 return CGEN_DIS_HASH_P (insn);
3458 /* The result is the hash value of the insn.
3459 Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file. */
3462 asm_hash_insn (mnem)
3465 return CGEN_ASM_HASH (mnem);
3468 /* BUF is a pointer to the insn's bytes in target order.
3469 VALUE is an integer of the first CGEN_BASE_INSN_BITSIZE bits,
3473 dis_hash_insn (buf, value)
3475 CGEN_INSN_INT value;
3477 return CGEN_DIS_HASH (buf, value);
3480 /* Initialize an opcode table and return a descriptor.
3481 It's much like opening a file, and must be the first function called. */
3484 fr30_cgen_opcode_open (mach, endian)
3486 enum cgen_endian endian;
3488 CGEN_OPCODE_TABLE * table = (CGEN_OPCODE_TABLE *) xmalloc (sizeof (CGEN_OPCODE_TABLE));
3497 memset (table, 0, sizeof (*table));
3499 CGEN_OPCODE_MACH (table) = mach;
3500 CGEN_OPCODE_ENDIAN (table) = endian;
3501 /* FIXME: for the sparc case we can determine insn-endianness statically.
3502 The worry here is where both data and insn endian can be independently
3503 chosen, in which case this function will need another argument.
3504 Actually, will want to allow for more arguments in the future anyway. */
3505 CGEN_OPCODE_INSN_ENDIAN (table) = endian;
3507 CGEN_OPCODE_HW_LIST (table) = & fr30_cgen_hw_entries[0];
3509 CGEN_OPCODE_IFLD_TABLE (table) = & fr30_cgen_ifld_table[0];
3511 CGEN_OPCODE_OPERAND_TABLE (table) = & fr30_cgen_operand_table[0];
3513 * CGEN_OPCODE_INSN_TABLE (table) = insn_table;
3515 * CGEN_OPCODE_MACRO_INSN_TABLE (table) = macro_insn_table;
3517 CGEN_OPCODE_ASM_HASH_P (table) = asm_hash_insn_p;
3518 CGEN_OPCODE_ASM_HASH (table) = asm_hash_insn;
3519 CGEN_OPCODE_ASM_HASH_SIZE (table) = CGEN_ASM_HASH_SIZE;
3521 CGEN_OPCODE_DIS_HASH_P (table) = dis_hash_insn_p;
3522 CGEN_OPCODE_DIS_HASH (table) = dis_hash_insn;
3523 CGEN_OPCODE_DIS_HASH_SIZE (table) = CGEN_DIS_HASH_SIZE;
3525 return (CGEN_OPCODE_DESC) table;
3528 /* Close an opcode table. */
3531 fr30_cgen_opcode_close (desc)
3532 CGEN_OPCODE_DESC desc;
3537 /* Getting values from cgen_fields is handled by a collection of functions.
3538 They are distinguished by the type of the VALUE argument they return.
3539 TODO: floating point, inlining support, remove cases where result type
3543 fr30_cgen_get_int_operand (opindex, fields)
3545 const CGEN_FIELDS * fields;
3551 case FR30_OPERAND_RI :
3552 value = fields->f_Ri;
3554 case FR30_OPERAND_RJ :
3555 value = fields->f_Rj;
3557 case FR30_OPERAND_RIC :
3558 value = fields->f_Ric;
3560 case FR30_OPERAND_RJC :
3561 value = fields->f_Rjc;
3563 case FR30_OPERAND_CRI :
3564 value = fields->f_CRi;
3566 case FR30_OPERAND_CRJ :
3567 value = fields->f_CRj;
3569 case FR30_OPERAND_RS1 :
3570 value = fields->f_Rs1;
3572 case FR30_OPERAND_RS2 :
3573 value = fields->f_Rs2;
3575 case FR30_OPERAND_R13 :
3576 value = fields->f_nil;
3578 case FR30_OPERAND_R14 :
3579 value = fields->f_nil;
3581 case FR30_OPERAND_R15 :
3582 value = fields->f_nil;
3584 case FR30_OPERAND_PS :
3585 value = fields->f_nil;
3587 case FR30_OPERAND_U4 :
3588 value = fields->f_u4;
3590 case FR30_OPERAND_U4C :
3591 value = fields->f_u4c;
3593 case FR30_OPERAND_U8 :
3594 value = fields->f_u8;
3596 case FR30_OPERAND_I8 :
3597 value = fields->f_i8;
3599 case FR30_OPERAND_UDISP6 :
3600 value = fields->f_udisp6;
3602 case FR30_OPERAND_DISP8 :
3603 value = fields->f_disp8;
3605 case FR30_OPERAND_DISP9 :
3606 value = fields->f_disp9;
3608 case FR30_OPERAND_DISP10 :
3609 value = fields->f_disp10;
3611 case FR30_OPERAND_S10 :
3612 value = fields->f_s10;
3614 case FR30_OPERAND_U10 :
3615 value = fields->f_u10;
3617 case FR30_OPERAND_I32 :
3618 value = fields->f_i32;
3620 case FR30_OPERAND_M4 :
3621 value = fields->f_m4;
3623 case FR30_OPERAND_I20 :
3624 value = fields->f_i20;
3626 case FR30_OPERAND_DIR8 :
3627 value = fields->f_dir8;
3629 case FR30_OPERAND_DIR9 :
3630 value = fields->f_dir9;
3632 case FR30_OPERAND_DIR10 :
3633 value = fields->f_dir10;
3635 case FR30_OPERAND_LABEL9 :
3636 value = fields->f_rel9;
3638 case FR30_OPERAND_LABEL12 :
3639 value = fields->f_rel12;
3641 case FR30_OPERAND_REGLIST_LOW_LD :
3642 value = fields->f_reglist_low_ld;
3644 case FR30_OPERAND_REGLIST_HI_LD :
3645 value = fields->f_reglist_hi_ld;
3647 case FR30_OPERAND_REGLIST_LOW_ST :
3648 value = fields->f_reglist_low_st;
3650 case FR30_OPERAND_REGLIST_HI_ST :
3651 value = fields->f_reglist_hi_st;
3653 case FR30_OPERAND_CC :
3654 value = fields->f_cc;
3656 case FR30_OPERAND_CCC :
3657 value = fields->f_ccc;
3661 /* xgettext:c-format */
3662 fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"),
3671 fr30_cgen_get_vma_operand (opindex, fields)
3673 const CGEN_FIELDS * fields;
3679 case FR30_OPERAND_RI :
3680 value = fields->f_Ri;
3682 case FR30_OPERAND_RJ :
3683 value = fields->f_Rj;
3685 case FR30_OPERAND_RIC :
3686 value = fields->f_Ric;
3688 case FR30_OPERAND_RJC :
3689 value = fields->f_Rjc;
3691 case FR30_OPERAND_CRI :
3692 value = fields->f_CRi;
3694 case FR30_OPERAND_CRJ :
3695 value = fields->f_CRj;
3697 case FR30_OPERAND_RS1 :
3698 value = fields->f_Rs1;
3700 case FR30_OPERAND_RS2 :
3701 value = fields->f_Rs2;
3703 case FR30_OPERAND_R13 :
3704 value = fields->f_nil;
3706 case FR30_OPERAND_R14 :
3707 value = fields->f_nil;
3709 case FR30_OPERAND_R15 :
3710 value = fields->f_nil;
3712 case FR30_OPERAND_PS :
3713 value = fields->f_nil;
3715 case FR30_OPERAND_U4 :
3716 value = fields->f_u4;
3718 case FR30_OPERAND_U4C :
3719 value = fields->f_u4c;
3721 case FR30_OPERAND_U8 :
3722 value = fields->f_u8;
3724 case FR30_OPERAND_I8 :
3725 value = fields->f_i8;
3727 case FR30_OPERAND_UDISP6 :
3728 value = fields->f_udisp6;
3730 case FR30_OPERAND_DISP8 :
3731 value = fields->f_disp8;
3733 case FR30_OPERAND_DISP9 :
3734 value = fields->f_disp9;
3736 case FR30_OPERAND_DISP10 :
3737 value = fields->f_disp10;
3739 case FR30_OPERAND_S10 :
3740 value = fields->f_s10;
3742 case FR30_OPERAND_U10 :
3743 value = fields->f_u10;
3745 case FR30_OPERAND_I32 :
3746 value = fields->f_i32;
3748 case FR30_OPERAND_M4 :
3749 value = fields->f_m4;
3751 case FR30_OPERAND_I20 :
3752 value = fields->f_i20;
3754 case FR30_OPERAND_DIR8 :
3755 value = fields->f_dir8;
3757 case FR30_OPERAND_DIR9 :
3758 value = fields->f_dir9;
3760 case FR30_OPERAND_DIR10 :
3761 value = fields->f_dir10;
3763 case FR30_OPERAND_LABEL9 :
3764 value = fields->f_rel9;
3766 case FR30_OPERAND_LABEL12 :
3767 value = fields->f_rel12;
3769 case FR30_OPERAND_REGLIST_LOW_LD :
3770 value = fields->f_reglist_low_ld;
3772 case FR30_OPERAND_REGLIST_HI_LD :
3773 value = fields->f_reglist_hi_ld;
3775 case FR30_OPERAND_REGLIST_LOW_ST :
3776 value = fields->f_reglist_low_st;
3778 case FR30_OPERAND_REGLIST_HI_ST :
3779 value = fields->f_reglist_hi_st;
3781 case FR30_OPERAND_CC :
3782 value = fields->f_cc;
3784 case FR30_OPERAND_CCC :
3785 value = fields->f_ccc;
3789 /* xgettext:c-format */
3790 fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"),
3798 /* Stuffing values in cgen_fields is handled by a collection of functions.
3799 They are distinguished by the type of the VALUE argument they accept.
3800 TODO: floating point, inlining support, remove cases where argument type
3804 fr30_cgen_set_int_operand (opindex, fields, value)
3806 CGEN_FIELDS * fields;
3811 case FR30_OPERAND_RI :
3812 fields->f_Ri = value;
3814 case FR30_OPERAND_RJ :
3815 fields->f_Rj = value;
3817 case FR30_OPERAND_RIC :
3818 fields->f_Ric = value;
3820 case FR30_OPERAND_RJC :
3821 fields->f_Rjc = value;
3823 case FR30_OPERAND_CRI :
3824 fields->f_CRi = value;
3826 case FR30_OPERAND_CRJ :
3827 fields->f_CRj = value;
3829 case FR30_OPERAND_RS1 :
3830 fields->f_Rs1 = value;
3832 case FR30_OPERAND_RS2 :
3833 fields->f_Rs2 = value;
3835 case FR30_OPERAND_R13 :
3836 fields->f_nil = value;
3838 case FR30_OPERAND_R14 :
3839 fields->f_nil = value;
3841 case FR30_OPERAND_R15 :
3842 fields->f_nil = value;
3844 case FR30_OPERAND_PS :
3845 fields->f_nil = value;
3847 case FR30_OPERAND_U4 :
3848 fields->f_u4 = value;
3850 case FR30_OPERAND_U4C :
3851 fields->f_u4c = value;
3853 case FR30_OPERAND_U8 :
3854 fields->f_u8 = value;
3856 case FR30_OPERAND_I8 :
3857 fields->f_i8 = value;
3859 case FR30_OPERAND_UDISP6 :
3860 fields->f_udisp6 = value;
3862 case FR30_OPERAND_DISP8 :
3863 fields->f_disp8 = value;
3865 case FR30_OPERAND_DISP9 :
3866 fields->f_disp9 = value;
3868 case FR30_OPERAND_DISP10 :
3869 fields->f_disp10 = value;
3871 case FR30_OPERAND_S10 :
3872 fields->f_s10 = value;
3874 case FR30_OPERAND_U10 :
3875 fields->f_u10 = value;
3877 case FR30_OPERAND_I32 :
3878 fields->f_i32 = value;
3880 case FR30_OPERAND_M4 :
3881 fields->f_m4 = value;
3883 case FR30_OPERAND_I20 :
3884 fields->f_i20 = value;
3886 case FR30_OPERAND_DIR8 :
3887 fields->f_dir8 = value;
3889 case FR30_OPERAND_DIR9 :
3890 fields->f_dir9 = value;
3892 case FR30_OPERAND_DIR10 :
3893 fields->f_dir10 = value;
3895 case FR30_OPERAND_LABEL9 :
3896 fields->f_rel9 = value;
3898 case FR30_OPERAND_LABEL12 :
3899 fields->f_rel12 = value;
3901 case FR30_OPERAND_REGLIST_LOW_LD :
3902 fields->f_reglist_low_ld = value;
3904 case FR30_OPERAND_REGLIST_HI_LD :
3905 fields->f_reglist_hi_ld = value;
3907 case FR30_OPERAND_REGLIST_LOW_ST :
3908 fields->f_reglist_low_st = value;
3910 case FR30_OPERAND_REGLIST_HI_ST :
3911 fields->f_reglist_hi_st = value;
3913 case FR30_OPERAND_CC :
3914 fields->f_cc = value;
3916 case FR30_OPERAND_CCC :
3917 fields->f_ccc = value;
3921 /* xgettext:c-format */
3922 fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"),
3929 fr30_cgen_set_vma_operand (opindex, fields, value)
3931 CGEN_FIELDS * fields;
3936 case FR30_OPERAND_RI :
3937 fields->f_Ri = value;
3939 case FR30_OPERAND_RJ :
3940 fields->f_Rj = value;
3942 case FR30_OPERAND_RIC :
3943 fields->f_Ric = value;
3945 case FR30_OPERAND_RJC :
3946 fields->f_Rjc = value;
3948 case FR30_OPERAND_CRI :
3949 fields->f_CRi = value;
3951 case FR30_OPERAND_CRJ :
3952 fields->f_CRj = value;
3954 case FR30_OPERAND_RS1 :
3955 fields->f_Rs1 = value;
3957 case FR30_OPERAND_RS2 :
3958 fields->f_Rs2 = value;
3960 case FR30_OPERAND_R13 :
3961 fields->f_nil = value;
3963 case FR30_OPERAND_R14 :
3964 fields->f_nil = value;
3966 case FR30_OPERAND_R15 :
3967 fields->f_nil = value;
3969 case FR30_OPERAND_PS :
3970 fields->f_nil = value;
3972 case FR30_OPERAND_U4 :
3973 fields->f_u4 = value;
3975 case FR30_OPERAND_U4C :
3976 fields->f_u4c = value;
3978 case FR30_OPERAND_U8 :
3979 fields->f_u8 = value;
3981 case FR30_OPERAND_I8 :
3982 fields->f_i8 = value;
3984 case FR30_OPERAND_UDISP6 :
3985 fields->f_udisp6 = value;
3987 case FR30_OPERAND_DISP8 :
3988 fields->f_disp8 = value;
3990 case FR30_OPERAND_DISP9 :
3991 fields->f_disp9 = value;
3993 case FR30_OPERAND_DISP10 :
3994 fields->f_disp10 = value;
3996 case FR30_OPERAND_S10 :
3997 fields->f_s10 = value;
3999 case FR30_OPERAND_U10 :
4000 fields->f_u10 = value;
4002 case FR30_OPERAND_I32 :
4003 fields->f_i32 = value;
4005 case FR30_OPERAND_M4 :
4006 fields->f_m4 = value;
4008 case FR30_OPERAND_I20 :
4009 fields->f_i20 = value;
4011 case FR30_OPERAND_DIR8 :
4012 fields->f_dir8 = value;
4014 case FR30_OPERAND_DIR9 :
4015 fields->f_dir9 = value;
4017 case FR30_OPERAND_DIR10 :
4018 fields->f_dir10 = value;
4020 case FR30_OPERAND_LABEL9 :
4021 fields->f_rel9 = value;
4023 case FR30_OPERAND_LABEL12 :
4024 fields->f_rel12 = value;
4026 case FR30_OPERAND_REGLIST_LOW_LD :
4027 fields->f_reglist_low_ld = value;
4029 case FR30_OPERAND_REGLIST_HI_LD :
4030 fields->f_reglist_hi_ld = value;
4032 case FR30_OPERAND_REGLIST_LOW_ST :
4033 fields->f_reglist_low_st = value;
4035 case FR30_OPERAND_REGLIST_HI_ST :
4036 fields->f_reglist_hi_st = value;
4038 case FR30_OPERAND_CC :
4039 fields->f_cc = value;
4041 case FR30_OPERAND_CCC :
4042 fields->f_ccc = value;
4046 /* xgettext:c-format */
4047 fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"),