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|(1<<CGEN_HW_FUN_ACCESS
), { 0 } } },
392 { HW_H_TBIT
, & HW_ENT (HW_H_TBIT
+ 1), "h-tbit", CGEN_ASM_KEYWORD
, (PTR
) 0, { 0, 0, { 0 } } },
393 { HW_H_D0BIT
, & HW_ENT (HW_H_D0BIT
+ 1), "h-d0bit", CGEN_ASM_KEYWORD
, (PTR
) 0, { 0, 0, { 0 } } },
394 { HW_H_D1BIT
, & HW_ENT (HW_H_D1BIT
+ 1), "h-d1bit", CGEN_ASM_KEYWORD
, (PTR
) 0, { 0, 0, { 0 } } },
395 { HW_H_CCR
, & HW_ENT (HW_H_CCR
+ 1), "h-ccr", CGEN_ASM_KEYWORD
, (PTR
) 0, { 0, 0|(1<<CGEN_HW_FUN_ACCESS
), { 0 } } },
396 { HW_H_SCR
, & HW_ENT (HW_H_SCR
+ 1), "h-scr", CGEN_ASM_KEYWORD
, (PTR
) 0, { 0, 0|(1<<CGEN_HW_FUN_ACCESS
), { 0 } } },
397 { HW_H_ILM
, & HW_ENT (HW_H_ILM
+ 1), "h-ilm", CGEN_ASM_KEYWORD
, (PTR
) 0, { 0, 0|(1<<CGEN_HW_FUN_ACCESS
), { 0 } } },
401 /* The instruction field table. */
403 static const CGEN_IFLD fr30_cgen_ifld_table
[] =
405 { FR30_F_NIL
, "f-nil", 0, 0, 0, 0, { 0, 0, { 0 } } },
406 { FR30_F_OP1
, "f-op1", 0, 16, 0, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
407 { FR30_F_OP2
, "f-op2", 0, 16, 4, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
408 { FR30_F_OP3
, "f-op3", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
409 { FR30_F_OP4
, "f-op4", 0, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
410 { FR30_F_OP5
, "f-op5", 0, 16, 4, 1, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
411 { FR30_F_CC
, "f-cc", 0, 16, 4, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
412 { FR30_F_CCC
, "f-ccc", 16, 16, 0, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
413 { FR30_F_RJ
, "f-Rj", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
414 { FR30_F_RI
, "f-Ri", 0, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
415 { FR30_F_RS1
, "f-Rs1", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
416 { FR30_F_RS2
, "f-Rs2", 0, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
417 { FR30_F_RJC
, "f-Rjc", 16, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
418 { FR30_F_RIC
, "f-Ric", 16, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
419 { FR30_F_CRJ
, "f-CRj", 16, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
420 { FR30_F_CRI
, "f-CRi", 16, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
421 { FR30_F_U4
, "f-u4", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
422 { FR30_F_U4C
, "f-u4c", 0, 16, 12, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
423 { FR30_F_I4
, "f-i4", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_SIGNED
), { 0 } } },
424 { FR30_F_M4
, "f-m4", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
425 { FR30_F_U8
, "f-u8", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
426 { FR30_F_I8
, "f-i8", 0, 16, 4, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
427 { FR30_F_I20_4
, "f-i20-4", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
428 { FR30_F_I20_16
, "f-i20-16", 16, 16, 0, 16, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
429 { FR30_F_I32
, "f-i32", 16, 32, 0, 32, { 0, 0|(1<<CGEN_IFLD_SIGN_OPT
)|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
430 { FR30_F_UDISP6
, "f-udisp6", 0, 16, 8, 4, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
431 { FR30_F_DISP8
, "f-disp8", 0, 16, 4, 8, { 0, 0|(1<<CGEN_IFLD_SIGNED
), { 0 } } },
432 { FR30_F_DISP9
, "f-disp9", 0, 16, 4, 8, { 0, 0|(1<<CGEN_IFLD_SIGNED
), { 0 } } },
433 { FR30_F_DISP10
, "f-disp10", 0, 16, 4, 8, { 0, 0|(1<<CGEN_IFLD_SIGNED
), { 0 } } },
434 { FR30_F_S10
, "f-s10", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_SIGNED
), { 0 } } },
435 { FR30_F_U10
, "f-u10", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
436 { FR30_F_REL9
, "f-rel9", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_PCREL_ADDR
)|(1<<CGEN_IFLD_SIGNED
), { 0 } } },
437 { FR30_F_DIR8
, "f-dir8", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
438 { FR30_F_DIR9
, "f-dir9", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
439 { FR30_F_DIR10
, "f-dir10", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
440 { FR30_F_REL12
, "f-rel12", 0, 16, 5, 11, { 0, 0|(1<<CGEN_IFLD_PCREL_ADDR
)|(1<<CGEN_IFLD_SIGNED
), { 0 } } },
441 { FR30_F_REGLIST_HI_ST
, "f-reglist_hi_st", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
442 { FR30_F_REGLIST_LOW_ST
, "f-reglist_low_st", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
443 { FR30_F_REGLIST_HI_LD
, "f-reglist_hi_ld", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
444 { FR30_F_REGLIST_LOW_LD
, "f-reglist_low_ld", 0, 16, 8, 8, { 0, 0|(1<<CGEN_IFLD_UNSIGNED
), { 0 } } },
448 /* The operand table. */
450 #define OPERAND(op) CONCAT2 (FR30_OPERAND_,op)
451 #define OP_ENT(op) fr30_cgen_operand_table[OPERAND (op)]
453 const CGEN_OPERAND fr30_cgen_operand_table
[MAX_OPERANDS
] =
455 /* pc: program counter */
456 { "pc", & HW_ENT (HW_H_PC
), 0, 0,
457 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
458 /* Ri: destination register */
459 { "Ri", & HW_ENT (HW_H_GR
), 12, 4,
460 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
461 /* Rj: source register */
462 { "Rj", & HW_ENT (HW_H_GR
), 8, 4,
463 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
464 /* Ric: target register coproc insn */
465 { "Ric", & HW_ENT (HW_H_GR
), 12, 4,
466 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
467 /* Rjc: source register coproc insn */
468 { "Rjc", & HW_ENT (HW_H_GR
), 8, 4,
469 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
470 /* CRi: coprocessor register */
471 { "CRi", & HW_ENT (HW_H_CR
), 12, 4,
472 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
473 /* CRj: coprocessor register */
474 { "CRj", & HW_ENT (HW_H_CR
), 8, 4,
475 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
476 /* Rs1: dedicated register */
477 { "Rs1", & HW_ENT (HW_H_DR
), 8, 4,
478 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
479 /* Rs2: dedicated register */
480 { "Rs2", & HW_ENT (HW_H_DR
), 12, 4,
481 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
482 /* R13: General Register 13 */
483 { "R13", & HW_ENT (HW_H_R13
), 0, 0,
485 /* R14: General Register 14 */
486 { "R14", & HW_ENT (HW_H_R14
), 0, 0,
488 /* R15: General Register 15 */
489 { "R15", & HW_ENT (HW_H_R15
), 0, 0,
491 /* ps: Program Status register */
492 { "ps", & HW_ENT (HW_H_PS
), 0, 0,
494 /* u4: 4 bit unsigned immediate */
495 { "u4", & HW_ENT (HW_H_UINT
), 8, 4,
496 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
497 /* u4c: 4 bit unsigned immediate */
498 { "u4c", & HW_ENT (HW_H_UINT
), 12, 4,
499 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
500 /* u8: 8 bit unsigned immediate */
501 { "u8", & HW_ENT (HW_H_UINT
), 8, 8,
502 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
503 /* i8: 8 bit unsigned immediate */
504 { "i8", & HW_ENT (HW_H_UINT
), 4, 8,
505 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
506 /* udisp6: 6 bit unsigned immediate */
507 { "udisp6", & HW_ENT (HW_H_UINT
), 8, 4,
508 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
509 /* disp8: 8 bit signed immediate */
510 { "disp8", & HW_ENT (HW_H_SINT
), 4, 8,
511 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_SIGNED
), { 0 } } },
512 /* disp9: 9 bit signed immediate */
513 { "disp9", & HW_ENT (HW_H_SINT
), 4, 8,
514 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_SIGNED
), { 0 } } },
515 /* disp10: 10 bit signed immediate */
516 { "disp10", & HW_ENT (HW_H_SINT
), 4, 8,
517 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_SIGNED
), { 0 } } },
518 /* s10: 10 bit signed immediate */
519 { "s10", & HW_ENT (HW_H_SINT
), 8, 8,
520 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_SIGNED
), { 0 } } },
521 /* u10: 10 bit unsigned immediate */
522 { "u10", & HW_ENT (HW_H_UINT
), 8, 8,
523 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
524 /* i32: 32 bit immediate */
525 { "i32", & HW_ENT (HW_H_UINT
), 0, 32,
526 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_SIGN_OPT
)|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
527 /* m4: 4 bit negative immediate */
528 { "m4", & HW_ENT (HW_H_SINT
), 8, 4,
529 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
530 /* i20: 20 bit immediate */
531 { "i20", & HW_ENT (HW_H_UINT
), 0, 20,
532 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_UNSIGNED
)|(1<<CGEN_OPERAND_VIRTUAL
), { 0 } } },
533 /* dir8: 8 bit direct address */
534 { "dir8", & HW_ENT (HW_H_UINT
), 8, 8,
535 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
536 /* dir9: 9 bit direct address */
537 { "dir9", & HW_ENT (HW_H_UINT
), 8, 8,
538 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
539 /* dir10: 10 bit direct address */
540 { "dir10", & HW_ENT (HW_H_UINT
), 8, 8,
541 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
542 /* label9: 9 bit pc relative address */
543 { "label9", & HW_ENT (HW_H_IADDR
), 8, 8,
544 { 0, 0|(1<<CGEN_OPERAND_PCREL_ADDR
)|(1<<CGEN_OPERAND_SIGNED
), { 0 } } },
545 /* label12: 12 bit pc relative address */
546 { "label12", & HW_ENT (HW_H_IADDR
), 5, 11,
547 { 0, 0|(1<<CGEN_OPERAND_PCREL_ADDR
)|(1<<CGEN_OPERAND_SIGNED
), { 0 } } },
548 /* reglist_low_ld: 8 bit register mask for ldm */
549 { "reglist_low_ld", & HW_ENT (HW_H_UINT
), 8, 8,
550 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
551 /* reglist_hi_ld: 8 bit register mask for ldm */
552 { "reglist_hi_ld", & HW_ENT (HW_H_UINT
), 8, 8,
553 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
554 /* reglist_low_st: 8 bit register mask for ldm */
555 { "reglist_low_st", & HW_ENT (HW_H_UINT
), 8, 8,
556 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
557 /* reglist_hi_st: 8 bit register mask for ldm */
558 { "reglist_hi_st", & HW_ENT (HW_H_UINT
), 8, 8,
559 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
560 /* cc: condition codes */
561 { "cc", & HW_ENT (HW_H_UINT
), 4, 4,
562 { 0, 0|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
563 /* ccc: coprocessor calc */
564 { "ccc", & HW_ENT (HW_H_UINT
), 0, 8,
565 { 0, 0|(1<<CGEN_OPERAND_HASH_PREFIX
)|(1<<CGEN_OPERAND_UNSIGNED
), { 0 } } },
566 /* nbit: negative bit */
567 { "nbit", & HW_ENT (HW_H_NBIT
), 0, 0,
568 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
569 /* vbit: overflow bit */
570 { "vbit", & HW_ENT (HW_H_VBIT
), 0, 0,
571 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
573 { "zbit", & HW_ENT (HW_H_ZBIT
), 0, 0,
574 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
575 /* cbit: carry bit */
576 { "cbit", & HW_ENT (HW_H_CBIT
), 0, 0,
577 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
578 /* ibit: interrupt bit */
579 { "ibit", & HW_ENT (HW_H_IBIT
), 0, 0,
580 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
581 /* sbit: stack bit */
582 { "sbit", & HW_ENT (HW_H_SBIT
), 0, 0,
583 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
584 /* tbit: trace trap bit */
585 { "tbit", & HW_ENT (HW_H_TBIT
), 0, 0,
586 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
587 /* d0bit: division 0 bit */
588 { "d0bit", & HW_ENT (HW_H_D0BIT
), 0, 0,
589 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
590 /* d1bit: division 1 bit */
591 { "d1bit", & HW_ENT (HW_H_D1BIT
), 0, 0,
592 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
593 /* ccr: condition code bits */
594 { "ccr", & HW_ENT (HW_H_CCR
), 0, 0,
595 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
596 /* scr: system condition bits */
597 { "scr", & HW_ENT (HW_H_SCR
), 0, 0,
598 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
599 /* ilm: condition code bits */
600 { "ilm", & HW_ENT (HW_H_ILM
), 0, 0,
601 { 0, 0|(1<<CGEN_OPERAND_SEM_ONLY
), { 0 } } },
604 /* Operand references. */
606 #define INPUT CGEN_OPERAND_INSTANCE_INPUT
607 #define OUTPUT CGEN_OPERAND_INSTANCE_OUTPUT
608 #define COND_REF CGEN_OPERAND_INSTANCE_COND_REF
610 static const CGEN_OPERAND_INSTANCE fmt_add_ops
[] = {
611 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
612 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
613 { OUTPUT
, "vbit", & HW_ENT (HW_H_VBIT
), CGEN_MODE_BI
, 0, 0, 0 },
614 { OUTPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, 0 },
615 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
616 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
617 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
621 static const CGEN_OPERAND_INSTANCE fmt_addi_ops
[] = {
622 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
623 { INPUT
, "u4", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (U4
), 0, 0 },
624 { OUTPUT
, "vbit", & HW_ENT (HW_H_VBIT
), CGEN_MODE_BI
, 0, 0, 0 },
625 { OUTPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, 0 },
626 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
627 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
628 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
632 static const CGEN_OPERAND_INSTANCE fmt_add2_ops
[] = {
633 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
634 { INPUT
, "m4", & HW_ENT (HW_H_SINT
), CGEN_MODE_SI
, & OP_ENT (M4
), 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_addc_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 { INPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, 0 },
647 { OUTPUT
, "vbit", & HW_ENT (HW_H_VBIT
), CGEN_MODE_BI
, 0, 0, 0 },
648 { OUTPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, 0 },
649 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
650 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
651 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
655 static const CGEN_OPERAND_INSTANCE fmt_addn_ops
[] = {
656 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
657 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
658 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
662 static const CGEN_OPERAND_INSTANCE fmt_addni_ops
[] = {
663 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
664 { INPUT
, "u4", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (U4
), 0, 0 },
665 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
669 static const CGEN_OPERAND_INSTANCE fmt_addn2_ops
[] = {
670 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
671 { INPUT
, "m4", & HW_ENT (HW_H_SINT
), CGEN_MODE_SI
, & OP_ENT (M4
), 0, 0 },
672 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
676 static const CGEN_OPERAND_INSTANCE fmt_cmp_ops
[] = {
677 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
678 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
679 { OUTPUT
, "vbit", & HW_ENT (HW_H_VBIT
), CGEN_MODE_BI
, 0, 0, 0 },
680 { OUTPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, 0 },
681 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
682 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
686 static const CGEN_OPERAND_INSTANCE fmt_cmpi_ops
[] = {
687 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
688 { INPUT
, "u4", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (U4
), 0, 0 },
689 { OUTPUT
, "vbit", & HW_ENT (HW_H_VBIT
), CGEN_MODE_BI
, 0, 0, 0 },
690 { OUTPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, 0 },
691 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
692 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
696 static const CGEN_OPERAND_INSTANCE fmt_cmp2_ops
[] = {
697 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
698 { INPUT
, "m4", & HW_ENT (HW_H_SINT
), CGEN_MODE_SI
, & OP_ENT (M4
), 0, 0 },
699 { OUTPUT
, "vbit", & HW_ENT (HW_H_VBIT
), CGEN_MODE_BI
, 0, 0, 0 },
700 { OUTPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, 0 },
701 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
702 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
706 static const CGEN_OPERAND_INSTANCE fmt_and_ops
[] = {
707 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
708 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
709 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
710 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
711 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
715 static const CGEN_OPERAND_INSTANCE fmt_andm_ops
[] = {
716 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RI
), 0, 0 },
717 { INPUT
, "h_memory_Ri", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
718 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
719 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
720 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
721 { OUTPUT
, "h_memory_Ri", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
725 static const CGEN_OPERAND_INSTANCE fmt_andh_ops
[] = {
726 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RI
), 0, 0 },
727 { INPUT
, "h_memory_Ri", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_HI
, 0, 0, 0 },
728 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_HI
, & OP_ENT (RJ
), 0, 0 },
729 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
730 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
731 { OUTPUT
, "h_memory_Ri", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_HI
, 0, 0, 0 },
735 static const CGEN_OPERAND_INSTANCE fmt_andb_ops
[] = {
736 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RI
), 0, 0 },
737 { INPUT
, "h_memory_Ri", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
738 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_QI
, & OP_ENT (RJ
), 0, 0 },
739 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
740 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
741 { OUTPUT
, "h_memory_Ri", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
745 static const CGEN_OPERAND_INSTANCE fmt_bandl_ops
[] = {
746 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RI
), 0, 0 },
747 { INPUT
, "u4", & HW_ENT (HW_H_UINT
), CGEN_MODE_QI
, & OP_ENT (U4
), 0, 0 },
748 { INPUT
, "h_memory_Ri", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
749 { OUTPUT
, "h_memory_Ri", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
753 static const CGEN_OPERAND_INSTANCE fmt_btstl_ops
[] = {
754 { INPUT
, "u4", & HW_ENT (HW_H_UINT
), CGEN_MODE_QI
, & OP_ENT (U4
), 0, 0 },
755 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RI
), 0, 0 },
756 { INPUT
, "h_memory_Ri", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
757 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
758 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
762 static const CGEN_OPERAND_INSTANCE fmt_mul_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_5", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 5, 0 },
766 { OUTPUT
, "h_dr_5", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 5, 0 },
767 { OUTPUT
, "h_dr_4", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 4, 0 },
768 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
769 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
770 { OUTPUT
, "vbit", & HW_ENT (HW_H_VBIT
), CGEN_MODE_BI
, 0, 0, 0 },
774 static const CGEN_OPERAND_INSTANCE fmt_mulu_ops
[] = {
775 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
776 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
777 { INPUT
, "h_dr_4", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 4, 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
, "h_dr_4", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 4, 0 },
781 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
782 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
783 { OUTPUT
, "vbit", & HW_ENT (HW_H_VBIT
), CGEN_MODE_BI
, 0, 0, 0 },
787 static const CGEN_OPERAND_INSTANCE fmt_mulh_ops
[] = {
788 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
789 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
790 { INPUT
, "h_dr_5", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 5, 0 },
791 { OUTPUT
, "h_dr_5", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 5, 0 },
792 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
793 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
797 static const CGEN_OPERAND_INSTANCE fmt_div0s_ops
[] = {
798 { INPUT
, "h_dr_5", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 5, 0 },
799 { INPUT
, "d0bit", & HW_ENT (HW_H_D0BIT
), CGEN_MODE_BI
, 0, 0, 0 },
800 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
801 { OUTPUT
, "d0bit", & HW_ENT (HW_H_D0BIT
), CGEN_MODE_BI
, 0, 0, 0 },
802 { OUTPUT
, "d1bit", & HW_ENT (HW_H_D1BIT
), CGEN_MODE_BI
, 0, 0, 0 },
803 { OUTPUT
, "h_dr_4", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 4, COND_REF
},
807 static const CGEN_OPERAND_INSTANCE fmt_div0u_ops
[] = {
808 { OUTPUT
, "d0bit", & HW_ENT (HW_H_D0BIT
), CGEN_MODE_BI
, 0, 0, 0 },
809 { OUTPUT
, "d1bit", & HW_ENT (HW_H_D1BIT
), CGEN_MODE_BI
, 0, 0, 0 },
810 { OUTPUT
, "h_dr_4", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 4, 0 },
814 static const CGEN_OPERAND_INSTANCE fmt_div1_ops
[] = {
815 { INPUT
, "h_dr_4", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 4, 0 },
816 { INPUT
, "h_dr_5", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 5, 0 },
817 { INPUT
, "d1bit", & HW_ENT (HW_H_D1BIT
), CGEN_MODE_BI
, 0, 0, 0 },
818 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, COND_REF
},
819 { INPUT
, "d0bit", & HW_ENT (HW_H_D0BIT
), CGEN_MODE_BI
, 0, 0, 0 },
820 { INPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, 0 },
821 { OUTPUT
, "h_dr_4", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 4, 0 },
822 { OUTPUT
, "h_dr_5", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 5, 0 },
823 { OUTPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, COND_REF
},
824 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
828 static const CGEN_OPERAND_INSTANCE fmt_div2_ops
[] = {
829 { INPUT
, "d1bit", & HW_ENT (HW_H_D1BIT
), CGEN_MODE_BI
, 0, 0, 0 },
830 { INPUT
, "h_dr_4", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 4, COND_REF
},
831 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, COND_REF
},
832 { OUTPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, COND_REF
},
833 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, COND_REF
},
834 { OUTPUT
, "h_dr_4", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 4, COND_REF
},
838 static const CGEN_OPERAND_INSTANCE fmt_div3_ops
[] = {
839 { INPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
840 { INPUT
, "h_dr_5", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 5, COND_REF
},
841 { OUTPUT
, "h_dr_5", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 5, COND_REF
},
845 static const CGEN_OPERAND_INSTANCE fmt_div4s_ops
[] = {
846 { INPUT
, "d1bit", & HW_ENT (HW_H_D1BIT
), CGEN_MODE_BI
, 0, 0, 0 },
847 { INPUT
, "h_dr_5", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 5, COND_REF
},
848 { OUTPUT
, "h_dr_5", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 5, COND_REF
},
852 static const CGEN_OPERAND_INSTANCE fmt_lsl_ops
[] = {
853 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
854 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, COND_REF
},
855 { OUTPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, COND_REF
},
856 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, COND_REF
},
857 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
858 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
862 static const CGEN_OPERAND_INSTANCE fmt_lsli_ops
[] = {
863 { INPUT
, "u4", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (U4
), 0, 0 },
864 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, COND_REF
},
865 { OUTPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, COND_REF
},
866 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, COND_REF
},
867 { OUTPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
868 { OUTPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
872 static const CGEN_OPERAND_INSTANCE fmt_ldi8_ops
[] = {
873 { INPUT
, "i8", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (I8
), 0, 0 },
874 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
878 static const CGEN_OPERAND_INSTANCE fmt_ldi20_ops
[] = {
879 { INPUT
, "i20", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (I20
), 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_ldi32_ops
[] = {
885 { INPUT
, "i32", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (I32
), 0, 0 },
886 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
890 static const CGEN_OPERAND_INSTANCE fmt_ld_ops
[] = {
891 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RJ
), 0, 0 },
892 { INPUT
, "h_memory_Rj", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
893 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
897 static const CGEN_OPERAND_INSTANCE fmt_lduh_ops
[] = {
898 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RJ
), 0, 0 },
899 { INPUT
, "h_memory_Rj", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_UHI
, 0, 0, 0 },
900 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
904 static const CGEN_OPERAND_INSTANCE fmt_ldub_ops
[] = {
905 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RJ
), 0, 0 },
906 { INPUT
, "h_memory_Rj", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_UQI
, 0, 0, 0 },
907 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
911 static const CGEN_OPERAND_INSTANCE fmt_ldr13_ops
[] = {
912 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
913 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
914 { INPUT
, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
915 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
919 static const CGEN_OPERAND_INSTANCE fmt_ldr13uh_ops
[] = {
920 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
921 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
922 { INPUT
, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_UHI
, 0, 0, 0 },
923 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
927 static const CGEN_OPERAND_INSTANCE fmt_ldr13ub_ops
[] = {
928 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
929 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
930 { INPUT
, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_UQI
, 0, 0, 0 },
931 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
935 static const CGEN_OPERAND_INSTANCE fmt_ldr14_ops
[] = {
936 { INPUT
, "disp10", & HW_ENT (HW_H_SINT
), CGEN_MODE_SI
, & OP_ENT (DISP10
), 0, 0 },
937 { INPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, 0 },
938 { INPUT
, "h_memory_add__VM_disp10_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
939 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
943 static const CGEN_OPERAND_INSTANCE fmt_ldr14uh_ops
[] = {
944 { INPUT
, "disp9", & HW_ENT (HW_H_SINT
), CGEN_MODE_SI
, & OP_ENT (DISP9
), 0, 0 },
945 { INPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, 0 },
946 { INPUT
, "h_memory_add__VM_disp9_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_UHI
, 0, 0, 0 },
947 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
951 static const CGEN_OPERAND_INSTANCE fmt_ldr14ub_ops
[] = {
952 { INPUT
, "disp8", & HW_ENT (HW_H_SINT
), CGEN_MODE_SI
, & OP_ENT (DISP8
), 0, 0 },
953 { INPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, 0 },
954 { INPUT
, "h_memory_add__VM_disp8_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_UQI
, 0, 0, 0 },
955 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
959 static const CGEN_OPERAND_INSTANCE fmt_ldr15_ops
[] = {
960 { INPUT
, "udisp6", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (UDISP6
), 0, 0 },
961 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
962 { INPUT
, "h_memory_add__VM_udisp6_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
963 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
967 static const CGEN_OPERAND_INSTANCE fmt_ldr15gr_ops
[] = {
968 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
969 { INPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
970 { INPUT
, "f_Ri", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, 0, 0, COND_REF
},
971 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
972 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, COND_REF
},
976 static const CGEN_OPERAND_INSTANCE fmt_ldr15dr_ops
[] = {
977 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
978 { INPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
979 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
980 { OUTPUT
, "Rs2", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, & OP_ENT (RS2
), 0, 0 },
984 static const CGEN_OPERAND_INSTANCE fmt_ldr15ps_ops
[] = {
985 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
986 { INPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
987 { OUTPUT
, "ps", & HW_ENT (HW_H_PS
), CGEN_MODE_USI
, 0, 0, 0 },
988 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
992 static const CGEN_OPERAND_INSTANCE fmt_st_ops
[] = {
993 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RJ
), 0, 0 },
994 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
995 { OUTPUT
, "h_memory_Rj", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
999 static const CGEN_OPERAND_INSTANCE fmt_sth_ops
[] = {
1000 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RJ
), 0, 0 },
1001 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1002 { OUTPUT
, "h_memory_Rj", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_HI
, 0, 0, 0 },
1006 static const CGEN_OPERAND_INSTANCE fmt_stb_ops
[] = {
1007 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RJ
), 0, 0 },
1008 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1009 { OUTPUT
, "h_memory_Rj", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
1013 static const CGEN_OPERAND_INSTANCE fmt_str13_ops
[] = {
1014 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
1015 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1016 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1017 { OUTPUT
, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1021 static const CGEN_OPERAND_INSTANCE fmt_str13h_ops
[] = {
1022 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
1023 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1024 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1025 { OUTPUT
, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_HI
, 0, 0, 0 },
1029 static const CGEN_OPERAND_INSTANCE fmt_str13b_ops
[] = {
1030 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
1031 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1032 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1033 { OUTPUT
, "h_memory_add__VM_Rj_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
1037 static const CGEN_OPERAND_INSTANCE fmt_str14_ops
[] = {
1038 { INPUT
, "disp10", & HW_ENT (HW_H_SINT
), CGEN_MODE_SI
, & OP_ENT (DISP10
), 0, 0 },
1039 { INPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, 0 },
1040 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1041 { OUTPUT
, "h_memory_add__VM_disp10_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1045 static const CGEN_OPERAND_INSTANCE fmt_str14h_ops
[] = {
1046 { INPUT
, "disp9", & HW_ENT (HW_H_SINT
), CGEN_MODE_SI
, & OP_ENT (DISP9
), 0, 0 },
1047 { INPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, 0 },
1048 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1049 { OUTPUT
, "h_memory_add__VM_disp9_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_HI
, 0, 0, 0 },
1053 static const CGEN_OPERAND_INSTANCE fmt_str14b_ops
[] = {
1054 { INPUT
, "disp8", & HW_ENT (HW_H_SINT
), CGEN_MODE_SI
, & OP_ENT (DISP8
), 0, 0 },
1055 { INPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, 0 },
1056 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1057 { OUTPUT
, "h_memory_add__VM_disp8_reg__VM_h_gr_14", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
1061 static const CGEN_OPERAND_INSTANCE fmt_str15_ops
[] = {
1062 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1063 { INPUT
, "udisp6", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (UDISP6
), 0, 0 },
1064 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1065 { OUTPUT
, "h_memory_add__VM_reg__VM_h_gr_15_udisp6", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1069 static const CGEN_OPERAND_INSTANCE fmt_str15gr_ops
[] = {
1070 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1071 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1072 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1073 { OUTPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1077 static const CGEN_OPERAND_INSTANCE fmt_str15dr_ops
[] = {
1078 { INPUT
, "Rs2", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, & OP_ENT (RS2
), 0, 0 },
1079 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1080 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1081 { OUTPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1085 static const CGEN_OPERAND_INSTANCE fmt_str15ps_ops
[] = {
1086 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1087 { INPUT
, "ps", & HW_ENT (HW_H_PS
), CGEN_MODE_USI
, 0, 0, 0 },
1088 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1089 { OUTPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1093 static const CGEN_OPERAND_INSTANCE fmt_mov_ops
[] = {
1094 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RJ
), 0, 0 },
1095 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1099 static const CGEN_OPERAND_INSTANCE fmt_movdr_ops
[] = {
1100 { INPUT
, "Rs1", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, & OP_ENT (RS1
), 0, 0 },
1101 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1105 static const CGEN_OPERAND_INSTANCE fmt_movps_ops
[] = {
1106 { INPUT
, "ps", & HW_ENT (HW_H_PS
), CGEN_MODE_USI
, 0, 0, 0 },
1107 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1111 static const CGEN_OPERAND_INSTANCE fmt_mov2dr_ops
[] = {
1112 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1113 { OUTPUT
, "Rs1", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, & OP_ENT (RS1
), 0, 0 },
1117 static const CGEN_OPERAND_INSTANCE fmt_mov2ps_ops
[] = {
1118 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1119 { OUTPUT
, "ps", & HW_ENT (HW_H_PS
), CGEN_MODE_USI
, 0, 0, 0 },
1123 static const CGEN_OPERAND_INSTANCE fmt_jmp_ops
[] = {
1124 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1125 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, 0 },
1129 static const CGEN_OPERAND_INSTANCE fmt_callr_ops
[] = {
1130 { INPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, 0 },
1131 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1132 { OUTPUT
, "h_dr_1", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 1, 0 },
1133 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, 0 },
1137 static const CGEN_OPERAND_INSTANCE fmt_call_ops
[] = {
1138 { INPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, 0 },
1139 { INPUT
, "label12", & HW_ENT (HW_H_IADDR
), CGEN_MODE_USI
, & OP_ENT (LABEL12
), 0, 0 },
1140 { OUTPUT
, "h_dr_1", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 1, 0 },
1141 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, 0 },
1145 static const CGEN_OPERAND_INSTANCE fmt_ret_ops
[] = {
1146 { INPUT
, "h_dr_1", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 1, 0 },
1147 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, 0 },
1151 static const CGEN_OPERAND_INSTANCE fmt_int_ops
[] = {
1152 { INPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_SI
, 0, 0, 0 },
1153 { INPUT
, "u8", & HW_ENT (HW_H_UINT
), CGEN_MODE_SI
, & OP_ENT (U8
), 0, 0 },
1154 { OUTPUT
, "h_dr_2", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 2, 0 },
1155 { OUTPUT
, "ibit", & HW_ENT (HW_H_IBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1156 { OUTPUT
, "sbit", & HW_ENT (HW_H_SBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1157 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_SI
, 0, 0, 0 },
1161 static const CGEN_OPERAND_INSTANCE fmt_inte_ops
[] = {
1162 { INPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_SI
, 0, 0, 0 },
1163 { OUTPUT
, "h_dr_2", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 2, 0 },
1164 { OUTPUT
, "ibit", & HW_ENT (HW_H_IBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1165 { OUTPUT
, "ilm", & HW_ENT (HW_H_ILM
), CGEN_MODE_UQI
, 0, 0, 0 },
1166 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_SI
, 0, 0, 0 },
1170 static const CGEN_OPERAND_INSTANCE fmt_reti_ops
[] = {
1171 { INPUT
, "sbit", & HW_ENT (HW_H_SBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1172 { INPUT
, "h_dr_2", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 2, COND_REF
},
1173 { INPUT
, "h_memory_reg__VM_h_dr_2", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1174 { INPUT
, "h_dr_3", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 3, COND_REF
},
1175 { INPUT
, "h_memory_reg__VM_h_dr_3", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1176 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1177 { OUTPUT
, "h_dr_2", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 2, COND_REF
},
1178 { OUTPUT
, "ps", & HW_ENT (HW_H_PS
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1179 { OUTPUT
, "h_dr_3", & HW_ENT (HW_H_DR
), CGEN_MODE_SI
, 0, 3, COND_REF
},
1183 static const CGEN_OPERAND_INSTANCE fmt_brad_ops
[] = {
1184 { INPUT
, "label9", & HW_ENT (HW_H_IADDR
), CGEN_MODE_USI
, & OP_ENT (LABEL9
), 0, COND_REF
},
1185 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1189 static const CGEN_OPERAND_INSTANCE fmt_beqd_ops
[] = {
1190 { INPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1191 { INPUT
, "label9", & HW_ENT (HW_H_IADDR
), CGEN_MODE_USI
, & OP_ENT (LABEL9
), 0, COND_REF
},
1192 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1196 static const CGEN_OPERAND_INSTANCE fmt_bcd_ops
[] = {
1197 { INPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1198 { INPUT
, "label9", & HW_ENT (HW_H_IADDR
), CGEN_MODE_USI
, & OP_ENT (LABEL9
), 0, COND_REF
},
1199 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1203 static const CGEN_OPERAND_INSTANCE fmt_bnd_ops
[] = {
1204 { INPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1205 { INPUT
, "label9", & HW_ENT (HW_H_IADDR
), CGEN_MODE_USI
, & OP_ENT (LABEL9
), 0, COND_REF
},
1206 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1210 static const CGEN_OPERAND_INSTANCE fmt_bvd_ops
[] = {
1211 { INPUT
, "vbit", & HW_ENT (HW_H_VBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1212 { INPUT
, "label9", & HW_ENT (HW_H_IADDR
), CGEN_MODE_USI
, & OP_ENT (LABEL9
), 0, COND_REF
},
1213 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1217 static const CGEN_OPERAND_INSTANCE fmt_bltd_ops
[] = {
1218 { INPUT
, "vbit", & HW_ENT (HW_H_VBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1219 { INPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1220 { INPUT
, "label9", & HW_ENT (HW_H_IADDR
), CGEN_MODE_USI
, & OP_ENT (LABEL9
), 0, COND_REF
},
1221 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1225 static const CGEN_OPERAND_INSTANCE fmt_bled_ops
[] = {
1226 { INPUT
, "vbit", & HW_ENT (HW_H_VBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1227 { INPUT
, "nbit", & HW_ENT (HW_H_NBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1228 { INPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1229 { INPUT
, "label9", & HW_ENT (HW_H_IADDR
), CGEN_MODE_USI
, & OP_ENT (LABEL9
), 0, COND_REF
},
1230 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1234 static const CGEN_OPERAND_INSTANCE fmt_blsd_ops
[] = {
1235 { INPUT
, "cbit", & HW_ENT (HW_H_CBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1236 { INPUT
, "zbit", & HW_ENT (HW_H_ZBIT
), CGEN_MODE_BI
, 0, 0, 0 },
1237 { INPUT
, "label9", & HW_ENT (HW_H_IADDR
), CGEN_MODE_USI
, & OP_ENT (LABEL9
), 0, COND_REF
},
1238 { OUTPUT
, "pc", & HW_ENT (HW_H_PC
), CGEN_MODE_USI
, 0, 0, COND_REF
},
1242 static const CGEN_OPERAND_INSTANCE fmt_dmovr13_ops
[] = {
1243 { INPUT
, "dir10", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR10
), 0, 0 },
1244 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1245 { OUTPUT
, "h_memory_dir10", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1249 static const CGEN_OPERAND_INSTANCE fmt_dmovr13h_ops
[] = {
1250 { INPUT
, "dir9", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR9
), 0, 0 },
1251 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1252 { OUTPUT
, "h_memory_dir9", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_HI
, 0, 0, 0 },
1256 static const CGEN_OPERAND_INSTANCE fmt_dmovr13b_ops
[] = {
1257 { INPUT
, "dir8", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR8
), 0, 0 },
1258 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1259 { OUTPUT
, "h_memory_dir8", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
1263 static const CGEN_OPERAND_INSTANCE fmt_dmovr13pi_ops
[] = {
1264 { INPUT
, "dir10", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR10
), 0, 0 },
1265 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1266 { INPUT
, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1267 { OUTPUT
, "h_memory_dir10", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1268 { OUTPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1272 static const CGEN_OPERAND_INSTANCE fmt_dmovr13pih_ops
[] = {
1273 { INPUT
, "dir9", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR9
), 0, 0 },
1274 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1275 { INPUT
, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_HI
, 0, 0, 0 },
1276 { OUTPUT
, "h_memory_dir9", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_HI
, 0, 0, 0 },
1277 { OUTPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1281 static const CGEN_OPERAND_INSTANCE fmt_dmovr13pib_ops
[] = {
1282 { INPUT
, "dir8", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR8
), 0, 0 },
1283 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1284 { INPUT
, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
1285 { OUTPUT
, "h_memory_dir8", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
1286 { OUTPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1290 static const CGEN_OPERAND_INSTANCE fmt_dmovr15pi_ops
[] = {
1291 { INPUT
, "dir10", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR10
), 0, 0 },
1292 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1293 { INPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1294 { OUTPUT
, "h_memory_dir10", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1295 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1299 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13_ops
[] = {
1300 { INPUT
, "dir10", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR10
), 0, 0 },
1301 { INPUT
, "h_memory_dir10", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1302 { OUTPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1306 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13h_ops
[] = {
1307 { INPUT
, "dir9", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR9
), 0, 0 },
1308 { INPUT
, "h_memory_dir9", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_HI
, 0, 0, 0 },
1309 { OUTPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1313 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13b_ops
[] = {
1314 { INPUT
, "dir8", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR8
), 0, 0 },
1315 { INPUT
, "h_memory_dir8", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
1316 { OUTPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1320 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13pi_ops
[] = {
1321 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1322 { INPUT
, "dir10", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR10
), 0, 0 },
1323 { INPUT
, "h_memory_dir10", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1324 { OUTPUT
, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1325 { OUTPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1329 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13pih_ops
[] = {
1330 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1331 { INPUT
, "dir9", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR9
), 0, 0 },
1332 { INPUT
, "h_memory_dir9", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_HI
, 0, 0, 0 },
1333 { OUTPUT
, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_HI
, 0, 0, 0 },
1334 { OUTPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1338 static const CGEN_OPERAND_INSTANCE fmt_dmov2r13pib_ops
[] = {
1339 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1340 { INPUT
, "dir8", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR8
), 0, 0 },
1341 { INPUT
, "h_memory_dir8", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
1342 { OUTPUT
, "h_memory_reg__VM_h_gr_13", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_QI
, 0, 0, 0 },
1343 { OUTPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, 0 },
1347 static const CGEN_OPERAND_INSTANCE fmt_dmov2r15pd_ops
[] = {
1348 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1349 { INPUT
, "dir10", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (DIR10
), 0, 0 },
1350 { INPUT
, "h_memory_dir10", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1351 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1352 { OUTPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1356 static const CGEN_OPERAND_INSTANCE fmt_ldres_ops
[] = {
1357 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1358 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1362 static const CGEN_OPERAND_INSTANCE fmt_andccr_ops
[] = {
1363 { INPUT
, "ccr", & HW_ENT (HW_H_CCR
), CGEN_MODE_UQI
, 0, 0, 0 },
1364 { INPUT
, "u8", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (U8
), 0, 0 },
1365 { OUTPUT
, "ccr", & HW_ENT (HW_H_CCR
), CGEN_MODE_UQI
, 0, 0, 0 },
1369 static const CGEN_OPERAND_INSTANCE fmt_stilm_ops
[] = {
1370 { INPUT
, "u8", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (U8
), 0, 0 },
1371 { OUTPUT
, "ilm", & HW_ENT (HW_H_ILM
), CGEN_MODE_UQI
, 0, 0, 0 },
1375 static const CGEN_OPERAND_INSTANCE fmt_addsp_ops
[] = {
1376 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1377 { INPUT
, "s10", & HW_ENT (HW_H_SINT
), CGEN_MODE_SI
, & OP_ENT (S10
), 0, 0 },
1378 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1382 static const CGEN_OPERAND_INSTANCE fmt_extsb_ops
[] = {
1383 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_QI
, & OP_ENT (RI
), 0, 0 },
1384 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1388 static const CGEN_OPERAND_INSTANCE fmt_extub_ops
[] = {
1389 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_UQI
, & OP_ENT (RI
), 0, 0 },
1390 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1394 static const CGEN_OPERAND_INSTANCE fmt_extsh_ops
[] = {
1395 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_HI
, & OP_ENT (RI
), 0, 0 },
1396 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1400 static const CGEN_OPERAND_INSTANCE fmt_extuh_ops
[] = {
1401 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_UHI
, & OP_ENT (RI
), 0, 0 },
1402 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1406 static const CGEN_OPERAND_INSTANCE fmt_ldm0_ops
[] = {
1407 { INPUT
, "reglist_low_ld", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (REGLIST_LOW_LD
), 0, 0 },
1408 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, COND_REF
},
1409 { INPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, COND_REF
},
1410 { OUTPUT
, "h_gr_0", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 0, COND_REF
},
1411 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, COND_REF
},
1412 { OUTPUT
, "h_gr_1", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 1, COND_REF
},
1413 { OUTPUT
, "h_gr_2", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 2, COND_REF
},
1414 { OUTPUT
, "h_gr_3", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 3, COND_REF
},
1415 { OUTPUT
, "h_gr_4", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 4, COND_REF
},
1416 { OUTPUT
, "h_gr_5", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 5, COND_REF
},
1417 { OUTPUT
, "h_gr_6", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 6, COND_REF
},
1418 { OUTPUT
, "h_gr_7", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 7, COND_REF
},
1422 static const CGEN_OPERAND_INSTANCE fmt_ldm1_ops
[] = {
1423 { INPUT
, "reglist_hi_ld", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (REGLIST_HI_LD
), 0, 0 },
1424 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, COND_REF
},
1425 { INPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, COND_REF
},
1426 { OUTPUT
, "h_gr_8", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 8, COND_REF
},
1427 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, COND_REF
},
1428 { OUTPUT
, "h_gr_9", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 9, COND_REF
},
1429 { OUTPUT
, "h_gr_10", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 10, COND_REF
},
1430 { OUTPUT
, "h_gr_11", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 11, COND_REF
},
1431 { OUTPUT
, "h_gr_12", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 12, COND_REF
},
1432 { OUTPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, COND_REF
},
1433 { OUTPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, COND_REF
},
1437 static const CGEN_OPERAND_INSTANCE fmt_stm0_ops
[] = {
1438 { INPUT
, "reglist_low_st", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (REGLIST_LOW_ST
), 0, 0 },
1439 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, COND_REF
},
1440 { INPUT
, "h_gr_7", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 7, COND_REF
},
1441 { INPUT
, "h_gr_6", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 6, COND_REF
},
1442 { INPUT
, "h_gr_5", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 5, COND_REF
},
1443 { INPUT
, "h_gr_4", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 4, COND_REF
},
1444 { INPUT
, "h_gr_3", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 3, COND_REF
},
1445 { INPUT
, "h_gr_2", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 2, COND_REF
},
1446 { INPUT
, "h_gr_1", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 1, COND_REF
},
1447 { INPUT
, "h_gr_0", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 0, COND_REF
},
1448 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, COND_REF
},
1449 { OUTPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, COND_REF
},
1453 static const CGEN_OPERAND_INSTANCE fmt_stm1_ops
[] = {
1454 { INPUT
, "reglist_hi_st", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (REGLIST_HI_ST
), 0, 0 },
1455 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, COND_REF
},
1456 { INPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, COND_REF
},
1457 { INPUT
, "h_gr_13", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 13, COND_REF
},
1458 { INPUT
, "h_gr_12", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 12, COND_REF
},
1459 { INPUT
, "h_gr_11", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 11, COND_REF
},
1460 { INPUT
, "h_gr_10", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 10, COND_REF
},
1461 { INPUT
, "h_gr_9", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 9, COND_REF
},
1462 { INPUT
, "h_gr_8", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 8, COND_REF
},
1463 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, COND_REF
},
1464 { OUTPUT
, "h_memory_reg__VM_h_gr_15", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, COND_REF
},
1468 static const CGEN_OPERAND_INSTANCE fmt_enter_ops
[] = {
1469 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1470 { INPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, 0 },
1471 { INPUT
, "u10", & HW_ENT (HW_H_UINT
), CGEN_MODE_USI
, & OP_ENT (U10
), 0, 0 },
1472 { OUTPUT
, "h_memory_tmp", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1473 { OUTPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, 0 },
1474 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1478 static const CGEN_OPERAND_INSTANCE fmt_leave_ops
[] = {
1479 { INPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, 0 },
1480 { INPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1481 { INPUT
, "h_memory_sub__VM_reg__VM_h_gr_15_const__WI_4", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_SI
, 0, 0, 0 },
1482 { OUTPUT
, "h_gr_15", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 15, 0 },
1483 { OUTPUT
, "h_gr_14", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, 0, 14, 0 },
1487 static const CGEN_OPERAND_INSTANCE fmt_xchb_ops
[] = {
1488 { INPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1489 { INPUT
, "Rj", & HW_ENT (HW_H_GR
), CGEN_MODE_USI
, & OP_ENT (RJ
), 0, 0 },
1490 { INPUT
, "h_memory_Rj", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_UQI
, 0, 0, 0 },
1491 { OUTPUT
, "Ri", & HW_ENT (HW_H_GR
), CGEN_MODE_SI
, & OP_ENT (RI
), 0, 0 },
1492 { OUTPUT
, "h_memory_Rj", & HW_ENT (HW_H_MEMORY
), CGEN_MODE_UQI
, 0, 0, 0 },
1500 /* Instruction formats. */
1502 #define F(f) & fr30_cgen_ifld_table[CONCAT2 (FR30_,f)]
1504 static const CGEN_IFMT fmt_add
= {
1505 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1508 static const CGEN_IFMT fmt_addi
= {
1509 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_U4
), F (F_RI
), 0 }
1512 static const CGEN_IFMT fmt_add2
= {
1513 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_M4
), F (F_RI
), 0 }
1516 static const CGEN_IFMT fmt_addc
= {
1517 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1520 static const CGEN_IFMT fmt_addn
= {
1521 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1524 static const CGEN_IFMT fmt_addni
= {
1525 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_U4
), F (F_RI
), 0 }
1528 static const CGEN_IFMT fmt_addn2
= {
1529 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_M4
), F (F_RI
), 0 }
1532 static const CGEN_IFMT fmt_cmp
= {
1533 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1536 static const CGEN_IFMT fmt_cmpi
= {
1537 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_U4
), F (F_RI
), 0 }
1540 static const CGEN_IFMT fmt_cmp2
= {
1541 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_M4
), F (F_RI
), 0 }
1544 static const CGEN_IFMT fmt_and
= {
1545 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1548 static const CGEN_IFMT fmt_andm
= {
1549 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1552 static const CGEN_IFMT fmt_andh
= {
1553 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1556 static const CGEN_IFMT fmt_andb
= {
1557 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1560 static const CGEN_IFMT fmt_bandl
= {
1561 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_U4
), F (F_RI
), 0 }
1564 static const CGEN_IFMT fmt_btstl
= {
1565 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_U4
), F (F_RI
), 0 }
1568 static const CGEN_IFMT fmt_mul
= {
1569 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1572 static const CGEN_IFMT fmt_mulu
= {
1573 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1576 static const CGEN_IFMT fmt_mulh
= {
1577 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1580 static const CGEN_IFMT fmt_div0s
= {
1581 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1584 static const CGEN_IFMT fmt_div0u
= {
1585 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1588 static const CGEN_IFMT fmt_div1
= {
1589 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1592 static const CGEN_IFMT fmt_div2
= {
1593 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1596 static const CGEN_IFMT fmt_div3
= {
1597 16, 16, 0xffff, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_OP4
), 0 }
1600 static const CGEN_IFMT fmt_div4s
= {
1601 16, 16, 0xffff, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_OP4
), 0 }
1604 static const CGEN_IFMT fmt_lsl
= {
1605 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1608 static const CGEN_IFMT fmt_lsli
= {
1609 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_U4
), F (F_RI
), 0 }
1612 static const CGEN_IFMT fmt_ldi8
= {
1613 16, 16, 0xf000, { F (F_OP1
), F (F_I8
), F (F_RI
), 0 }
1616 static const CGEN_IFMT fmt_ldi20
= {
1617 16, 32, 0xff00, { F (F_OP1
), F (F_I20
), F (F_OP2
), F (F_RI
), 0 }
1620 static const CGEN_IFMT fmt_ldi32
= {
1621 16, 48, 0xfff0, { F (F_OP1
), F (F_I32
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1624 static const CGEN_IFMT fmt_ld
= {
1625 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1628 static const CGEN_IFMT fmt_lduh
= {
1629 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1632 static const CGEN_IFMT fmt_ldub
= {
1633 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1636 static const CGEN_IFMT fmt_ldr13
= {
1637 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1640 static const CGEN_IFMT fmt_ldr13uh
= {
1641 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1644 static const CGEN_IFMT fmt_ldr13ub
= {
1645 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1648 static const CGEN_IFMT fmt_ldr14
= {
1649 16, 16, 0xf000, { F (F_OP1
), F (F_DISP10
), F (F_RI
), 0 }
1652 static const CGEN_IFMT fmt_ldr14uh
= {
1653 16, 16, 0xf000, { F (F_OP1
), F (F_DISP9
), F (F_RI
), 0 }
1656 static const CGEN_IFMT fmt_ldr14ub
= {
1657 16, 16, 0xf000, { F (F_OP1
), F (F_DISP8
), F (F_RI
), 0 }
1660 static const CGEN_IFMT fmt_ldr15
= {
1661 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_UDISP6
), F (F_RI
), 0 }
1664 static const CGEN_IFMT fmt_ldr15gr
= {
1665 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1668 static const CGEN_IFMT fmt_ldr15dr
= {
1669 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RS2
), 0 }
1672 static const CGEN_IFMT fmt_ldr15ps
= {
1673 16, 16, 0xffff, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_OP4
), 0 }
1676 static const CGEN_IFMT fmt_st
= {
1677 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1680 static const CGEN_IFMT fmt_sth
= {
1681 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1684 static const CGEN_IFMT fmt_stb
= {
1685 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1688 static const CGEN_IFMT fmt_str13
= {
1689 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1692 static const CGEN_IFMT fmt_str13h
= {
1693 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1696 static const CGEN_IFMT fmt_str13b
= {
1697 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1700 static const CGEN_IFMT fmt_str14
= {
1701 16, 16, 0xf000, { F (F_OP1
), F (F_DISP10
), F (F_RI
), 0 }
1704 static const CGEN_IFMT fmt_str14h
= {
1705 16, 16, 0xf000, { F (F_OP1
), F (F_DISP9
), F (F_RI
), 0 }
1708 static const CGEN_IFMT fmt_str14b
= {
1709 16, 16, 0xf000, { F (F_OP1
), F (F_DISP8
), F (F_RI
), 0 }
1712 static const CGEN_IFMT fmt_str15
= {
1713 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_UDISP6
), F (F_RI
), 0 }
1716 static const CGEN_IFMT fmt_str15gr
= {
1717 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1720 static const CGEN_IFMT fmt_str15dr
= {
1721 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RS2
), 0 }
1724 static const CGEN_IFMT fmt_str15ps
= {
1725 16, 16, 0xffff, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_OP4
), 0 }
1728 static const CGEN_IFMT fmt_mov
= {
1729 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1732 static const CGEN_IFMT fmt_movdr
= {
1733 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RS1
), F (F_RI
), 0 }
1736 static const CGEN_IFMT fmt_movps
= {
1737 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1740 static const CGEN_IFMT fmt_mov2dr
= {
1741 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RS1
), F (F_RI
), 0 }
1744 static const CGEN_IFMT fmt_mov2ps
= {
1745 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1748 static const CGEN_IFMT fmt_jmp
= {
1749 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1752 static const CGEN_IFMT fmt_callr
= {
1753 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1756 static const CGEN_IFMT fmt_call
= {
1757 16, 16, 0xf800, { F (F_OP1
), F (F_OP5
), F (F_REL12
), 0 }
1760 static const CGEN_IFMT fmt_ret
= {
1761 16, 16, 0xffff, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_OP4
), 0 }
1764 static const CGEN_IFMT fmt_int
= {
1765 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_U8
), 0 }
1768 static const CGEN_IFMT fmt_inte
= {
1769 16, 16, 0xffff, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_OP4
), 0 }
1772 static const CGEN_IFMT fmt_reti
= {
1773 16, 16, 0xffff, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_OP4
), 0 }
1776 static const CGEN_IFMT fmt_brad
= {
1777 16, 16, 0xff00, { F (F_OP1
), F (F_CC
), F (F_REL9
), 0 }
1780 static const CGEN_IFMT fmt_beqd
= {
1781 16, 16, 0xff00, { F (F_OP1
), F (F_CC
), F (F_REL9
), 0 }
1784 static const CGEN_IFMT fmt_bcd
= {
1785 16, 16, 0xff00, { F (F_OP1
), F (F_CC
), F (F_REL9
), 0 }
1788 static const CGEN_IFMT fmt_bnd
= {
1789 16, 16, 0xff00, { F (F_OP1
), F (F_CC
), F (F_REL9
), 0 }
1792 static const CGEN_IFMT fmt_bvd
= {
1793 16, 16, 0xff00, { F (F_OP1
), F (F_CC
), F (F_REL9
), 0 }
1796 static const CGEN_IFMT fmt_bltd
= {
1797 16, 16, 0xff00, { F (F_OP1
), F (F_CC
), F (F_REL9
), 0 }
1800 static const CGEN_IFMT fmt_bled
= {
1801 16, 16, 0xff00, { F (F_OP1
), F (F_CC
), F (F_REL9
), 0 }
1804 static const CGEN_IFMT fmt_blsd
= {
1805 16, 16, 0xff00, { F (F_OP1
), F (F_CC
), F (F_REL9
), 0 }
1808 static const CGEN_IFMT fmt_dmovr13
= {
1809 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR10
), 0 }
1812 static const CGEN_IFMT fmt_dmovr13h
= {
1813 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR9
), 0 }
1816 static const CGEN_IFMT fmt_dmovr13b
= {
1817 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR8
), 0 }
1820 static const CGEN_IFMT fmt_dmovr13pi
= {
1821 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR10
), 0 }
1824 static const CGEN_IFMT fmt_dmovr13pih
= {
1825 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR9
), 0 }
1828 static const CGEN_IFMT fmt_dmovr13pib
= {
1829 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR8
), 0 }
1832 static const CGEN_IFMT fmt_dmovr15pi
= {
1833 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR10
), 0 }
1836 static const CGEN_IFMT fmt_dmov2r13
= {
1837 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR10
), 0 }
1840 static const CGEN_IFMT fmt_dmov2r13h
= {
1841 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR9
), 0 }
1844 static const CGEN_IFMT fmt_dmov2r13b
= {
1845 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR8
), 0 }
1848 static const CGEN_IFMT fmt_dmov2r13pi
= {
1849 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR10
), 0 }
1852 static const CGEN_IFMT fmt_dmov2r13pih
= {
1853 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR9
), 0 }
1856 static const CGEN_IFMT fmt_dmov2r13pib
= {
1857 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR8
), 0 }
1860 static const CGEN_IFMT fmt_dmov2r15pd
= {
1861 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_DIR10
), 0 }
1864 static const CGEN_IFMT fmt_ldres
= {
1865 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_U4
), F (F_RI
), 0 }
1868 static const CGEN_IFMT fmt_copop
= {
1869 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 }
1872 static const CGEN_IFMT fmt_copld
= {
1873 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 }
1876 static const CGEN_IFMT fmt_copst
= {
1877 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 }
1880 static const CGEN_IFMT fmt_nop
= {
1881 16, 16, 0xffff, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_OP4
), 0 }
1884 static const CGEN_IFMT fmt_andccr
= {
1885 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_U8
), 0 }
1888 static const CGEN_IFMT fmt_stilm
= {
1889 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_U8
), 0 }
1892 static const CGEN_IFMT fmt_addsp
= {
1893 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_S10
), 0 }
1896 static const CGEN_IFMT fmt_extsb
= {
1897 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1900 static const CGEN_IFMT fmt_extub
= {
1901 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1904 static const CGEN_IFMT fmt_extsh
= {
1905 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1908 static const CGEN_IFMT fmt_extuh
= {
1909 16, 16, 0xfff0, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
1912 static const CGEN_IFMT fmt_ldm0
= {
1913 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_REGLIST_LOW_LD
), 0 }
1916 static const CGEN_IFMT fmt_ldm1
= {
1917 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_REGLIST_HI_LD
), 0 }
1920 static const CGEN_IFMT fmt_stm0
= {
1921 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_REGLIST_LOW_ST
), 0 }
1924 static const CGEN_IFMT fmt_stm1
= {
1925 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_REGLIST_HI_ST
), 0 }
1928 static const CGEN_IFMT fmt_enter
= {
1929 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_U10
), 0 }
1932 static const CGEN_IFMT fmt_leave
= {
1933 16, 16, 0xffff, { F (F_OP1
), F (F_OP2
), F (F_OP3
), F (F_OP4
), 0 }
1936 static const CGEN_IFMT fmt_xchb
= {
1937 16, 16, 0xff00, { F (F_OP1
), F (F_OP2
), F (F_RJ
), F (F_RI
), 0 }
1942 #define A(a) (1 << CONCAT2 (CGEN_INSN_,a))
1943 #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
1944 #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
1946 /* The instruction table.
1947 This is currently non-static because the simulator accesses it
1950 const CGEN_INSN fr30_cgen_insn_table_entries
[MAX_INSNS
] =
1952 /* Special null first entry.
1953 A `num' value of zero is thus invalid.
1954 Also, the special `invalid' insn resides here. */
1959 FR30_INSN_ADD
, "add", "add",
1960 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
1961 & fmt_add
, { 0xa600 },
1962 (PTR
) & fmt_add_ops
[0],
1968 FR30_INSN_ADDI
, "addi", "add",
1969 { { MNEM
, ' ', OP (U4
), ',', OP (RI
), 0 } },
1970 & fmt_addi
, { 0xa400 },
1971 (PTR
) & fmt_addi_ops
[0],
1977 FR30_INSN_ADD2
, "add2", "add2",
1978 { { MNEM
, ' ', OP (M4
), ',', OP (RI
), 0 } },
1979 & fmt_add2
, { 0xa500 },
1980 (PTR
) & fmt_add2_ops
[0],
1986 FR30_INSN_ADDC
, "addc", "addc",
1987 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
1988 & fmt_addc
, { 0xa700 },
1989 (PTR
) & fmt_addc_ops
[0],
1995 FR30_INSN_ADDN
, "addn", "addn",
1996 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
1997 & fmt_addn
, { 0xa200 },
1998 (PTR
) & fmt_addn_ops
[0],
2004 FR30_INSN_ADDNI
, "addni", "addn",
2005 { { MNEM
, ' ', OP (U4
), ',', OP (RI
), 0 } },
2006 & fmt_addni
, { 0xa000 },
2007 (PTR
) & fmt_addni_ops
[0],
2013 FR30_INSN_ADDN2
, "addn2", "addn2",
2014 { { MNEM
, ' ', OP (M4
), ',', OP (RI
), 0 } },
2015 & fmt_addn2
, { 0xa100 },
2016 (PTR
) & fmt_addn2_ops
[0],
2022 FR30_INSN_SUB
, "sub", "sub",
2023 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2024 & fmt_add
, { 0xac00 },
2025 (PTR
) & fmt_add_ops
[0],
2031 FR30_INSN_SUBC
, "subc", "subc",
2032 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2033 & fmt_addc
, { 0xad00 },
2034 (PTR
) & fmt_addc_ops
[0],
2040 FR30_INSN_SUBN
, "subn", "subn",
2041 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2042 & fmt_addn
, { 0xae00 },
2043 (PTR
) & fmt_addn_ops
[0],
2049 FR30_INSN_CMP
, "cmp", "cmp",
2050 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2051 & fmt_cmp
, { 0xaa00 },
2052 (PTR
) & fmt_cmp_ops
[0],
2058 FR30_INSN_CMPI
, "cmpi", "cmp",
2059 { { MNEM
, ' ', OP (U4
), ',', OP (RI
), 0 } },
2060 & fmt_cmpi
, { 0xa800 },
2061 (PTR
) & fmt_cmpi_ops
[0],
2067 FR30_INSN_CMP2
, "cmp2", "cmp2",
2068 { { MNEM
, ' ', OP (M4
), ',', OP (RI
), 0 } },
2069 & fmt_cmp2
, { 0xa900 },
2070 (PTR
) & fmt_cmp2_ops
[0],
2076 FR30_INSN_AND
, "and", "and",
2077 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2078 & fmt_and
, { 0x8200 },
2079 (PTR
) & fmt_and_ops
[0],
2085 FR30_INSN_OR
, "or", "or",
2086 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2087 & fmt_and
, { 0x9200 },
2088 (PTR
) & fmt_and_ops
[0],
2094 FR30_INSN_EOR
, "eor", "eor",
2095 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2096 & fmt_and
, { 0x9a00 },
2097 (PTR
) & fmt_and_ops
[0],
2103 FR30_INSN_ANDM
, "andm", "and",
2104 { { MNEM
, ' ', OP (RJ
), ',', '@', OP (RI
), 0 } },
2105 & fmt_andm
, { 0x8400 },
2106 (PTR
) & fmt_andm_ops
[0],
2107 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2112 FR30_INSN_ANDH
, "andh", "andh",
2113 { { MNEM
, ' ', OP (RJ
), ',', '@', OP (RI
), 0 } },
2114 & fmt_andh
, { 0x8500 },
2115 (PTR
) & fmt_andh_ops
[0],
2116 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2121 FR30_INSN_ANDB
, "andb", "andb",
2122 { { MNEM
, ' ', OP (RJ
), ',', '@', OP (RI
), 0 } },
2123 & fmt_andb
, { 0x8600 },
2124 (PTR
) & fmt_andb_ops
[0],
2125 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2130 FR30_INSN_ORM
, "orm", "or",
2131 { { MNEM
, ' ', OP (RJ
), ',', '@', OP (RI
), 0 } },
2132 & fmt_andm
, { 0x9400 },
2133 (PTR
) & fmt_andm_ops
[0],
2134 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2139 FR30_INSN_ORH
, "orh", "orh",
2140 { { MNEM
, ' ', OP (RJ
), ',', '@', OP (RI
), 0 } },
2141 & fmt_andh
, { 0x9500 },
2142 (PTR
) & fmt_andh_ops
[0],
2143 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2148 FR30_INSN_ORB
, "orb", "orb",
2149 { { MNEM
, ' ', OP (RJ
), ',', '@', OP (RI
), 0 } },
2150 & fmt_andb
, { 0x9600 },
2151 (PTR
) & fmt_andb_ops
[0],
2152 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2157 FR30_INSN_EORM
, "eorm", "eor",
2158 { { MNEM
, ' ', OP (RJ
), ',', '@', OP (RI
), 0 } },
2159 & fmt_andm
, { 0x9c00 },
2160 (PTR
) & fmt_andm_ops
[0],
2161 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2166 FR30_INSN_EORH
, "eorh", "eorh",
2167 { { MNEM
, ' ', OP (RJ
), ',', '@', OP (RI
), 0 } },
2168 & fmt_andh
, { 0x9d00 },
2169 (PTR
) & fmt_andh_ops
[0],
2170 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2175 FR30_INSN_EORB
, "eorb", "eorb",
2176 { { MNEM
, ' ', OP (RJ
), ',', '@', OP (RI
), 0 } },
2177 & fmt_andb
, { 0x9e00 },
2178 (PTR
) & fmt_andb_ops
[0],
2179 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2181 /* bandl $u4,@$Ri */
2184 FR30_INSN_BANDL
, "bandl", "bandl",
2185 { { MNEM
, ' ', OP (U4
), ',', '@', OP (RI
), 0 } },
2186 & fmt_bandl
, { 0x8000 },
2187 (PTR
) & fmt_bandl_ops
[0],
2188 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2193 FR30_INSN_BORL
, "borl", "borl",
2194 { { MNEM
, ' ', OP (U4
), ',', '@', OP (RI
), 0 } },
2195 & fmt_bandl
, { 0x9000 },
2196 (PTR
) & fmt_bandl_ops
[0],
2197 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2199 /* beorl $u4,@$Ri */
2202 FR30_INSN_BEORL
, "beorl", "beorl",
2203 { { MNEM
, ' ', OP (U4
), ',', '@', OP (RI
), 0 } },
2204 & fmt_bandl
, { 0x9800 },
2205 (PTR
) & fmt_bandl_ops
[0],
2206 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2208 /* bandh $u4,@$Ri */
2211 FR30_INSN_BANDH
, "bandh", "bandh",
2212 { { MNEM
, ' ', OP (U4
), ',', '@', OP (RI
), 0 } },
2213 & fmt_bandl
, { 0x8100 },
2214 (PTR
) & fmt_bandl_ops
[0],
2215 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2220 FR30_INSN_BORH
, "borh", "borh",
2221 { { MNEM
, ' ', OP (U4
), ',', '@', OP (RI
), 0 } },
2222 & fmt_bandl
, { 0x9100 },
2223 (PTR
) & fmt_bandl_ops
[0],
2224 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2226 /* beorh $u4,@$Ri */
2229 FR30_INSN_BEORH
, "beorh", "beorh",
2230 { { MNEM
, ' ', OP (U4
), ',', '@', OP (RI
), 0 } },
2231 & fmt_bandl
, { 0x9900 },
2232 (PTR
) & fmt_bandl_ops
[0],
2233 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2235 /* btstl $u4,@$Ri */
2238 FR30_INSN_BTSTL
, "btstl", "btstl",
2239 { { MNEM
, ' ', OP (U4
), ',', '@', OP (RI
), 0 } },
2240 & fmt_btstl
, { 0x8800 },
2241 (PTR
) & fmt_btstl_ops
[0],
2242 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2244 /* btsth $u4,@$Ri */
2247 FR30_INSN_BTSTH
, "btsth", "btsth",
2248 { { MNEM
, ' ', OP (U4
), ',', '@', OP (RI
), 0 } },
2249 & fmt_btstl
, { 0x8900 },
2250 (PTR
) & fmt_btstl_ops
[0],
2251 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2256 FR30_INSN_MUL
, "mul", "mul",
2257 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2258 & fmt_mul
, { 0xaf00 },
2259 (PTR
) & fmt_mul_ops
[0],
2260 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2265 FR30_INSN_MULU
, "mulu", "mulu",
2266 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2267 & fmt_mulu
, { 0xab00 },
2268 (PTR
) & fmt_mulu_ops
[0],
2269 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2274 FR30_INSN_MULH
, "mulh", "mulh",
2275 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2276 & fmt_mulh
, { 0xbf00 },
2277 (PTR
) & fmt_mulh_ops
[0],
2278 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2283 FR30_INSN_MULUH
, "muluh", "muluh",
2284 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2285 & fmt_mulh
, { 0xbb00 },
2286 (PTR
) & fmt_mulh_ops
[0],
2287 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2292 FR30_INSN_DIV0S
, "div0s", "div0s",
2293 { { MNEM
, ' ', OP (RI
), 0 } },
2294 & fmt_div0s
, { 0x9740 },
2295 (PTR
) & fmt_div0s_ops
[0],
2301 FR30_INSN_DIV0U
, "div0u", "div0u",
2302 { { MNEM
, ' ', OP (RI
), 0 } },
2303 & fmt_div0u
, { 0x9750 },
2304 (PTR
) & fmt_div0u_ops
[0],
2310 FR30_INSN_DIV1
, "div1", "div1",
2311 { { MNEM
, ' ', OP (RI
), 0 } },
2312 & fmt_div1
, { 0x9760 },
2313 (PTR
) & fmt_div1_ops
[0],
2319 FR30_INSN_DIV2
, "div2", "div2",
2320 { { MNEM
, ' ', OP (RI
), 0 } },
2321 & fmt_div2
, { 0x9770 },
2322 (PTR
) & fmt_div2_ops
[0],
2328 FR30_INSN_DIV3
, "div3", "div3",
2330 & fmt_div3
, { 0x9f60 },
2331 (PTR
) & fmt_div3_ops
[0],
2337 FR30_INSN_DIV4S
, "div4s", "div4s",
2339 & fmt_div4s
, { 0x9f70 },
2340 (PTR
) & fmt_div4s_ops
[0],
2346 FR30_INSN_LSL
, "lsl", "lsl",
2347 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2348 & fmt_lsl
, { 0xb600 },
2349 (PTR
) & fmt_lsl_ops
[0],
2355 FR30_INSN_LSLI
, "lsli", "lsl",
2356 { { MNEM
, ' ', OP (U4
), ',', OP (RI
), 0 } },
2357 & fmt_lsli
, { 0xb400 },
2358 (PTR
) & fmt_lsli_ops
[0],
2364 FR30_INSN_LSL2
, "lsl2", "lsl2",
2365 { { MNEM
, ' ', OP (U4
), ',', OP (RI
), 0 } },
2366 & fmt_lsli
, { 0xb500 },
2367 (PTR
) & fmt_lsli_ops
[0],
2373 FR30_INSN_LSR
, "lsr", "lsr",
2374 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2375 & fmt_lsl
, { 0xb200 },
2376 (PTR
) & fmt_lsl_ops
[0],
2382 FR30_INSN_LSRI
, "lsri", "lsr",
2383 { { MNEM
, ' ', OP (U4
), ',', OP (RI
), 0 } },
2384 & fmt_lsli
, { 0xb000 },
2385 (PTR
) & fmt_lsli_ops
[0],
2391 FR30_INSN_LSR2
, "lsr2", "lsr2",
2392 { { MNEM
, ' ', OP (U4
), ',', OP (RI
), 0 } },
2393 & fmt_lsli
, { 0xb100 },
2394 (PTR
) & fmt_lsli_ops
[0],
2400 FR30_INSN_ASR
, "asr", "asr",
2401 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2402 & fmt_lsl
, { 0xba00 },
2403 (PTR
) & fmt_lsl_ops
[0],
2409 FR30_INSN_ASRI
, "asri", "asr",
2410 { { MNEM
, ' ', OP (U4
), ',', OP (RI
), 0 } },
2411 & fmt_lsli
, { 0xb800 },
2412 (PTR
) & fmt_lsli_ops
[0],
2418 FR30_INSN_ASR2
, "asr2", "asr2",
2419 { { MNEM
, ' ', OP (U4
), ',', OP (RI
), 0 } },
2420 & fmt_lsli
, { 0xb900 },
2421 (PTR
) & fmt_lsli_ops
[0],
2427 FR30_INSN_LDI8
, "ldi8", "ldi:8",
2428 { { MNEM
, ' ', OP (I8
), ',', OP (RI
), 0 } },
2429 & fmt_ldi8
, { 0xc000 },
2430 (PTR
) & fmt_ldi8_ops
[0],
2433 /* ldi:20 $i20,$Ri */
2436 FR30_INSN_LDI20
, "ldi20", "ldi:20",
2437 { { MNEM
, ' ', OP (I20
), ',', OP (RI
), 0 } },
2438 & fmt_ldi20
, { 0x9b00 },
2439 (PTR
) & fmt_ldi20_ops
[0],
2440 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2442 /* ldi:32 $i32,$Ri */
2445 FR30_INSN_LDI32
, "ldi32", "ldi:32",
2446 { { MNEM
, ' ', OP (I32
), ',', OP (RI
), 0 } },
2447 & fmt_ldi32
, { 0x9f80 },
2448 (PTR
) & fmt_ldi32_ops
[0],
2449 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2454 FR30_INSN_LD
, "ld", "ld",
2455 { { MNEM
, ' ', '@', OP (RJ
), ',', OP (RI
), 0 } },
2456 & fmt_ld
, { 0x400 },
2457 (PTR
) & fmt_ld_ops
[0],
2463 FR30_INSN_LDUH
, "lduh", "lduh",
2464 { { MNEM
, ' ', '@', OP (RJ
), ',', OP (RI
), 0 } },
2465 & fmt_lduh
, { 0x500 },
2466 (PTR
) & fmt_lduh_ops
[0],
2472 FR30_INSN_LDUB
, "ldub", "ldub",
2473 { { MNEM
, ' ', '@', OP (RJ
), ',', OP (RI
), 0 } },
2474 & fmt_ldub
, { 0x600 },
2475 (PTR
) & fmt_ldub_ops
[0],
2478 /* ld @($R13,$Rj),$Ri */
2481 FR30_INSN_LDR13
, "ldr13", "ld",
2482 { { MNEM
, ' ', '@', '(', OP (R13
), ',', OP (RJ
), ')', ',', OP (RI
), 0 } },
2483 & fmt_ldr13
, { 0x0 },
2484 (PTR
) & fmt_ldr13_ops
[0],
2487 /* lduh @($R13,$Rj),$Ri */
2490 FR30_INSN_LDR13UH
, "ldr13uh", "lduh",
2491 { { MNEM
, ' ', '@', '(', OP (R13
), ',', OP (RJ
), ')', ',', OP (RI
), 0 } },
2492 & fmt_ldr13uh
, { 0x100 },
2493 (PTR
) & fmt_ldr13uh_ops
[0],
2496 /* ldub @($R13,$Rj),$Ri */
2499 FR30_INSN_LDR13UB
, "ldr13ub", "ldub",
2500 { { MNEM
, ' ', '@', '(', OP (R13
), ',', OP (RJ
), ')', ',', OP (RI
), 0 } },
2501 & fmt_ldr13ub
, { 0x200 },
2502 (PTR
) & fmt_ldr13ub_ops
[0],
2505 /* ld @($R14,$disp10),$Ri */
2508 FR30_INSN_LDR14
, "ldr14", "ld",
2509 { { MNEM
, ' ', '@', '(', OP (R14
), ',', OP (DISP10
), ')', ',', OP (RI
), 0 } },
2510 & fmt_ldr14
, { 0x2000 },
2511 (PTR
) & fmt_ldr14_ops
[0],
2514 /* lduh @($R14,$disp9),$Ri */
2517 FR30_INSN_LDR14UH
, "ldr14uh", "lduh",
2518 { { MNEM
, ' ', '@', '(', OP (R14
), ',', OP (DISP9
), ')', ',', OP (RI
), 0 } },
2519 & fmt_ldr14uh
, { 0x4000 },
2520 (PTR
) & fmt_ldr14uh_ops
[0],
2523 /* ldub @($R14,$disp8),$Ri */
2526 FR30_INSN_LDR14UB
, "ldr14ub", "ldub",
2527 { { MNEM
, ' ', '@', '(', OP (R14
), ',', OP (DISP8
), ')', ',', OP (RI
), 0 } },
2528 & fmt_ldr14ub
, { 0x6000 },
2529 (PTR
) & fmt_ldr14ub_ops
[0],
2532 /* ld @($R15,$udisp6),$Ri */
2535 FR30_INSN_LDR15
, "ldr15", "ld",
2536 { { MNEM
, ' ', '@', '(', OP (R15
), ',', OP (UDISP6
), ')', ',', OP (RI
), 0 } },
2537 & fmt_ldr15
, { 0x300 },
2538 (PTR
) & fmt_ldr15_ops
[0],
2544 FR30_INSN_LDR15GR
, "ldr15gr", "ld",
2545 { { MNEM
, ' ', '@', OP (R15
), '+', ',', OP (RI
), 0 } },
2546 & fmt_ldr15gr
, { 0x700 },
2547 (PTR
) & fmt_ldr15gr_ops
[0],
2550 /* ld @$R15+,$Rs2 */
2553 FR30_INSN_LDR15DR
, "ldr15dr", "ld",
2554 { { MNEM
, ' ', '@', OP (R15
), '+', ',', OP (RS2
), 0 } },
2555 & fmt_ldr15dr
, { 0x780 },
2556 (PTR
) & fmt_ldr15dr_ops
[0],
2562 FR30_INSN_LDR15PS
, "ldr15ps", "ld",
2563 { { MNEM
, ' ', '@', OP (R15
), '+', ',', OP (PS
), 0 } },
2564 & fmt_ldr15ps
, { 0x790 },
2565 (PTR
) & fmt_ldr15ps_ops
[0],
2566 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
2571 FR30_INSN_ST
, "st", "st",
2572 { { MNEM
, ' ', OP (RI
), ',', '@', OP (RJ
), 0 } },
2573 & fmt_st
, { 0x1400 },
2574 (PTR
) & fmt_st_ops
[0],
2580 FR30_INSN_STH
, "sth", "sth",
2581 { { MNEM
, ' ', OP (RI
), ',', '@', OP (RJ
), 0 } },
2582 & fmt_sth
, { 0x1500 },
2583 (PTR
) & fmt_sth_ops
[0],
2589 FR30_INSN_STB
, "stb", "stb",
2590 { { MNEM
, ' ', OP (RI
), ',', '@', OP (RJ
), 0 } },
2591 & fmt_stb
, { 0x1600 },
2592 (PTR
) & fmt_stb_ops
[0],
2595 /* st $Ri,@($R13,$Rj) */
2598 FR30_INSN_STR13
, "str13", "st",
2599 { { MNEM
, ' ', OP (RI
), ',', '@', '(', OP (R13
), ',', OP (RJ
), ')', 0 } },
2600 & fmt_str13
, { 0x1000 },
2601 (PTR
) & fmt_str13_ops
[0],
2604 /* sth $Ri,@($R13,$Rj) */
2607 FR30_INSN_STR13H
, "str13h", "sth",
2608 { { MNEM
, ' ', OP (RI
), ',', '@', '(', OP (R13
), ',', OP (RJ
), ')', 0 } },
2609 & fmt_str13h
, { 0x1100 },
2610 (PTR
) & fmt_str13h_ops
[0],
2613 /* stb $Ri,@($R13,$Rj) */
2616 FR30_INSN_STR13B
, "str13b", "stb",
2617 { { MNEM
, ' ', OP (RI
), ',', '@', '(', OP (R13
), ',', OP (RJ
), ')', 0 } },
2618 & fmt_str13b
, { 0x1200 },
2619 (PTR
) & fmt_str13b_ops
[0],
2622 /* st $Ri,@($R14,$disp10) */
2625 FR30_INSN_STR14
, "str14", "st",
2626 { { MNEM
, ' ', OP (RI
), ',', '@', '(', OP (R14
), ',', OP (DISP10
), ')', 0 } },
2627 & fmt_str14
, { 0x3000 },
2628 (PTR
) & fmt_str14_ops
[0],
2631 /* sth $Ri,@($R14,$disp9) */
2634 FR30_INSN_STR14H
, "str14h", "sth",
2635 { { MNEM
, ' ', OP (RI
), ',', '@', '(', OP (R14
), ',', OP (DISP9
), ')', 0 } },
2636 & fmt_str14h
, { 0x5000 },
2637 (PTR
) & fmt_str14h_ops
[0],
2640 /* stb $Ri,@($R14,$disp8) */
2643 FR30_INSN_STR14B
, "str14b", "stb",
2644 { { MNEM
, ' ', OP (RI
), ',', '@', '(', OP (R14
), ',', OP (DISP8
), ')', 0 } },
2645 & fmt_str14b
, { 0x7000 },
2646 (PTR
) & fmt_str14b_ops
[0],
2649 /* st $Ri,@($R15,$udisp6) */
2652 FR30_INSN_STR15
, "str15", "st",
2653 { { MNEM
, ' ', OP (RI
), ',', '@', '(', OP (R15
), ',', OP (UDISP6
), ')', 0 } },
2654 & fmt_str15
, { 0x1300 },
2655 (PTR
) & fmt_str15_ops
[0],
2661 FR30_INSN_STR15GR
, "str15gr", "st",
2662 { { MNEM
, ' ', OP (RI
), ',', '@', '-', OP (R15
), 0 } },
2663 & fmt_str15gr
, { 0x1700 },
2664 (PTR
) & fmt_str15gr_ops
[0],
2667 /* st $Rs2,@-$R15 */
2670 FR30_INSN_STR15DR
, "str15dr", "st",
2671 { { MNEM
, ' ', OP (RS2
), ',', '@', '-', OP (R15
), 0 } },
2672 & fmt_str15dr
, { 0x1780 },
2673 (PTR
) & fmt_str15dr_ops
[0],
2679 FR30_INSN_STR15PS
, "str15ps", "st",
2680 { { MNEM
, ' ', OP (PS
), ',', '@', '-', OP (R15
), 0 } },
2681 & fmt_str15ps
, { 0x1790 },
2682 (PTR
) & fmt_str15ps_ops
[0],
2688 FR30_INSN_MOV
, "mov", "mov",
2689 { { MNEM
, ' ', OP (RJ
), ',', OP (RI
), 0 } },
2690 & fmt_mov
, { 0x8b00 },
2691 (PTR
) & fmt_mov_ops
[0],
2697 FR30_INSN_MOVDR
, "movdr", "mov",
2698 { { MNEM
, ' ', OP (RS1
), ',', OP (RI
), 0 } },
2699 & fmt_movdr
, { 0xb700 },
2700 (PTR
) & fmt_movdr_ops
[0],
2706 FR30_INSN_MOVPS
, "movps", "mov",
2707 { { MNEM
, ' ', OP (PS
), ',', OP (RI
), 0 } },
2708 & fmt_movps
, { 0x1710 },
2709 (PTR
) & fmt_movps_ops
[0],
2715 FR30_INSN_MOV2DR
, "mov2dr", "mov",
2716 { { MNEM
, ' ', OP (RI
), ',', OP (RS1
), 0 } },
2717 & fmt_mov2dr
, { 0xb300 },
2718 (PTR
) & fmt_mov2dr_ops
[0],
2724 FR30_INSN_MOV2PS
, "mov2ps", "mov",
2725 { { MNEM
, ' ', OP (RI
), ',', OP (PS
), 0 } },
2726 & fmt_mov2ps
, { 0x710 },
2727 (PTR
) & fmt_mov2ps_ops
[0],
2733 FR30_INSN_JMP
, "jmp", "jmp",
2734 { { MNEM
, ' ', '@', OP (RI
), 0 } },
2735 & fmt_jmp
, { 0x9700 },
2736 (PTR
) & fmt_jmp_ops
[0],
2737 { 0, 0|A(NOT_IN_DELAY_SLOT
)|A(UNCOND_CTI
), { 0 } }
2742 FR30_INSN_JMPD
, "jmpd", "jmp:d",
2743 { { MNEM
, ' ', '@', OP (RI
), 0 } },
2744 & fmt_jmp
, { 0x9f00 },
2745 (PTR
) & fmt_jmp_ops
[0],
2746 { 0, 0|A(NOT_IN_DELAY_SLOT
)|A(DELAY_SLOT
)|A(UNCOND_CTI
), { 0 } }
2751 FR30_INSN_CALLR
, "callr", "call",
2752 { { MNEM
, ' ', '@', OP (RI
), 0 } },
2753 & fmt_callr
, { 0x9710 },
2754 (PTR
) & fmt_callr_ops
[0],
2755 { 0, 0|A(NOT_IN_DELAY_SLOT
)|A(UNCOND_CTI
), { 0 } }
2760 FR30_INSN_CALLRD
, "callrd", "call:d",
2761 { { MNEM
, ' ', '@', OP (RI
), 0 } },
2762 & fmt_callr
, { 0x9f10 },
2763 (PTR
) & fmt_callr_ops
[0],
2764 { 0, 0|A(NOT_IN_DELAY_SLOT
)|A(DELAY_SLOT
)|A(UNCOND_CTI
), { 0 } }
2769 FR30_INSN_CALL
, "call", "call",
2770 { { MNEM
, ' ', OP (LABEL12
), 0 } },
2771 & fmt_call
, { 0xd000 },
2772 (PTR
) & fmt_call_ops
[0],
2773 { 0, 0|A(NOT_IN_DELAY_SLOT
)|A(UNCOND_CTI
), { 0 } }
2775 /* call:d $label12 */
2778 FR30_INSN_CALLD
, "calld", "call:d",
2779 { { MNEM
, ' ', OP (LABEL12
), 0 } },
2780 & fmt_call
, { 0xd800 },
2781 (PTR
) & fmt_call_ops
[0],
2782 { 0, 0|A(NOT_IN_DELAY_SLOT
)|A(DELAY_SLOT
)|A(UNCOND_CTI
), { 0 } }
2787 FR30_INSN_RET
, "ret", "ret",
2789 & fmt_ret
, { 0x9720 },
2790 (PTR
) & fmt_ret_ops
[0],
2791 { 0, 0|A(NOT_IN_DELAY_SLOT
)|A(UNCOND_CTI
), { 0 } }
2796 FR30_INSN_RET_D
, "ret:d", "ret:d",
2798 & fmt_ret
, { 0x9f20 },
2799 (PTR
) & fmt_ret_ops
[0],
2800 { 0, 0|A(NOT_IN_DELAY_SLOT
)|A(DELAY_SLOT
)|A(UNCOND_CTI
), { 0 } }
2805 FR30_INSN_INT
, "int", "int",
2806 { { MNEM
, ' ', OP (U8
), 0 } },
2807 & fmt_int
, { 0x1f00 },
2808 (PTR
) & fmt_int_ops
[0],
2809 { 0, 0|A(NOT_IN_DELAY_SLOT
)|A(UNCOND_CTI
), { 0 } }
2814 FR30_INSN_INTE
, "inte", "inte",
2816 & fmt_inte
, { 0x9f30 },
2817 (PTR
) & fmt_inte_ops
[0],
2818 { 0, 0|A(NOT_IN_DELAY_SLOT
)|A(UNCOND_CTI
), { 0 } }
2823 FR30_INSN_RETI
, "reti", "reti",
2825 & fmt_reti
, { 0x9730 },
2826 (PTR
) & fmt_reti_ops
[0],
2827 { 0, 0|A(NOT_IN_DELAY_SLOT
)|A(COND_CTI
)|A(COND_CTI
), { 0 } }
2832 FR30_INSN_BRAD
, "brad", "bra:d",
2833 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2834 & fmt_brad
, { 0xf000 },
2835 (PTR
) & fmt_brad_ops
[0],
2836 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
2841 FR30_INSN_BRA
, "bra", "bra",
2842 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2843 & fmt_brad
, { 0xe000 },
2844 (PTR
) & fmt_brad_ops
[0],
2845 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
2850 FR30_INSN_BNOD
, "bnod", "bno:d",
2851 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2852 & fmt_brad
, { 0xf100 },
2853 (PTR
) & fmt_brad_ops
[0],
2854 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
2859 FR30_INSN_BNO
, "bno", "bno",
2860 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2861 & fmt_brad
, { 0xe100 },
2862 (PTR
) & fmt_brad_ops
[0],
2863 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
2868 FR30_INSN_BEQD
, "beqd", "beq:d",
2869 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2870 & fmt_beqd
, { 0xf200 },
2871 (PTR
) & fmt_beqd_ops
[0],
2872 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
2877 FR30_INSN_BEQ
, "beq", "beq",
2878 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2879 & fmt_beqd
, { 0xe200 },
2880 (PTR
) & fmt_beqd_ops
[0],
2881 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
2886 FR30_INSN_BNED
, "bned", "bne:d",
2887 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2888 & fmt_beqd
, { 0xf300 },
2889 (PTR
) & fmt_beqd_ops
[0],
2890 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
2895 FR30_INSN_BNE
, "bne", "bne",
2896 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2897 & fmt_beqd
, { 0xe300 },
2898 (PTR
) & fmt_beqd_ops
[0],
2899 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
2904 FR30_INSN_BCD
, "bcd", "bc:d",
2905 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2906 & fmt_bcd
, { 0xf400 },
2907 (PTR
) & fmt_bcd_ops
[0],
2908 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
2913 FR30_INSN_BC
, "bc", "bc",
2914 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2915 & fmt_bcd
, { 0xe400 },
2916 (PTR
) & fmt_bcd_ops
[0],
2917 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
2922 FR30_INSN_BNCD
, "bncd", "bnc:d",
2923 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2924 & fmt_bcd
, { 0xf500 },
2925 (PTR
) & fmt_bcd_ops
[0],
2926 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
2931 FR30_INSN_BNC
, "bnc", "bnc",
2932 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2933 & fmt_bcd
, { 0xe500 },
2934 (PTR
) & fmt_bcd_ops
[0],
2935 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
2940 FR30_INSN_BND
, "bnd", "bn:d",
2941 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2942 & fmt_bnd
, { 0xf600 },
2943 (PTR
) & fmt_bnd_ops
[0],
2944 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
2949 FR30_INSN_BN
, "bn", "bn",
2950 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2951 & fmt_bnd
, { 0xe600 },
2952 (PTR
) & fmt_bnd_ops
[0],
2953 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
2958 FR30_INSN_BPD
, "bpd", "bp:d",
2959 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2960 & fmt_bnd
, { 0xf700 },
2961 (PTR
) & fmt_bnd_ops
[0],
2962 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
2967 FR30_INSN_BP
, "bp", "bp",
2968 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2969 & fmt_bnd
, { 0xe700 },
2970 (PTR
) & fmt_bnd_ops
[0],
2971 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
2976 FR30_INSN_BVD
, "bvd", "bv:d",
2977 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2978 & fmt_bvd
, { 0xf800 },
2979 (PTR
) & fmt_bvd_ops
[0],
2980 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
2985 FR30_INSN_BV
, "bv", "bv",
2986 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2987 & fmt_bvd
, { 0xe800 },
2988 (PTR
) & fmt_bvd_ops
[0],
2989 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
2994 FR30_INSN_BNVD
, "bnvd", "bnv:d",
2995 { { MNEM
, ' ', OP (LABEL9
), 0 } },
2996 & fmt_bvd
, { 0xf900 },
2997 (PTR
) & fmt_bvd_ops
[0],
2998 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
3003 FR30_INSN_BNV
, "bnv", "bnv",
3004 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3005 & fmt_bvd
, { 0xe900 },
3006 (PTR
) & fmt_bvd_ops
[0],
3007 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
3012 FR30_INSN_BLTD
, "bltd", "blt:d",
3013 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3014 & fmt_bltd
, { 0xfa00 },
3015 (PTR
) & fmt_bltd_ops
[0],
3016 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
3021 FR30_INSN_BLT
, "blt", "blt",
3022 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3023 & fmt_bltd
, { 0xea00 },
3024 (PTR
) & fmt_bltd_ops
[0],
3025 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
3030 FR30_INSN_BGED
, "bged", "bge:d",
3031 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3032 & fmt_bltd
, { 0xfb00 },
3033 (PTR
) & fmt_bltd_ops
[0],
3034 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
3039 FR30_INSN_BGE
, "bge", "bge",
3040 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3041 & fmt_bltd
, { 0xeb00 },
3042 (PTR
) & fmt_bltd_ops
[0],
3043 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
3048 FR30_INSN_BLED
, "bled", "ble:d",
3049 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3050 & fmt_bled
, { 0xfc00 },
3051 (PTR
) & fmt_bled_ops
[0],
3052 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
3057 FR30_INSN_BLE
, "ble", "ble",
3058 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3059 & fmt_bled
, { 0xec00 },
3060 (PTR
) & fmt_bled_ops
[0],
3061 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
3066 FR30_INSN_BGTD
, "bgtd", "bgt:d",
3067 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3068 & fmt_bled
, { 0xfd00 },
3069 (PTR
) & fmt_bled_ops
[0],
3070 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
3075 FR30_INSN_BGT
, "bgt", "bgt",
3076 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3077 & fmt_bled
, { 0xed00 },
3078 (PTR
) & fmt_bled_ops
[0],
3079 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
3084 FR30_INSN_BLSD
, "blsd", "bls:d",
3085 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3086 & fmt_blsd
, { 0xfe00 },
3087 (PTR
) & fmt_blsd_ops
[0],
3088 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
3093 FR30_INSN_BLS
, "bls", "bls",
3094 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3095 & fmt_blsd
, { 0xee00 },
3096 (PTR
) & fmt_blsd_ops
[0],
3097 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
3102 FR30_INSN_BHID
, "bhid", "bhi:d",
3103 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3104 & fmt_blsd
, { 0xff00 },
3105 (PTR
) & fmt_blsd_ops
[0],
3106 { 0, 0|A(COND_CTI
)|A(DELAY_SLOT
)|A(COND_CTI
), { 0 } }
3111 FR30_INSN_BHI
, "bhi", "bhi",
3112 { { MNEM
, ' ', OP (LABEL9
), 0 } },
3113 & fmt_blsd
, { 0xef00 },
3114 (PTR
) & fmt_blsd_ops
[0],
3115 { 0, 0|A(COND_CTI
)|A(COND_CTI
), { 0 } }
3117 /* dmov $R13,@$dir10 */
3120 FR30_INSN_DMOVR13
, "dmovr13", "dmov",
3121 { { MNEM
, ' ', OP (R13
), ',', '@', OP (DIR10
), 0 } },
3122 & fmt_dmovr13
, { 0x1800 },
3123 (PTR
) & fmt_dmovr13_ops
[0],
3126 /* dmovh $R13,@$dir9 */
3129 FR30_INSN_DMOVR13H
, "dmovr13h", "dmovh",
3130 { { MNEM
, ' ', OP (R13
), ',', '@', OP (DIR9
), 0 } },
3131 & fmt_dmovr13h
, { 0x1900 },
3132 (PTR
) & fmt_dmovr13h_ops
[0],
3135 /* dmovb $R13,@$dir8 */
3138 FR30_INSN_DMOVR13B
, "dmovr13b", "dmovb",
3139 { { MNEM
, ' ', OP (R13
), ',', '@', OP (DIR8
), 0 } },
3140 & fmt_dmovr13b
, { 0x1a00 },
3141 (PTR
) & fmt_dmovr13b_ops
[0],
3144 /* dmov @$R13+,@$dir10 */
3147 FR30_INSN_DMOVR13PI
, "dmovr13pi", "dmov",
3148 { { MNEM
, ' ', '@', OP (R13
), '+', ',', '@', OP (DIR10
), 0 } },
3149 & fmt_dmovr13pi
, { 0x1c00 },
3150 (PTR
) & fmt_dmovr13pi_ops
[0],
3151 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3153 /* dmovh @$R13+,@$dir9 */
3156 FR30_INSN_DMOVR13PIH
, "dmovr13pih", "dmovh",
3157 { { MNEM
, ' ', '@', OP (R13
), '+', ',', '@', OP (DIR9
), 0 } },
3158 & fmt_dmovr13pih
, { 0x1d00 },
3159 (PTR
) & fmt_dmovr13pih_ops
[0],
3160 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3162 /* dmovb @$R13+,@$dir8 */
3165 FR30_INSN_DMOVR13PIB
, "dmovr13pib", "dmovb",
3166 { { MNEM
, ' ', '@', OP (R13
), '+', ',', '@', OP (DIR8
), 0 } },
3167 & fmt_dmovr13pib
, { 0x1e00 },
3168 (PTR
) & fmt_dmovr13pib_ops
[0],
3169 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3171 /* dmov @$R15+,@$dir10 */
3174 FR30_INSN_DMOVR15PI
, "dmovr15pi", "dmov",
3175 { { MNEM
, ' ', '@', OP (R15
), '+', ',', '@', OP (DIR10
), 0 } },
3176 & fmt_dmovr15pi
, { 0x1b00 },
3177 (PTR
) & fmt_dmovr15pi_ops
[0],
3178 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3180 /* dmov @$dir10,$R13 */
3183 FR30_INSN_DMOV2R13
, "dmov2r13", "dmov",
3184 { { MNEM
, ' ', '@', OP (DIR10
), ',', OP (R13
), 0 } },
3185 & fmt_dmov2r13
, { 0x800 },
3186 (PTR
) & fmt_dmov2r13_ops
[0],
3189 /* dmovh @$dir9,$R13 */
3192 FR30_INSN_DMOV2R13H
, "dmov2r13h", "dmovh",
3193 { { MNEM
, ' ', '@', OP (DIR9
), ',', OP (R13
), 0 } },
3194 & fmt_dmov2r13h
, { 0x900 },
3195 (PTR
) & fmt_dmov2r13h_ops
[0],
3198 /* dmovb @$dir8,$R13 */
3201 FR30_INSN_DMOV2R13B
, "dmov2r13b", "dmovb",
3202 { { MNEM
, ' ', '@', OP (DIR8
), ',', OP (R13
), 0 } },
3203 & fmt_dmov2r13b
, { 0xa00 },
3204 (PTR
) & fmt_dmov2r13b_ops
[0],
3207 /* dmov @$dir10,@$R13+ */
3210 FR30_INSN_DMOV2R13PI
, "dmov2r13pi", "dmov",
3211 { { MNEM
, ' ', '@', OP (DIR10
), ',', '@', OP (R13
), '+', 0 } },
3212 & fmt_dmov2r13pi
, { 0xc00 },
3213 (PTR
) & fmt_dmov2r13pi_ops
[0],
3214 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3216 /* dmovh @$dir9,@$R13+ */
3219 FR30_INSN_DMOV2R13PIH
, "dmov2r13pih", "dmovh",
3220 { { MNEM
, ' ', '@', OP (DIR9
), ',', '@', OP (R13
), '+', 0 } },
3221 & fmt_dmov2r13pih
, { 0xd00 },
3222 (PTR
) & fmt_dmov2r13pih_ops
[0],
3223 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3225 /* dmovb @$dir8,@$R13+ */
3228 FR30_INSN_DMOV2R13PIB
, "dmov2r13pib", "dmovb",
3229 { { MNEM
, ' ', '@', OP (DIR8
), ',', '@', OP (R13
), '+', 0 } },
3230 & fmt_dmov2r13pib
, { 0xe00 },
3231 (PTR
) & fmt_dmov2r13pib_ops
[0],
3232 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3234 /* dmov @$dir10,@-$R15 */
3237 FR30_INSN_DMOV2R15PD
, "dmov2r15pd", "dmov",
3238 { { MNEM
, ' ', '@', OP (DIR10
), ',', '@', '-', OP (R15
), 0 } },
3239 & fmt_dmov2r15pd
, { 0xb00 },
3240 (PTR
) & fmt_dmov2r15pd_ops
[0],
3241 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3243 /* ldres @$Ri+,$u4 */
3246 FR30_INSN_LDRES
, "ldres", "ldres",
3247 { { MNEM
, ' ', '@', OP (RI
), '+', ',', OP (U4
), 0 } },
3248 & fmt_ldres
, { 0xbc00 },
3249 (PTR
) & fmt_ldres_ops
[0],
3252 /* stres $u4,@$Ri+ */
3255 FR30_INSN_STRES
, "stres", "stres",
3256 { { MNEM
, ' ', OP (U4
), ',', '@', OP (RI
), '+', 0 } },
3257 & fmt_ldres
, { 0xbd00 },
3258 (PTR
) & fmt_ldres_ops
[0],
3261 /* copop $u4c,$ccc,$CRj,$CRi */
3264 FR30_INSN_COPOP
, "copop", "copop",
3265 { { MNEM
, ' ', OP (U4C
), ',', OP (CCC
), ',', OP (CRJ
), ',', OP (CRI
), 0 } },
3266 & fmt_copop
, { 0x9fc0 },
3268 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3270 /* copld $u4c,$ccc,$Rjc,$CRi */
3273 FR30_INSN_COPLD
, "copld", "copld",
3274 { { MNEM
, ' ', OP (U4C
), ',', OP (CCC
), ',', OP (RJC
), ',', OP (CRI
), 0 } },
3275 & fmt_copld
, { 0x9fd0 },
3277 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3279 /* copst $u4c,$ccc,$CRj,$Ric */
3282 FR30_INSN_COPST
, "copst", "copst",
3283 { { MNEM
, ' ', OP (U4C
), ',', OP (CCC
), ',', OP (CRJ
), ',', OP (RIC
), 0 } },
3284 & fmt_copst
, { 0x9fe0 },
3286 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3288 /* copsv $u4c,$ccc,$CRj,$Ric */
3291 FR30_INSN_COPSV
, "copsv", "copsv",
3292 { { MNEM
, ' ', OP (U4C
), ',', OP (CCC
), ',', OP (CRJ
), ',', OP (RIC
), 0 } },
3293 & fmt_copst
, { 0x9ff0 },
3295 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3300 FR30_INSN_NOP
, "nop", "nop",
3302 & fmt_nop
, { 0x9fa0 },
3309 FR30_INSN_ANDCCR
, "andccr", "andccr",
3310 { { MNEM
, ' ', OP (U8
), 0 } },
3311 & fmt_andccr
, { 0x8300 },
3312 (PTR
) & fmt_andccr_ops
[0],
3318 FR30_INSN_ORCCR
, "orccr", "orccr",
3319 { { MNEM
, ' ', OP (U8
), 0 } },
3320 & fmt_andccr
, { 0x9300 },
3321 (PTR
) & fmt_andccr_ops
[0],
3327 FR30_INSN_STILM
, "stilm", "stilm",
3328 { { MNEM
, ' ', OP (U8
), 0 } },
3329 & fmt_stilm
, { 0x8700 },
3330 (PTR
) & fmt_stilm_ops
[0],
3336 FR30_INSN_ADDSP
, "addsp", "addsp",
3337 { { MNEM
, ' ', OP (S10
), 0 } },
3338 & fmt_addsp
, { 0xa300 },
3339 (PTR
) & fmt_addsp_ops
[0],
3345 FR30_INSN_EXTSB
, "extsb", "extsb",
3346 { { MNEM
, ' ', OP (RI
), 0 } },
3347 & fmt_extsb
, { 0x9780 },
3348 (PTR
) & fmt_extsb_ops
[0],
3354 FR30_INSN_EXTUB
, "extub", "extub",
3355 { { MNEM
, ' ', OP (RI
), 0 } },
3356 & fmt_extub
, { 0x9790 },
3357 (PTR
) & fmt_extub_ops
[0],
3363 FR30_INSN_EXTSH
, "extsh", "extsh",
3364 { { MNEM
, ' ', OP (RI
), 0 } },
3365 & fmt_extsh
, { 0x97a0 },
3366 (PTR
) & fmt_extsh_ops
[0],
3372 FR30_INSN_EXTUH
, "extuh", "extuh",
3373 { { MNEM
, ' ', OP (RI
), 0 } },
3374 & fmt_extuh
, { 0x97b0 },
3375 (PTR
) & fmt_extuh_ops
[0],
3378 /* ldm0 ($reglist_low_ld) */
3381 FR30_INSN_LDM0
, "ldm0", "ldm0",
3382 { { MNEM
, ' ', '(', OP (REGLIST_LOW_LD
), ')', 0 } },
3383 & fmt_ldm0
, { 0x8c00 },
3384 (PTR
) & fmt_ldm0_ops
[0],
3385 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3387 /* ldm1 ($reglist_hi_ld) */
3390 FR30_INSN_LDM1
, "ldm1", "ldm1",
3391 { { MNEM
, ' ', '(', OP (REGLIST_HI_LD
), ')', 0 } },
3392 & fmt_ldm1
, { 0x8d00 },
3393 (PTR
) & fmt_ldm1_ops
[0],
3394 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3396 /* stm0 ($reglist_low_st) */
3399 FR30_INSN_STM0
, "stm0", "stm0",
3400 { { MNEM
, ' ', '(', OP (REGLIST_LOW_ST
), ')', 0 } },
3401 & fmt_stm0
, { 0x8e00 },
3402 (PTR
) & fmt_stm0_ops
[0],
3403 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3405 /* stm1 ($reglist_hi_st) */
3408 FR30_INSN_STM1
, "stm1", "stm1",
3409 { { MNEM
, ' ', '(', OP (REGLIST_HI_ST
), ')', 0 } },
3410 & fmt_stm1
, { 0x8f00 },
3411 (PTR
) & fmt_stm1_ops
[0],
3412 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3417 FR30_INSN_ENTER
, "enter", "enter",
3418 { { MNEM
, ' ', OP (U10
), 0 } },
3419 & fmt_enter
, { 0xf00 },
3420 (PTR
) & fmt_enter_ops
[0],
3421 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3426 FR30_INSN_LEAVE
, "leave", "leave",
3428 & fmt_leave
, { 0x9f90 },
3429 (PTR
) & fmt_leave_ops
[0],
3435 FR30_INSN_XCHB
, "xchb", "xchb",
3436 { { MNEM
, ' ', '@', OP (RJ
), ',', OP (RI
), 0 } },
3437 & fmt_xchb
, { 0x8a00 },
3438 (PTR
) & fmt_xchb_ops
[0],
3439 { 0, 0|A(NOT_IN_DELAY_SLOT
), { 0 } }
3447 static const CGEN_INSN_TABLE insn_table
=
3449 & fr30_cgen_insn_table_entries
[0],
3455 /* Formats for ALIAS macro-insns. */
3457 #define F(f) & fr30_cgen_ifld_table[CONCAT2 (FR30_,f)]
3459 static const CGEN_IFMT fmt_ldi8m
= {
3460 16, 16, 0xf000, { F (F_OP1
), F (F_I8
), F (F_RI
), 0 }
3463 static const CGEN_IFMT fmt_ldi20m
= {
3464 16, 32, 0xff00, { F (F_OP1
), F (F_I20
), F (F_OP2
), F (F_RI
), 0 }
3467 static const CGEN_IFMT fmt_ldi32m
= {
3468 16, 48, 0xfff0, { F (F_OP1
), F (F_I32
), F (F_OP2
), F (F_OP3
), F (F_RI
), 0 }
3473 /* Each non-simple macro entry points to an array of expansion possibilities. */
3475 #define A(a) (1 << CONCAT2 (CGEN_INSN_,a))
3476 #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
3477 #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
3479 /* The macro instruction table. */
3481 static const CGEN_INSN macro_insn_table_entries
[] =
3486 -1, "ldi8m", "ldi8",
3487 { { MNEM
, ' ', OP (I8
), ',', OP (RI
), 0 } },
3488 & fmt_ldi8m
, { 0xc000 },
3490 { 0, 0|A(NO_DIS
)|A(ALIAS
), { 0 } }
3492 /* ldi20 $i20,$Ri */
3495 -1, "ldi20m", "ldi20",
3496 { { MNEM
, ' ', OP (I20
), ',', OP (RI
), 0 } },
3497 & fmt_ldi20m
, { 0x9b00 },
3499 { 0, 0|A(NO_DIS
)|A(ALIAS
), { 0 } }
3501 /* ldi32 $i32,$Ri */
3504 -1, "ldi32m", "ldi32",
3505 { { MNEM
, ' ', OP (I32
), ',', OP (RI
), 0 } },
3506 & fmt_ldi32m
, { 0x9f80 },
3508 { 0, 0|A(NO_DIS
)|A(ALIAS
), { 0 } }
3516 static const CGEN_INSN_TABLE macro_insn_table
=
3518 & macro_insn_table_entries
[0],
3520 (sizeof (macro_insn_table_entries
) /
3521 sizeof (macro_insn_table_entries
[0])),
3530 /* Return non-zero if INSN is to be added to the hash table.
3531 Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file. */
3534 asm_hash_insn_p (insn
)
3535 const CGEN_INSN
* insn
;
3537 return CGEN_ASM_HASH_P (insn
);
3541 dis_hash_insn_p (insn
)
3542 const CGEN_INSN
* insn
;
3544 /* If building the hash table and the NO-DIS attribute is present,
3546 if (CGEN_INSN_ATTR (insn
, CGEN_INSN_NO_DIS
))
3548 return CGEN_DIS_HASH_P (insn
);
3551 /* The result is the hash value of the insn.
3552 Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file. */
3555 asm_hash_insn (mnem
)
3558 return CGEN_ASM_HASH (mnem
);
3561 /* BUF is a pointer to the insn's bytes in target order.
3562 VALUE is an integer of the first CGEN_BASE_INSN_BITSIZE bits,
3566 dis_hash_insn (buf
, value
)
3568 CGEN_INSN_INT value
;
3570 return CGEN_DIS_HASH (buf
, value
);
3573 /* Initialize an opcode table and return a descriptor.
3574 It's much like opening a file, and must be the first function called. */
3577 fr30_cgen_opcode_open (mach
, endian
)
3579 enum cgen_endian endian
;
3581 CGEN_OPCODE_TABLE
* table
= (CGEN_OPCODE_TABLE
*) xmalloc (sizeof (CGEN_OPCODE_TABLE
));
3590 memset (table
, 0, sizeof (*table
));
3592 CGEN_OPCODE_MACH (table
) = mach
;
3593 CGEN_OPCODE_ENDIAN (table
) = endian
;
3594 /* FIXME: for the sparc case we can determine insn-endianness statically.
3595 The worry here is where both data and insn endian can be independently
3596 chosen, in which case this function will need another argument.
3597 Actually, will want to allow for more arguments in the future anyway. */
3598 CGEN_OPCODE_INSN_ENDIAN (table
) = endian
;
3600 CGEN_OPCODE_HW_LIST (table
) = & fr30_cgen_hw_entries
[0];
3602 CGEN_OPCODE_IFLD_TABLE (table
) = & fr30_cgen_ifld_table
[0];
3604 CGEN_OPCODE_OPERAND_TABLE (table
) = & fr30_cgen_operand_table
[0];
3606 * CGEN_OPCODE_INSN_TABLE (table
) = insn_table
;
3608 * CGEN_OPCODE_MACRO_INSN_TABLE (table
) = macro_insn_table
;
3610 CGEN_OPCODE_ASM_HASH_P (table
) = asm_hash_insn_p
;
3611 CGEN_OPCODE_ASM_HASH (table
) = asm_hash_insn
;
3612 CGEN_OPCODE_ASM_HASH_SIZE (table
) = CGEN_ASM_HASH_SIZE
;
3614 CGEN_OPCODE_DIS_HASH_P (table
) = dis_hash_insn_p
;
3615 CGEN_OPCODE_DIS_HASH (table
) = dis_hash_insn
;
3616 CGEN_OPCODE_DIS_HASH_SIZE (table
) = CGEN_DIS_HASH_SIZE
;
3618 return (CGEN_OPCODE_DESC
) table
;
3621 /* Close an opcode table. */
3624 fr30_cgen_opcode_close (desc
)
3625 CGEN_OPCODE_DESC desc
;
3630 /* Getting values from cgen_fields is handled by a collection of functions.
3631 They are distinguished by the type of the VALUE argument they return.
3632 TODO: floating point, inlining support, remove cases where result type
3636 fr30_cgen_get_int_operand (opindex
, fields
)
3638 const CGEN_FIELDS
* fields
;
3644 case FR30_OPERAND_RI
:
3645 value
= fields
->f_Ri
;
3647 case FR30_OPERAND_RJ
:
3648 value
= fields
->f_Rj
;
3650 case FR30_OPERAND_RIC
:
3651 value
= fields
->f_Ric
;
3653 case FR30_OPERAND_RJC
:
3654 value
= fields
->f_Rjc
;
3656 case FR30_OPERAND_CRI
:
3657 value
= fields
->f_CRi
;
3659 case FR30_OPERAND_CRJ
:
3660 value
= fields
->f_CRj
;
3662 case FR30_OPERAND_RS1
:
3663 value
= fields
->f_Rs1
;
3665 case FR30_OPERAND_RS2
:
3666 value
= fields
->f_Rs2
;
3668 case FR30_OPERAND_R13
:
3669 value
= fields
->f_nil
;
3671 case FR30_OPERAND_R14
:
3672 value
= fields
->f_nil
;
3674 case FR30_OPERAND_R15
:
3675 value
= fields
->f_nil
;
3677 case FR30_OPERAND_PS
:
3678 value
= fields
->f_nil
;
3680 case FR30_OPERAND_U4
:
3681 value
= fields
->f_u4
;
3683 case FR30_OPERAND_U4C
:
3684 value
= fields
->f_u4c
;
3686 case FR30_OPERAND_U8
:
3687 value
= fields
->f_u8
;
3689 case FR30_OPERAND_I8
:
3690 value
= fields
->f_i8
;
3692 case FR30_OPERAND_UDISP6
:
3693 value
= fields
->f_udisp6
;
3695 case FR30_OPERAND_DISP8
:
3696 value
= fields
->f_disp8
;
3698 case FR30_OPERAND_DISP9
:
3699 value
= fields
->f_disp9
;
3701 case FR30_OPERAND_DISP10
:
3702 value
= fields
->f_disp10
;
3704 case FR30_OPERAND_S10
:
3705 value
= fields
->f_s10
;
3707 case FR30_OPERAND_U10
:
3708 value
= fields
->f_u10
;
3710 case FR30_OPERAND_I32
:
3711 value
= fields
->f_i32
;
3713 case FR30_OPERAND_M4
:
3714 value
= fields
->f_m4
;
3716 case FR30_OPERAND_I20
:
3717 value
= fields
->f_i20
;
3719 case FR30_OPERAND_DIR8
:
3720 value
= fields
->f_dir8
;
3722 case FR30_OPERAND_DIR9
:
3723 value
= fields
->f_dir9
;
3725 case FR30_OPERAND_DIR10
:
3726 value
= fields
->f_dir10
;
3728 case FR30_OPERAND_LABEL9
:
3729 value
= fields
->f_rel9
;
3731 case FR30_OPERAND_LABEL12
:
3732 value
= fields
->f_rel12
;
3734 case FR30_OPERAND_REGLIST_LOW_LD
:
3735 value
= fields
->f_reglist_low_ld
;
3737 case FR30_OPERAND_REGLIST_HI_LD
:
3738 value
= fields
->f_reglist_hi_ld
;
3740 case FR30_OPERAND_REGLIST_LOW_ST
:
3741 value
= fields
->f_reglist_low_st
;
3743 case FR30_OPERAND_REGLIST_HI_ST
:
3744 value
= fields
->f_reglist_hi_st
;
3746 case FR30_OPERAND_CC
:
3747 value
= fields
->f_cc
;
3749 case FR30_OPERAND_CCC
:
3750 value
= fields
->f_ccc
;
3754 /* xgettext:c-format */
3755 fprintf (stderr
, _("Unrecognized field %d while getting int operand.\n"),
3764 fr30_cgen_get_vma_operand (opindex
, fields
)
3766 const CGEN_FIELDS
* fields
;
3772 case FR30_OPERAND_RI
:
3773 value
= fields
->f_Ri
;
3775 case FR30_OPERAND_RJ
:
3776 value
= fields
->f_Rj
;
3778 case FR30_OPERAND_RIC
:
3779 value
= fields
->f_Ric
;
3781 case FR30_OPERAND_RJC
:
3782 value
= fields
->f_Rjc
;
3784 case FR30_OPERAND_CRI
:
3785 value
= fields
->f_CRi
;
3787 case FR30_OPERAND_CRJ
:
3788 value
= fields
->f_CRj
;
3790 case FR30_OPERAND_RS1
:
3791 value
= fields
->f_Rs1
;
3793 case FR30_OPERAND_RS2
:
3794 value
= fields
->f_Rs2
;
3796 case FR30_OPERAND_R13
:
3797 value
= fields
->f_nil
;
3799 case FR30_OPERAND_R14
:
3800 value
= fields
->f_nil
;
3802 case FR30_OPERAND_R15
:
3803 value
= fields
->f_nil
;
3805 case FR30_OPERAND_PS
:
3806 value
= fields
->f_nil
;
3808 case FR30_OPERAND_U4
:
3809 value
= fields
->f_u4
;
3811 case FR30_OPERAND_U4C
:
3812 value
= fields
->f_u4c
;
3814 case FR30_OPERAND_U8
:
3815 value
= fields
->f_u8
;
3817 case FR30_OPERAND_I8
:
3818 value
= fields
->f_i8
;
3820 case FR30_OPERAND_UDISP6
:
3821 value
= fields
->f_udisp6
;
3823 case FR30_OPERAND_DISP8
:
3824 value
= fields
->f_disp8
;
3826 case FR30_OPERAND_DISP9
:
3827 value
= fields
->f_disp9
;
3829 case FR30_OPERAND_DISP10
:
3830 value
= fields
->f_disp10
;
3832 case FR30_OPERAND_S10
:
3833 value
= fields
->f_s10
;
3835 case FR30_OPERAND_U10
:
3836 value
= fields
->f_u10
;
3838 case FR30_OPERAND_I32
:
3839 value
= fields
->f_i32
;
3841 case FR30_OPERAND_M4
:
3842 value
= fields
->f_m4
;
3844 case FR30_OPERAND_I20
:
3845 value
= fields
->f_i20
;
3847 case FR30_OPERAND_DIR8
:
3848 value
= fields
->f_dir8
;
3850 case FR30_OPERAND_DIR9
:
3851 value
= fields
->f_dir9
;
3853 case FR30_OPERAND_DIR10
:
3854 value
= fields
->f_dir10
;
3856 case FR30_OPERAND_LABEL9
:
3857 value
= fields
->f_rel9
;
3859 case FR30_OPERAND_LABEL12
:
3860 value
= fields
->f_rel12
;
3862 case FR30_OPERAND_REGLIST_LOW_LD
:
3863 value
= fields
->f_reglist_low_ld
;
3865 case FR30_OPERAND_REGLIST_HI_LD
:
3866 value
= fields
->f_reglist_hi_ld
;
3868 case FR30_OPERAND_REGLIST_LOW_ST
:
3869 value
= fields
->f_reglist_low_st
;
3871 case FR30_OPERAND_REGLIST_HI_ST
:
3872 value
= fields
->f_reglist_hi_st
;
3874 case FR30_OPERAND_CC
:
3875 value
= fields
->f_cc
;
3877 case FR30_OPERAND_CCC
:
3878 value
= fields
->f_ccc
;
3882 /* xgettext:c-format */
3883 fprintf (stderr
, _("Unrecognized field %d while getting vma operand.\n"),
3891 /* Stuffing values in cgen_fields is handled by a collection of functions.
3892 They are distinguished by the type of the VALUE argument they accept.
3893 TODO: floating point, inlining support, remove cases where argument type
3897 fr30_cgen_set_int_operand (opindex
, fields
, value
)
3899 CGEN_FIELDS
* fields
;
3904 case FR30_OPERAND_RI
:
3905 fields
->f_Ri
= value
;
3907 case FR30_OPERAND_RJ
:
3908 fields
->f_Rj
= value
;
3910 case FR30_OPERAND_RIC
:
3911 fields
->f_Ric
= value
;
3913 case FR30_OPERAND_RJC
:
3914 fields
->f_Rjc
= value
;
3916 case FR30_OPERAND_CRI
:
3917 fields
->f_CRi
= value
;
3919 case FR30_OPERAND_CRJ
:
3920 fields
->f_CRj
= value
;
3922 case FR30_OPERAND_RS1
:
3923 fields
->f_Rs1
= value
;
3925 case FR30_OPERAND_RS2
:
3926 fields
->f_Rs2
= value
;
3928 case FR30_OPERAND_R13
:
3929 fields
->f_nil
= value
;
3931 case FR30_OPERAND_R14
:
3932 fields
->f_nil
= value
;
3934 case FR30_OPERAND_R15
:
3935 fields
->f_nil
= value
;
3937 case FR30_OPERAND_PS
:
3938 fields
->f_nil
= value
;
3940 case FR30_OPERAND_U4
:
3941 fields
->f_u4
= value
;
3943 case FR30_OPERAND_U4C
:
3944 fields
->f_u4c
= value
;
3946 case FR30_OPERAND_U8
:
3947 fields
->f_u8
= value
;
3949 case FR30_OPERAND_I8
:
3950 fields
->f_i8
= value
;
3952 case FR30_OPERAND_UDISP6
:
3953 fields
->f_udisp6
= value
;
3955 case FR30_OPERAND_DISP8
:
3956 fields
->f_disp8
= value
;
3958 case FR30_OPERAND_DISP9
:
3959 fields
->f_disp9
= value
;
3961 case FR30_OPERAND_DISP10
:
3962 fields
->f_disp10
= value
;
3964 case FR30_OPERAND_S10
:
3965 fields
->f_s10
= value
;
3967 case FR30_OPERAND_U10
:
3968 fields
->f_u10
= value
;
3970 case FR30_OPERAND_I32
:
3971 fields
->f_i32
= value
;
3973 case FR30_OPERAND_M4
:
3974 fields
->f_m4
= value
;
3976 case FR30_OPERAND_I20
:
3977 fields
->f_i20
= value
;
3979 case FR30_OPERAND_DIR8
:
3980 fields
->f_dir8
= value
;
3982 case FR30_OPERAND_DIR9
:
3983 fields
->f_dir9
= value
;
3985 case FR30_OPERAND_DIR10
:
3986 fields
->f_dir10
= value
;
3988 case FR30_OPERAND_LABEL9
:
3989 fields
->f_rel9
= value
;
3991 case FR30_OPERAND_LABEL12
:
3992 fields
->f_rel12
= value
;
3994 case FR30_OPERAND_REGLIST_LOW_LD
:
3995 fields
->f_reglist_low_ld
= value
;
3997 case FR30_OPERAND_REGLIST_HI_LD
:
3998 fields
->f_reglist_hi_ld
= value
;
4000 case FR30_OPERAND_REGLIST_LOW_ST
:
4001 fields
->f_reglist_low_st
= value
;
4003 case FR30_OPERAND_REGLIST_HI_ST
:
4004 fields
->f_reglist_hi_st
= value
;
4006 case FR30_OPERAND_CC
:
4007 fields
->f_cc
= value
;
4009 case FR30_OPERAND_CCC
:
4010 fields
->f_ccc
= value
;
4014 /* xgettext:c-format */
4015 fprintf (stderr
, _("Unrecognized field %d while setting int operand.\n"),
4022 fr30_cgen_set_vma_operand (opindex
, fields
, value
)
4024 CGEN_FIELDS
* fields
;
4029 case FR30_OPERAND_RI
:
4030 fields
->f_Ri
= value
;
4032 case FR30_OPERAND_RJ
:
4033 fields
->f_Rj
= value
;
4035 case FR30_OPERAND_RIC
:
4036 fields
->f_Ric
= value
;
4038 case FR30_OPERAND_RJC
:
4039 fields
->f_Rjc
= value
;
4041 case FR30_OPERAND_CRI
:
4042 fields
->f_CRi
= value
;
4044 case FR30_OPERAND_CRJ
:
4045 fields
->f_CRj
= value
;
4047 case FR30_OPERAND_RS1
:
4048 fields
->f_Rs1
= value
;
4050 case FR30_OPERAND_RS2
:
4051 fields
->f_Rs2
= value
;
4053 case FR30_OPERAND_R13
:
4054 fields
->f_nil
= value
;
4056 case FR30_OPERAND_R14
:
4057 fields
->f_nil
= value
;
4059 case FR30_OPERAND_R15
:
4060 fields
->f_nil
= value
;
4062 case FR30_OPERAND_PS
:
4063 fields
->f_nil
= value
;
4065 case FR30_OPERAND_U4
:
4066 fields
->f_u4
= value
;
4068 case FR30_OPERAND_U4C
:
4069 fields
->f_u4c
= value
;
4071 case FR30_OPERAND_U8
:
4072 fields
->f_u8
= value
;
4074 case FR30_OPERAND_I8
:
4075 fields
->f_i8
= value
;
4077 case FR30_OPERAND_UDISP6
:
4078 fields
->f_udisp6
= value
;
4080 case FR30_OPERAND_DISP8
:
4081 fields
->f_disp8
= value
;
4083 case FR30_OPERAND_DISP9
:
4084 fields
->f_disp9
= value
;
4086 case FR30_OPERAND_DISP10
:
4087 fields
->f_disp10
= value
;
4089 case FR30_OPERAND_S10
:
4090 fields
->f_s10
= value
;
4092 case FR30_OPERAND_U10
:
4093 fields
->f_u10
= value
;
4095 case FR30_OPERAND_I32
:
4096 fields
->f_i32
= value
;
4098 case FR30_OPERAND_M4
:
4099 fields
->f_m4
= value
;
4101 case FR30_OPERAND_I20
:
4102 fields
->f_i20
= value
;
4104 case FR30_OPERAND_DIR8
:
4105 fields
->f_dir8
= value
;
4107 case FR30_OPERAND_DIR9
:
4108 fields
->f_dir9
= value
;
4110 case FR30_OPERAND_DIR10
:
4111 fields
->f_dir10
= value
;
4113 case FR30_OPERAND_LABEL9
:
4114 fields
->f_rel9
= value
;
4116 case FR30_OPERAND_LABEL12
:
4117 fields
->f_rel12
= value
;
4119 case FR30_OPERAND_REGLIST_LOW_LD
:
4120 fields
->f_reglist_low_ld
= value
;
4122 case FR30_OPERAND_REGLIST_HI_LD
:
4123 fields
->f_reglist_hi_ld
= value
;
4125 case FR30_OPERAND_REGLIST_LOW_ST
:
4126 fields
->f_reglist_low_st
= value
;
4128 case FR30_OPERAND_REGLIST_HI_ST
:
4129 fields
->f_reglist_hi_st
= value
;
4131 case FR30_OPERAND_CC
:
4132 fields
->f_cc
= value
;
4134 case FR30_OPERAND_CCC
:
4135 fields
->f_ccc
= value
;
4139 /* xgettext:c-format */
4140 fprintf (stderr
, _("Unrecognized field %d while setting vma operand.\n"),