1 /* Simulator instruction decoder for m32rbf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #define WANT_CPU m32rbf
26 #define WANT_CPU_M32RBF
29 #include "sim-assert.h"
31 /* The instruction descriptor array.
32 This is computed at runtime. Space for it is not malloc'd to save a
33 teensy bit of cpu in the decoder. Moving it to malloc space is trivial
34 but won't be done until necessary (we don't currently support the runtime
35 addition of instructions nor an SMP machine with different cpus). */
36 static IDESC m32rbf_insn_data
[M32RBF_INSN__MAX
];
38 /* Commas between elements are contained in the macros.
39 Some of these are conditionally compiled out. */
41 static const struct insn_sem m32rbf_insn_sem
[] =
43 { VIRTUAL_INSN_X_INVALID
, M32RBF_INSN_X_INVALID
, M32RBF_SFMT_EMPTY
},
44 { VIRTUAL_INSN_X_AFTER
, M32RBF_INSN_X_AFTER
, M32RBF_SFMT_EMPTY
},
45 { VIRTUAL_INSN_X_BEFORE
, M32RBF_INSN_X_BEFORE
, M32RBF_SFMT_EMPTY
},
46 { VIRTUAL_INSN_X_CTI_CHAIN
, M32RBF_INSN_X_CTI_CHAIN
, M32RBF_SFMT_EMPTY
},
47 { VIRTUAL_INSN_X_CHAIN
, M32RBF_INSN_X_CHAIN
, M32RBF_SFMT_EMPTY
},
48 { VIRTUAL_INSN_X_BEGIN
, M32RBF_INSN_X_BEGIN
, M32RBF_SFMT_EMPTY
},
49 { M32R_INSN_ADD
, M32RBF_INSN_ADD
, M32RBF_SFMT_ADD
},
50 { M32R_INSN_ADD3
, M32RBF_INSN_ADD3
, M32RBF_SFMT_ADD3
},
51 { M32R_INSN_AND
, M32RBF_INSN_AND
, M32RBF_SFMT_ADD
},
52 { M32R_INSN_AND3
, M32RBF_INSN_AND3
, M32RBF_SFMT_AND3
},
53 { M32R_INSN_OR
, M32RBF_INSN_OR
, M32RBF_SFMT_ADD
},
54 { M32R_INSN_OR3
, M32RBF_INSN_OR3
, M32RBF_SFMT_OR3
},
55 { M32R_INSN_XOR
, M32RBF_INSN_XOR
, M32RBF_SFMT_ADD
},
56 { M32R_INSN_XOR3
, M32RBF_INSN_XOR3
, M32RBF_SFMT_AND3
},
57 { M32R_INSN_ADDI
, M32RBF_INSN_ADDI
, M32RBF_SFMT_ADDI
},
58 { M32R_INSN_ADDV
, M32RBF_INSN_ADDV
, M32RBF_SFMT_ADDV
},
59 { M32R_INSN_ADDV3
, M32RBF_INSN_ADDV3
, M32RBF_SFMT_ADDV3
},
60 { M32R_INSN_ADDX
, M32RBF_INSN_ADDX
, M32RBF_SFMT_ADDX
},
61 { M32R_INSN_BC8
, M32RBF_INSN_BC8
, M32RBF_SFMT_BC8
},
62 { M32R_INSN_BC24
, M32RBF_INSN_BC24
, M32RBF_SFMT_BC24
},
63 { M32R_INSN_BEQ
, M32RBF_INSN_BEQ
, M32RBF_SFMT_BEQ
},
64 { M32R_INSN_BEQZ
, M32RBF_INSN_BEQZ
, M32RBF_SFMT_BEQZ
},
65 { M32R_INSN_BGEZ
, M32RBF_INSN_BGEZ
, M32RBF_SFMT_BEQZ
},
66 { M32R_INSN_BGTZ
, M32RBF_INSN_BGTZ
, M32RBF_SFMT_BEQZ
},
67 { M32R_INSN_BLEZ
, M32RBF_INSN_BLEZ
, M32RBF_SFMT_BEQZ
},
68 { M32R_INSN_BLTZ
, M32RBF_INSN_BLTZ
, M32RBF_SFMT_BEQZ
},
69 { M32R_INSN_BNEZ
, M32RBF_INSN_BNEZ
, M32RBF_SFMT_BEQZ
},
70 { M32R_INSN_BL8
, M32RBF_INSN_BL8
, M32RBF_SFMT_BL8
},
71 { M32R_INSN_BL24
, M32RBF_INSN_BL24
, M32RBF_SFMT_BL24
},
72 { M32R_INSN_BNC8
, M32RBF_INSN_BNC8
, M32RBF_SFMT_BC8
},
73 { M32R_INSN_BNC24
, M32RBF_INSN_BNC24
, M32RBF_SFMT_BC24
},
74 { M32R_INSN_BNE
, M32RBF_INSN_BNE
, M32RBF_SFMT_BEQ
},
75 { M32R_INSN_BRA8
, M32RBF_INSN_BRA8
, M32RBF_SFMT_BRA8
},
76 { M32R_INSN_BRA24
, M32RBF_INSN_BRA24
, M32RBF_SFMT_BRA24
},
77 { M32R_INSN_CMP
, M32RBF_INSN_CMP
, M32RBF_SFMT_CMP
},
78 { M32R_INSN_CMPI
, M32RBF_INSN_CMPI
, M32RBF_SFMT_CMPI
},
79 { M32R_INSN_CMPU
, M32RBF_INSN_CMPU
, M32RBF_SFMT_CMP
},
80 { M32R_INSN_CMPUI
, M32RBF_INSN_CMPUI
, M32RBF_SFMT_CMPI
},
81 { M32R_INSN_DIV
, M32RBF_INSN_DIV
, M32RBF_SFMT_DIV
},
82 { M32R_INSN_DIVU
, M32RBF_INSN_DIVU
, M32RBF_SFMT_DIV
},
83 { M32R_INSN_REM
, M32RBF_INSN_REM
, M32RBF_SFMT_DIV
},
84 { M32R_INSN_REMU
, M32RBF_INSN_REMU
, M32RBF_SFMT_DIV
},
85 { M32R_INSN_JL
, M32RBF_INSN_JL
, M32RBF_SFMT_JL
},
86 { M32R_INSN_JMP
, M32RBF_INSN_JMP
, M32RBF_SFMT_JMP
},
87 { M32R_INSN_LD
, M32RBF_INSN_LD
, M32RBF_SFMT_LD
},
88 { M32R_INSN_LD_D
, M32RBF_INSN_LD_D
, M32RBF_SFMT_LD_D
},
89 { M32R_INSN_LDB
, M32RBF_INSN_LDB
, M32RBF_SFMT_LDB
},
90 { M32R_INSN_LDB_D
, M32RBF_INSN_LDB_D
, M32RBF_SFMT_LDB_D
},
91 { M32R_INSN_LDH
, M32RBF_INSN_LDH
, M32RBF_SFMT_LDH
},
92 { M32R_INSN_LDH_D
, M32RBF_INSN_LDH_D
, M32RBF_SFMT_LDH_D
},
93 { M32R_INSN_LDUB
, M32RBF_INSN_LDUB
, M32RBF_SFMT_LDB
},
94 { M32R_INSN_LDUB_D
, M32RBF_INSN_LDUB_D
, M32RBF_SFMT_LDB_D
},
95 { M32R_INSN_LDUH
, M32RBF_INSN_LDUH
, M32RBF_SFMT_LDH
},
96 { M32R_INSN_LDUH_D
, M32RBF_INSN_LDUH_D
, M32RBF_SFMT_LDH_D
},
97 { M32R_INSN_LD_PLUS
, M32RBF_INSN_LD_PLUS
, M32RBF_SFMT_LD_PLUS
},
98 { M32R_INSN_LD24
, M32RBF_INSN_LD24
, M32RBF_SFMT_LD24
},
99 { M32R_INSN_LDI8
, M32RBF_INSN_LDI8
, M32RBF_SFMT_LDI8
},
100 { M32R_INSN_LDI16
, M32RBF_INSN_LDI16
, M32RBF_SFMT_LDI16
},
101 { M32R_INSN_LOCK
, M32RBF_INSN_LOCK
, M32RBF_SFMT_LOCK
},
102 { M32R_INSN_MACHI
, M32RBF_INSN_MACHI
, M32RBF_SFMT_MACHI
},
103 { M32R_INSN_MACLO
, M32RBF_INSN_MACLO
, M32RBF_SFMT_MACHI
},
104 { M32R_INSN_MACWHI
, M32RBF_INSN_MACWHI
, M32RBF_SFMT_MACHI
},
105 { M32R_INSN_MACWLO
, M32RBF_INSN_MACWLO
, M32RBF_SFMT_MACHI
},
106 { M32R_INSN_MUL
, M32RBF_INSN_MUL
, M32RBF_SFMT_ADD
},
107 { M32R_INSN_MULHI
, M32RBF_INSN_MULHI
, M32RBF_SFMT_MULHI
},
108 { M32R_INSN_MULLO
, M32RBF_INSN_MULLO
, M32RBF_SFMT_MULHI
},
109 { M32R_INSN_MULWHI
, M32RBF_INSN_MULWHI
, M32RBF_SFMT_MULHI
},
110 { M32R_INSN_MULWLO
, M32RBF_INSN_MULWLO
, M32RBF_SFMT_MULHI
},
111 { M32R_INSN_MV
, M32RBF_INSN_MV
, M32RBF_SFMT_MV
},
112 { M32R_INSN_MVFACHI
, M32RBF_INSN_MVFACHI
, M32RBF_SFMT_MVFACHI
},
113 { M32R_INSN_MVFACLO
, M32RBF_INSN_MVFACLO
, M32RBF_SFMT_MVFACHI
},
114 { M32R_INSN_MVFACMI
, M32RBF_INSN_MVFACMI
, M32RBF_SFMT_MVFACHI
},
115 { M32R_INSN_MVFC
, M32RBF_INSN_MVFC
, M32RBF_SFMT_MVFC
},
116 { M32R_INSN_MVTACHI
, M32RBF_INSN_MVTACHI
, M32RBF_SFMT_MVTACHI
},
117 { M32R_INSN_MVTACLO
, M32RBF_INSN_MVTACLO
, M32RBF_SFMT_MVTACHI
},
118 { M32R_INSN_MVTC
, M32RBF_INSN_MVTC
, M32RBF_SFMT_MVTC
},
119 { M32R_INSN_NEG
, M32RBF_INSN_NEG
, M32RBF_SFMT_MV
},
120 { M32R_INSN_NOP
, M32RBF_INSN_NOP
, M32RBF_SFMT_NOP
},
121 { M32R_INSN_NOT
, M32RBF_INSN_NOT
, M32RBF_SFMT_MV
},
122 { M32R_INSN_RAC
, M32RBF_INSN_RAC
, M32RBF_SFMT_RAC
},
123 { M32R_INSN_RACH
, M32RBF_INSN_RACH
, M32RBF_SFMT_RAC
},
124 { M32R_INSN_RTE
, M32RBF_INSN_RTE
, M32RBF_SFMT_RTE
},
125 { M32R_INSN_SETH
, M32RBF_INSN_SETH
, M32RBF_SFMT_SETH
},
126 { M32R_INSN_SLL
, M32RBF_INSN_SLL
, M32RBF_SFMT_ADD
},
127 { M32R_INSN_SLL3
, M32RBF_INSN_SLL3
, M32RBF_SFMT_SLL3
},
128 { M32R_INSN_SLLI
, M32RBF_INSN_SLLI
, M32RBF_SFMT_SLLI
},
129 { M32R_INSN_SRA
, M32RBF_INSN_SRA
, M32RBF_SFMT_ADD
},
130 { M32R_INSN_SRA3
, M32RBF_INSN_SRA3
, M32RBF_SFMT_SLL3
},
131 { M32R_INSN_SRAI
, M32RBF_INSN_SRAI
, M32RBF_SFMT_SLLI
},
132 { M32R_INSN_SRL
, M32RBF_INSN_SRL
, M32RBF_SFMT_ADD
},
133 { M32R_INSN_SRL3
, M32RBF_INSN_SRL3
, M32RBF_SFMT_SLL3
},
134 { M32R_INSN_SRLI
, M32RBF_INSN_SRLI
, M32RBF_SFMT_SLLI
},
135 { M32R_INSN_ST
, M32RBF_INSN_ST
, M32RBF_SFMT_ST
},
136 { M32R_INSN_ST_D
, M32RBF_INSN_ST_D
, M32RBF_SFMT_ST_D
},
137 { M32R_INSN_STB
, M32RBF_INSN_STB
, M32RBF_SFMT_STB
},
138 { M32R_INSN_STB_D
, M32RBF_INSN_STB_D
, M32RBF_SFMT_STB_D
},
139 { M32R_INSN_STH
, M32RBF_INSN_STH
, M32RBF_SFMT_STH
},
140 { M32R_INSN_STH_D
, M32RBF_INSN_STH_D
, M32RBF_SFMT_STH_D
},
141 { M32R_INSN_ST_PLUS
, M32RBF_INSN_ST_PLUS
, M32RBF_SFMT_ST_PLUS
},
142 { M32R_INSN_ST_MINUS
, M32RBF_INSN_ST_MINUS
, M32RBF_SFMT_ST_PLUS
},
143 { M32R_INSN_SUB
, M32RBF_INSN_SUB
, M32RBF_SFMT_ADD
},
144 { M32R_INSN_SUBV
, M32RBF_INSN_SUBV
, M32RBF_SFMT_ADDV
},
145 { M32R_INSN_SUBX
, M32RBF_INSN_SUBX
, M32RBF_SFMT_ADDX
},
146 { M32R_INSN_TRAP
, M32RBF_INSN_TRAP
, M32RBF_SFMT_TRAP
},
147 { M32R_INSN_UNLOCK
, M32RBF_INSN_UNLOCK
, M32RBF_SFMT_UNLOCK
},
148 { M32R_INSN_CLRPSW
, M32RBF_INSN_CLRPSW
, M32RBF_SFMT_CLRPSW
},
149 { M32R_INSN_SETPSW
, M32RBF_INSN_SETPSW
, M32RBF_SFMT_SETPSW
},
150 { M32R_INSN_BSET
, M32RBF_INSN_BSET
, M32RBF_SFMT_BSET
},
151 { M32R_INSN_BCLR
, M32RBF_INSN_BCLR
, M32RBF_SFMT_BSET
},
152 { M32R_INSN_BTST
, M32RBF_INSN_BTST
, M32RBF_SFMT_BTST
},
155 static const struct insn_sem m32rbf_insn_sem_invalid
= {
156 VIRTUAL_INSN_X_INVALID
, M32RBF_INSN_X_INVALID
, M32RBF_SFMT_EMPTY
159 /* Initialize an IDESC from the compile-time computable parts. */
162 init_idesc (SIM_CPU
*cpu
, IDESC
*id
, const struct insn_sem
*t
)
164 const CGEN_INSN
*insn_table
= CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu
))->init_entries
;
168 if ((int) t
->type
<= 0)
169 id
->idata
= & cgen_virtual_insn_table
[- (int) t
->type
];
171 id
->idata
= & insn_table
[t
->type
];
172 id
->attrs
= CGEN_INSN_ATTRS (id
->idata
);
173 /* Oh my god, a magic number. */
174 id
->length
= CGEN_INSN_BITSIZE (id
->idata
) / 8;
176 #if WITH_PROFILE_MODEL_P
177 id
->timing
= & MODEL_TIMING (CPU_MODEL (cpu
)) [t
->index
];
179 SIM_DESC sd
= CPU_STATE (cpu
);
180 SIM_ASSERT (t
->index
== id
->timing
->num
);
184 /* Semantic pointers are initialized elsewhere. */
187 /* Initialize the instruction descriptor table. */
190 m32rbf_init_idesc_table (SIM_CPU
*cpu
)
193 const struct insn_sem
*t
,*tend
;
194 int tabsize
= M32RBF_INSN__MAX
;
195 IDESC
*table
= m32rbf_insn_data
;
197 memset (table
, 0, tabsize
* sizeof (IDESC
));
199 /* First set all entries to the `invalid insn'. */
200 t
= & m32rbf_insn_sem_invalid
;
201 for (id
= table
, tabend
= table
+ tabsize
; id
< tabend
; ++id
)
202 init_idesc (cpu
, id
, t
);
204 /* Now fill in the values for the chosen cpu. */
205 for (t
= m32rbf_insn_sem
, tend
= t
+ sizeof (m32rbf_insn_sem
) / sizeof (*t
);
208 init_idesc (cpu
, & table
[t
->index
], t
);
211 /* Link the IDESC table into the cpu. */
212 CPU_IDESC (cpu
) = table
;
215 /* Given an instruction, return a pointer to its IDESC entry. */
218 m32rbf_decode (SIM_CPU
*current_cpu
, IADDR pc
,
219 CGEN_INSN_INT base_insn
, CGEN_INSN_INT entire_insn
,
222 /* Result of decoder. */
223 M32RBF_INSN_TYPE itype
;
226 CGEN_INSN_INT insn
= base_insn
;
229 unsigned int val
= (((insn
>> 8) & (15 << 4)) | ((insn
>> 4) & (15 << 0)));
232 case 0 : itype
= M32RBF_INSN_SUBV
; goto extract_sfmt_addv
;
233 case 1 : itype
= M32RBF_INSN_SUBX
; goto extract_sfmt_addx
;
234 case 2 : itype
= M32RBF_INSN_SUB
; goto extract_sfmt_add
;
235 case 3 : itype
= M32RBF_INSN_NEG
; goto extract_sfmt_mv
;
236 case 4 : itype
= M32RBF_INSN_CMP
; goto extract_sfmt_cmp
;
237 case 5 : itype
= M32RBF_INSN_CMPU
; goto extract_sfmt_cmp
;
238 case 8 : itype
= M32RBF_INSN_ADDV
; goto extract_sfmt_addv
;
239 case 9 : itype
= M32RBF_INSN_ADDX
; goto extract_sfmt_addx
;
240 case 10 : itype
= M32RBF_INSN_ADD
; goto extract_sfmt_add
;
241 case 11 : itype
= M32RBF_INSN_NOT
; goto extract_sfmt_mv
;
242 case 12 : itype
= M32RBF_INSN_AND
; goto extract_sfmt_add
;
243 case 13 : itype
= M32RBF_INSN_XOR
; goto extract_sfmt_add
;
244 case 14 : itype
= M32RBF_INSN_OR
; goto extract_sfmt_add
;
245 case 15 : itype
= M32RBF_INSN_BTST
; goto extract_sfmt_btst
;
246 case 16 : itype
= M32RBF_INSN_SRL
; goto extract_sfmt_add
;
247 case 18 : itype
= M32RBF_INSN_SRA
; goto extract_sfmt_add
;
248 case 20 : itype
= M32RBF_INSN_SLL
; goto extract_sfmt_add
;
249 case 22 : itype
= M32RBF_INSN_MUL
; goto extract_sfmt_add
;
250 case 24 : itype
= M32RBF_INSN_MV
; goto extract_sfmt_mv
;
251 case 25 : itype
= M32RBF_INSN_MVFC
; goto extract_sfmt_mvfc
;
252 case 26 : itype
= M32RBF_INSN_MVTC
; goto extract_sfmt_mvtc
;
255 unsigned int val
= (((insn
>> 8) & (1 << 0)));
258 case 0 : itype
= M32RBF_INSN_JL
; goto extract_sfmt_jl
;
259 case 1 : itype
= M32RBF_INSN_JMP
; goto extract_sfmt_jmp
;
260 default : itype
= M32RBF_INSN_X_INVALID
; goto extract_sfmt_empty
;
263 case 29 : itype
= M32RBF_INSN_RTE
; goto extract_sfmt_rte
;
264 case 31 : itype
= M32RBF_INSN_TRAP
; goto extract_sfmt_trap
;
265 case 32 : itype
= M32RBF_INSN_STB
; goto extract_sfmt_stb
;
266 case 34 : itype
= M32RBF_INSN_STH
; goto extract_sfmt_sth
;
267 case 36 : itype
= M32RBF_INSN_ST
; goto extract_sfmt_st
;
268 case 37 : itype
= M32RBF_INSN_UNLOCK
; goto extract_sfmt_unlock
;
269 case 38 : itype
= M32RBF_INSN_ST_PLUS
; goto extract_sfmt_st_plus
;
270 case 39 : itype
= M32RBF_INSN_ST_MINUS
; goto extract_sfmt_st_plus
;
271 case 40 : itype
= M32RBF_INSN_LDB
; goto extract_sfmt_ldb
;
272 case 41 : itype
= M32RBF_INSN_LDUB
; goto extract_sfmt_ldb
;
273 case 42 : itype
= M32RBF_INSN_LDH
; goto extract_sfmt_ldh
;
274 case 43 : itype
= M32RBF_INSN_LDUH
; goto extract_sfmt_ldh
;
275 case 44 : itype
= M32RBF_INSN_LD
; goto extract_sfmt_ld
;
276 case 45 : itype
= M32RBF_INSN_LOCK
; goto extract_sfmt_lock
;
277 case 46 : itype
= M32RBF_INSN_LD_PLUS
; goto extract_sfmt_ld_plus
;
278 case 48 : itype
= M32RBF_INSN_MULHI
; goto extract_sfmt_mulhi
;
279 case 49 : itype
= M32RBF_INSN_MULLO
; goto extract_sfmt_mulhi
;
280 case 50 : itype
= M32RBF_INSN_MULWHI
; goto extract_sfmt_mulhi
;
281 case 51 : itype
= M32RBF_INSN_MULWLO
; goto extract_sfmt_mulhi
;
282 case 52 : itype
= M32RBF_INSN_MACHI
; goto extract_sfmt_machi
;
283 case 53 : itype
= M32RBF_INSN_MACLO
; goto extract_sfmt_machi
;
284 case 54 : itype
= M32RBF_INSN_MACWHI
; goto extract_sfmt_machi
;
285 case 55 : itype
= M32RBF_INSN_MACWLO
; goto extract_sfmt_machi
;
286 case 64 : /* fall through */
287 case 65 : /* fall through */
288 case 66 : /* fall through */
289 case 67 : /* fall through */
290 case 68 : /* fall through */
291 case 69 : /* fall through */
292 case 70 : /* fall through */
293 case 71 : /* fall through */
294 case 72 : /* fall through */
295 case 73 : /* fall through */
296 case 74 : /* fall through */
297 case 75 : /* fall through */
298 case 76 : /* fall through */
299 case 77 : /* fall through */
300 case 78 : /* fall through */
301 case 79 : itype
= M32RBF_INSN_ADDI
; goto extract_sfmt_addi
;
302 case 80 : /* fall through */
303 case 81 : itype
= M32RBF_INSN_SRLI
; goto extract_sfmt_slli
;
304 case 82 : /* fall through */
305 case 83 : itype
= M32RBF_INSN_SRAI
; goto extract_sfmt_slli
;
306 case 84 : /* fall through */
307 case 85 : itype
= M32RBF_INSN_SLLI
; goto extract_sfmt_slli
;
310 unsigned int val
= (((insn
>> 0) & (1 << 0)));
313 case 0 : itype
= M32RBF_INSN_MVTACHI
; goto extract_sfmt_mvtachi
;
314 case 1 : itype
= M32RBF_INSN_MVTACLO
; goto extract_sfmt_mvtachi
;
315 default : itype
= M32RBF_INSN_X_INVALID
; goto extract_sfmt_empty
;
318 case 88 : itype
= M32RBF_INSN_RACH
; goto extract_sfmt_rac
;
319 case 89 : itype
= M32RBF_INSN_RAC
; goto extract_sfmt_rac
;
322 unsigned int val
= (((insn
>> 0) & (3 << 0)));
325 case 0 : itype
= M32RBF_INSN_MVFACHI
; goto extract_sfmt_mvfachi
;
326 case 1 : itype
= M32RBF_INSN_MVFACLO
; goto extract_sfmt_mvfachi
;
327 case 2 : itype
= M32RBF_INSN_MVFACMI
; goto extract_sfmt_mvfachi
;
328 default : itype
= M32RBF_INSN_X_INVALID
; goto extract_sfmt_empty
;
331 case 96 : /* fall through */
332 case 97 : /* fall through */
333 case 98 : /* fall through */
334 case 99 : /* fall through */
335 case 100 : /* fall through */
336 case 101 : /* fall through */
337 case 102 : /* fall through */
338 case 103 : /* fall through */
339 case 104 : /* fall through */
340 case 105 : /* fall through */
341 case 106 : /* fall through */
342 case 107 : /* fall through */
343 case 108 : /* fall through */
344 case 109 : /* fall through */
345 case 110 : /* fall through */
346 case 111 : itype
= M32RBF_INSN_LDI8
; goto extract_sfmt_ldi8
;
349 unsigned int val
= (((insn
>> 8) & (15 << 0)));
352 case 0 : itype
= M32RBF_INSN_NOP
; goto extract_sfmt_nop
;
353 case 1 : itype
= M32RBF_INSN_SETPSW
; goto extract_sfmt_setpsw
;
354 case 2 : itype
= M32RBF_INSN_CLRPSW
; goto extract_sfmt_clrpsw
;
355 case 12 : itype
= M32RBF_INSN_BC8
; goto extract_sfmt_bc8
;
356 case 13 : itype
= M32RBF_INSN_BNC8
; goto extract_sfmt_bc8
;
357 case 14 : itype
= M32RBF_INSN_BL8
; goto extract_sfmt_bl8
;
358 case 15 : itype
= M32RBF_INSN_BRA8
; goto extract_sfmt_bra8
;
359 default : itype
= M32RBF_INSN_X_INVALID
; goto extract_sfmt_empty
;
362 case 113 : /* fall through */
363 case 114 : /* fall through */
364 case 115 : /* fall through */
365 case 116 : /* fall through */
366 case 117 : /* fall through */
367 case 118 : /* fall through */
368 case 119 : /* fall through */
369 case 120 : /* fall through */
370 case 121 : /* fall through */
371 case 122 : /* fall through */
372 case 123 : /* fall through */
373 case 124 : /* fall through */
374 case 125 : /* fall through */
375 case 126 : /* fall through */
378 unsigned int val
= (((insn
>> 8) & (15 << 0)));
381 case 1 : itype
= M32RBF_INSN_SETPSW
; goto extract_sfmt_setpsw
;
382 case 2 : itype
= M32RBF_INSN_CLRPSW
; goto extract_sfmt_clrpsw
;
383 case 12 : itype
= M32RBF_INSN_BC8
; goto extract_sfmt_bc8
;
384 case 13 : itype
= M32RBF_INSN_BNC8
; goto extract_sfmt_bc8
;
385 case 14 : itype
= M32RBF_INSN_BL8
; goto extract_sfmt_bl8
;
386 case 15 : itype
= M32RBF_INSN_BRA8
; goto extract_sfmt_bra8
;
387 default : itype
= M32RBF_INSN_X_INVALID
; goto extract_sfmt_empty
;
390 case 132 : itype
= M32RBF_INSN_CMPI
; goto extract_sfmt_cmpi
;
391 case 133 : itype
= M32RBF_INSN_CMPUI
; goto extract_sfmt_cmpi
;
392 case 136 : itype
= M32RBF_INSN_ADDV3
; goto extract_sfmt_addv3
;
393 case 138 : itype
= M32RBF_INSN_ADD3
; goto extract_sfmt_add3
;
394 case 140 : itype
= M32RBF_INSN_AND3
; goto extract_sfmt_and3
;
395 case 141 : itype
= M32RBF_INSN_XOR3
; goto extract_sfmt_and3
;
396 case 142 : itype
= M32RBF_INSN_OR3
; goto extract_sfmt_or3
;
397 case 144 : itype
= M32RBF_INSN_DIV
; goto extract_sfmt_div
;
398 case 145 : itype
= M32RBF_INSN_DIVU
; goto extract_sfmt_div
;
399 case 146 : itype
= M32RBF_INSN_REM
; goto extract_sfmt_div
;
400 case 147 : itype
= M32RBF_INSN_REMU
; goto extract_sfmt_div
;
401 case 152 : itype
= M32RBF_INSN_SRL3
; goto extract_sfmt_sll3
;
402 case 154 : itype
= M32RBF_INSN_SRA3
; goto extract_sfmt_sll3
;
403 case 156 : itype
= M32RBF_INSN_SLL3
; goto extract_sfmt_sll3
;
404 case 159 : itype
= M32RBF_INSN_LDI16
; goto extract_sfmt_ldi16
;
405 case 160 : itype
= M32RBF_INSN_STB_D
; goto extract_sfmt_stb_d
;
406 case 162 : itype
= M32RBF_INSN_STH_D
; goto extract_sfmt_sth_d
;
407 case 164 : itype
= M32RBF_INSN_ST_D
; goto extract_sfmt_st_d
;
408 case 166 : itype
= M32RBF_INSN_BSET
; goto extract_sfmt_bset
;
409 case 167 : itype
= M32RBF_INSN_BCLR
; goto extract_sfmt_bset
;
410 case 168 : itype
= M32RBF_INSN_LDB_D
; goto extract_sfmt_ldb_d
;
411 case 169 : itype
= M32RBF_INSN_LDUB_D
; goto extract_sfmt_ldb_d
;
412 case 170 : itype
= M32RBF_INSN_LDH_D
; goto extract_sfmt_ldh_d
;
413 case 171 : itype
= M32RBF_INSN_LDUH_D
; goto extract_sfmt_ldh_d
;
414 case 172 : itype
= M32RBF_INSN_LD_D
; goto extract_sfmt_ld_d
;
415 case 176 : itype
= M32RBF_INSN_BEQ
; goto extract_sfmt_beq
;
416 case 177 : itype
= M32RBF_INSN_BNE
; goto extract_sfmt_beq
;
417 case 184 : itype
= M32RBF_INSN_BEQZ
; goto extract_sfmt_beqz
;
418 case 185 : itype
= M32RBF_INSN_BNEZ
; goto extract_sfmt_beqz
;
419 case 186 : itype
= M32RBF_INSN_BLTZ
; goto extract_sfmt_beqz
;
420 case 187 : itype
= M32RBF_INSN_BGEZ
; goto extract_sfmt_beqz
;
421 case 188 : itype
= M32RBF_INSN_BLEZ
; goto extract_sfmt_beqz
;
422 case 189 : itype
= M32RBF_INSN_BGTZ
; goto extract_sfmt_beqz
;
423 case 220 : itype
= M32RBF_INSN_SETH
; goto extract_sfmt_seth
;
424 case 224 : /* fall through */
425 case 225 : /* fall through */
426 case 226 : /* fall through */
427 case 227 : /* fall through */
428 case 228 : /* fall through */
429 case 229 : /* fall through */
430 case 230 : /* fall through */
431 case 231 : /* fall through */
432 case 232 : /* fall through */
433 case 233 : /* fall through */
434 case 234 : /* fall through */
435 case 235 : /* fall through */
436 case 236 : /* fall through */
437 case 237 : /* fall through */
438 case 238 : /* fall through */
439 case 239 : itype
= M32RBF_INSN_LD24
; goto extract_sfmt_ld24
;
440 case 240 : /* fall through */
441 case 241 : /* fall through */
442 case 242 : /* fall through */
443 case 243 : /* fall through */
444 case 244 : /* fall through */
445 case 245 : /* fall through */
446 case 246 : /* fall through */
447 case 247 : /* fall through */
448 case 248 : /* fall through */
449 case 249 : /* fall through */
450 case 250 : /* fall through */
451 case 251 : /* fall through */
452 case 252 : /* fall through */
453 case 253 : /* fall through */
454 case 254 : /* fall through */
457 unsigned int val
= (((insn
>> 8) & (3 << 0)));
460 case 0 : itype
= M32RBF_INSN_BC24
; goto extract_sfmt_bc24
;
461 case 1 : itype
= M32RBF_INSN_BNC24
; goto extract_sfmt_bc24
;
462 case 2 : itype
= M32RBF_INSN_BL24
; goto extract_sfmt_bl24
;
463 case 3 : itype
= M32RBF_INSN_BRA24
; goto extract_sfmt_bra24
;
464 default : itype
= M32RBF_INSN_X_INVALID
; goto extract_sfmt_empty
;
467 default : itype
= M32RBF_INSN_X_INVALID
; goto extract_sfmt_empty
;
472 /* The instruction has been decoded, now extract the fields. */
476 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
477 #define FLD(f) abuf->fields.fmt_empty.f
480 /* Record the fields for the semantic handler. */
481 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_empty", (char *) 0));
489 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
490 CGEN_INSN_INT insn
= entire_insn
;
491 #define FLD(f) abuf->fields.sfmt_add.f
495 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
496 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
498 /* Record the fields for the semantic handler. */
501 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
502 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
503 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_add", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
505 #if WITH_PROFILE_MODEL_P
506 /* Record the fields for profiling. */
507 if (PROFILE_MODEL_P (current_cpu
))
520 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
521 CGEN_INSN_INT insn
= entire_insn
;
522 #define FLD(f) abuf->fields.sfmt_add3.f
527 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
528 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
529 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
531 /* Record the fields for the semantic handler. */
532 FLD (f_simm16
) = f_simm16
;
535 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
536 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
537 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_add3", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
539 #if WITH_PROFILE_MODEL_P
540 /* Record the fields for profiling. */
541 if (PROFILE_MODEL_P (current_cpu
))
553 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
554 CGEN_INSN_INT insn
= entire_insn
;
555 #define FLD(f) abuf->fields.sfmt_and3.f
560 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
561 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
562 f_uimm16
= EXTRACT_MSB0_UINT (insn
, 32, 16, 16);
564 /* Record the fields for the semantic handler. */
566 FLD (f_uimm16
) = f_uimm16
;
568 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
569 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
570 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_and3", "f_r2 0x%x", 'x', f_r2
, "f_uimm16 0x%x", 'x', f_uimm16
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
572 #if WITH_PROFILE_MODEL_P
573 /* Record the fields for profiling. */
574 if (PROFILE_MODEL_P (current_cpu
))
586 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
587 CGEN_INSN_INT insn
= entire_insn
;
588 #define FLD(f) abuf->fields.sfmt_and3.f
593 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
594 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
595 f_uimm16
= EXTRACT_MSB0_UINT (insn
, 32, 16, 16);
597 /* Record the fields for the semantic handler. */
599 FLD (f_uimm16
) = f_uimm16
;
601 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
602 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
603 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_or3", "f_r2 0x%x", 'x', f_r2
, "f_uimm16 0x%x", 'x', f_uimm16
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
605 #if WITH_PROFILE_MODEL_P
606 /* Record the fields for profiling. */
607 if (PROFILE_MODEL_P (current_cpu
))
619 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
620 CGEN_INSN_INT insn
= entire_insn
;
621 #define FLD(f) abuf->fields.sfmt_addi.f
625 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
626 f_simm8
= EXTRACT_MSB0_INT (insn
, 16, 8, 8);
628 /* Record the fields for the semantic handler. */
630 FLD (f_simm8
) = f_simm8
;
631 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
632 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_addi", "f_r1 0x%x", 'x', f_r1
, "f_simm8 0x%x", 'x', f_simm8
, "dr 0x%x", 'x', f_r1
, (char *) 0));
634 #if WITH_PROFILE_MODEL_P
635 /* Record the fields for profiling. */
636 if (PROFILE_MODEL_P (current_cpu
))
648 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
649 CGEN_INSN_INT insn
= entire_insn
;
650 #define FLD(f) abuf->fields.sfmt_add.f
654 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
655 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
657 /* Record the fields for the semantic handler. */
660 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
661 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
662 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_addv", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
664 #if WITH_PROFILE_MODEL_P
665 /* Record the fields for profiling. */
666 if (PROFILE_MODEL_P (current_cpu
))
679 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
680 CGEN_INSN_INT insn
= entire_insn
;
681 #define FLD(f) abuf->fields.sfmt_add3.f
686 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
687 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
688 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
690 /* Record the fields for the semantic handler. */
691 FLD (f_simm16
) = f_simm16
;
694 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
695 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
696 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_addv3", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
698 #if WITH_PROFILE_MODEL_P
699 /* Record the fields for profiling. */
700 if (PROFILE_MODEL_P (current_cpu
))
712 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
713 CGEN_INSN_INT insn
= entire_insn
;
714 #define FLD(f) abuf->fields.sfmt_add.f
718 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
719 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
721 /* Record the fields for the semantic handler. */
724 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
725 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
726 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_addx", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
728 #if WITH_PROFILE_MODEL_P
729 /* Record the fields for profiling. */
730 if (PROFILE_MODEL_P (current_cpu
))
743 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
744 CGEN_INSN_INT insn
= entire_insn
;
745 #define FLD(f) abuf->fields.sfmt_bl8.f
748 f_disp8
= ((((EXTRACT_MSB0_INT (insn
, 16, 8, 8)) << (2))) + (((pc
) & (-4))));
750 /* Record the fields for the semantic handler. */
751 FLD (i_disp8
) = f_disp8
;
752 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bc8", "disp8 0x%x", 'x', f_disp8
, (char *) 0));
754 #if WITH_PROFILE_MODEL_P
755 /* Record the fields for profiling. */
756 if (PROFILE_MODEL_P (current_cpu
))
766 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
767 CGEN_INSN_INT insn
= entire_insn
;
768 #define FLD(f) abuf->fields.sfmt_bl24.f
771 f_disp24
= ((((EXTRACT_MSB0_INT (insn
, 32, 8, 24)) << (2))) + (pc
));
773 /* Record the fields for the semantic handler. */
774 FLD (i_disp24
) = f_disp24
;
775 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bc24", "disp24 0x%x", 'x', f_disp24
, (char *) 0));
777 #if WITH_PROFILE_MODEL_P
778 /* Record the fields for profiling. */
779 if (PROFILE_MODEL_P (current_cpu
))
789 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
790 CGEN_INSN_INT insn
= entire_insn
;
791 #define FLD(f) abuf->fields.sfmt_beq.f
796 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
797 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
798 f_disp16
= ((((EXTRACT_MSB0_INT (insn
, 32, 16, 16)) << (2))) + (pc
));
800 /* Record the fields for the semantic handler. */
803 FLD (i_disp16
) = f_disp16
;
804 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
805 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
806 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_beq", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "disp16 0x%x", 'x', f_disp16
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
808 #if WITH_PROFILE_MODEL_P
809 /* Record the fields for profiling. */
810 if (PROFILE_MODEL_P (current_cpu
))
812 FLD (in_src1
) = f_r1
;
813 FLD (in_src2
) = f_r2
;
822 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
823 CGEN_INSN_INT insn
= entire_insn
;
824 #define FLD(f) abuf->fields.sfmt_beq.f
828 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
829 f_disp16
= ((((EXTRACT_MSB0_INT (insn
, 32, 16, 16)) << (2))) + (pc
));
831 /* Record the fields for the semantic handler. */
833 FLD (i_disp16
) = f_disp16
;
834 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
835 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_beqz", "f_r2 0x%x", 'x', f_r2
, "disp16 0x%x", 'x', f_disp16
, "src2 0x%x", 'x', f_r2
, (char *) 0));
837 #if WITH_PROFILE_MODEL_P
838 /* Record the fields for profiling. */
839 if (PROFILE_MODEL_P (current_cpu
))
841 FLD (in_src2
) = f_r2
;
850 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
851 CGEN_INSN_INT insn
= entire_insn
;
852 #define FLD(f) abuf->fields.sfmt_bl8.f
855 f_disp8
= ((((EXTRACT_MSB0_INT (insn
, 16, 8, 8)) << (2))) + (((pc
) & (-4))));
857 /* Record the fields for the semantic handler. */
858 FLD (i_disp8
) = f_disp8
;
859 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bl8", "disp8 0x%x", 'x', f_disp8
, (char *) 0));
861 #if WITH_PROFILE_MODEL_P
862 /* Record the fields for profiling. */
863 if (PROFILE_MODEL_P (current_cpu
))
865 FLD (out_h_gr_SI_14
) = 14;
874 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
875 CGEN_INSN_INT insn
= entire_insn
;
876 #define FLD(f) abuf->fields.sfmt_bl24.f
879 f_disp24
= ((((EXTRACT_MSB0_INT (insn
, 32, 8, 24)) << (2))) + (pc
));
881 /* Record the fields for the semantic handler. */
882 FLD (i_disp24
) = f_disp24
;
883 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bl24", "disp24 0x%x", 'x', f_disp24
, (char *) 0));
885 #if WITH_PROFILE_MODEL_P
886 /* Record the fields for profiling. */
887 if (PROFILE_MODEL_P (current_cpu
))
889 FLD (out_h_gr_SI_14
) = 14;
898 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
899 CGEN_INSN_INT insn
= entire_insn
;
900 #define FLD(f) abuf->fields.sfmt_bl8.f
903 f_disp8
= ((((EXTRACT_MSB0_INT (insn
, 16, 8, 8)) << (2))) + (((pc
) & (-4))));
905 /* Record the fields for the semantic handler. */
906 FLD (i_disp8
) = f_disp8
;
907 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bra8", "disp8 0x%x", 'x', f_disp8
, (char *) 0));
909 #if WITH_PROFILE_MODEL_P
910 /* Record the fields for profiling. */
911 if (PROFILE_MODEL_P (current_cpu
))
921 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
922 CGEN_INSN_INT insn
= entire_insn
;
923 #define FLD(f) abuf->fields.sfmt_bl24.f
926 f_disp24
= ((((EXTRACT_MSB0_INT (insn
, 32, 8, 24)) << (2))) + (pc
));
928 /* Record the fields for the semantic handler. */
929 FLD (i_disp24
) = f_disp24
;
930 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bra24", "disp24 0x%x", 'x', f_disp24
, (char *) 0));
932 #if WITH_PROFILE_MODEL_P
933 /* Record the fields for profiling. */
934 if (PROFILE_MODEL_P (current_cpu
))
944 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
945 CGEN_INSN_INT insn
= entire_insn
;
946 #define FLD(f) abuf->fields.sfmt_st_plus.f
950 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
951 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
953 /* Record the fields for the semantic handler. */
956 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
957 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
958 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_cmp", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
960 #if WITH_PROFILE_MODEL_P
961 /* Record the fields for profiling. */
962 if (PROFILE_MODEL_P (current_cpu
))
964 FLD (in_src1
) = f_r1
;
965 FLD (in_src2
) = f_r2
;
974 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
975 CGEN_INSN_INT insn
= entire_insn
;
976 #define FLD(f) abuf->fields.sfmt_st_d.f
980 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
981 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
983 /* Record the fields for the semantic handler. */
984 FLD (f_simm16
) = f_simm16
;
986 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
987 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_cmpi", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "src2 0x%x", 'x', f_r2
, (char *) 0));
989 #if WITH_PROFILE_MODEL_P
990 /* Record the fields for profiling. */
991 if (PROFILE_MODEL_P (current_cpu
))
993 FLD (in_src2
) = f_r2
;
1002 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1003 CGEN_INSN_INT insn
= entire_insn
;
1004 #define FLD(f) abuf->fields.sfmt_add.f
1008 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1009 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1011 /* Record the fields for the semantic handler. */
1014 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1015 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1016 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_div", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
1018 #if WITH_PROFILE_MODEL_P
1019 /* Record the fields for profiling. */
1020 if (PROFILE_MODEL_P (current_cpu
))
1024 FLD (out_dr
) = f_r1
;
1033 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1034 CGEN_INSN_INT insn
= entire_insn
;
1035 #define FLD(f) abuf->fields.sfmt_jl.f
1038 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1040 /* Record the fields for the semantic handler. */
1042 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1043 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_jl", "f_r2 0x%x", 'x', f_r2
, "sr 0x%x", 'x', f_r2
, (char *) 0));
1045 #if WITH_PROFILE_MODEL_P
1046 /* Record the fields for profiling. */
1047 if (PROFILE_MODEL_P (current_cpu
))
1050 FLD (out_h_gr_SI_14
) = 14;
1059 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1060 CGEN_INSN_INT insn
= entire_insn
;
1061 #define FLD(f) abuf->fields.sfmt_jl.f
1064 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1066 /* Record the fields for the semantic handler. */
1068 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1069 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_jmp", "f_r2 0x%x", 'x', f_r2
, "sr 0x%x", 'x', f_r2
, (char *) 0));
1071 #if WITH_PROFILE_MODEL_P
1072 /* Record the fields for profiling. */
1073 if (PROFILE_MODEL_P (current_cpu
))
1084 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1085 CGEN_INSN_INT insn
= entire_insn
;
1086 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1090 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1091 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1093 /* Record the fields for the semantic handler. */
1096 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1097 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1098 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ld", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1100 #if WITH_PROFILE_MODEL_P
1101 /* Record the fields for profiling. */
1102 if (PROFILE_MODEL_P (current_cpu
))
1105 FLD (out_dr
) = f_r1
;
1114 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1115 CGEN_INSN_INT insn
= entire_insn
;
1116 #define FLD(f) abuf->fields.sfmt_add3.f
1121 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1122 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1123 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
1125 /* Record the fields for the semantic handler. */
1126 FLD (f_simm16
) = f_simm16
;
1129 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1130 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1131 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ld_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1133 #if WITH_PROFILE_MODEL_P
1134 /* Record the fields for profiling. */
1135 if (PROFILE_MODEL_P (current_cpu
))
1138 FLD (out_dr
) = f_r1
;
1147 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1148 CGEN_INSN_INT insn
= entire_insn
;
1149 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1153 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1154 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1156 /* Record the fields for the semantic handler. */
1159 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1160 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1161 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldb", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1163 #if WITH_PROFILE_MODEL_P
1164 /* Record the fields for profiling. */
1165 if (PROFILE_MODEL_P (current_cpu
))
1168 FLD (out_dr
) = f_r1
;
1177 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1178 CGEN_INSN_INT insn
= entire_insn
;
1179 #define FLD(f) abuf->fields.sfmt_add3.f
1184 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1185 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1186 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
1188 /* Record the fields for the semantic handler. */
1189 FLD (f_simm16
) = f_simm16
;
1192 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1193 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1194 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldb_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1196 #if WITH_PROFILE_MODEL_P
1197 /* Record the fields for profiling. */
1198 if (PROFILE_MODEL_P (current_cpu
))
1201 FLD (out_dr
) = f_r1
;
1210 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1211 CGEN_INSN_INT insn
= entire_insn
;
1212 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1216 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1217 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1219 /* Record the fields for the semantic handler. */
1222 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1223 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1224 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldh", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1226 #if WITH_PROFILE_MODEL_P
1227 /* Record the fields for profiling. */
1228 if (PROFILE_MODEL_P (current_cpu
))
1231 FLD (out_dr
) = f_r1
;
1240 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1241 CGEN_INSN_INT insn
= entire_insn
;
1242 #define FLD(f) abuf->fields.sfmt_add3.f
1247 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1248 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1249 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
1251 /* Record the fields for the semantic handler. */
1252 FLD (f_simm16
) = f_simm16
;
1255 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1256 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1257 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldh_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1259 #if WITH_PROFILE_MODEL_P
1260 /* Record the fields for profiling. */
1261 if (PROFILE_MODEL_P (current_cpu
))
1264 FLD (out_dr
) = f_r1
;
1271 extract_sfmt_ld_plus
:
1273 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1274 CGEN_INSN_INT insn
= entire_insn
;
1275 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1279 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1280 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1282 /* Record the fields for the semantic handler. */
1285 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1286 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1287 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ld_plus", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1289 #if WITH_PROFILE_MODEL_P
1290 /* Record the fields for profiling. */
1291 if (PROFILE_MODEL_P (current_cpu
))
1294 FLD (out_dr
) = f_r1
;
1295 FLD (out_sr
) = f_r2
;
1304 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1305 CGEN_INSN_INT insn
= entire_insn
;
1306 #define FLD(f) abuf->fields.sfmt_ld24.f
1310 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1311 f_uimm24
= EXTRACT_MSB0_UINT (insn
, 32, 8, 24);
1313 /* Record the fields for the semantic handler. */
1315 FLD (i_uimm24
) = f_uimm24
;
1316 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1317 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ld24", "f_r1 0x%x", 'x', f_r1
, "uimm24 0x%x", 'x', f_uimm24
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1319 #if WITH_PROFILE_MODEL_P
1320 /* Record the fields for profiling. */
1321 if (PROFILE_MODEL_P (current_cpu
))
1323 FLD (out_dr
) = f_r1
;
1332 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1333 CGEN_INSN_INT insn
= entire_insn
;
1334 #define FLD(f) abuf->fields.sfmt_addi.f
1338 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1339 f_simm8
= EXTRACT_MSB0_INT (insn
, 16, 8, 8);
1341 /* Record the fields for the semantic handler. */
1342 FLD (f_simm8
) = f_simm8
;
1344 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1345 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldi8", "f_simm8 0x%x", 'x', f_simm8
, "f_r1 0x%x", 'x', f_r1
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1347 #if WITH_PROFILE_MODEL_P
1348 /* Record the fields for profiling. */
1349 if (PROFILE_MODEL_P (current_cpu
))
1351 FLD (out_dr
) = f_r1
;
1360 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1361 CGEN_INSN_INT insn
= entire_insn
;
1362 #define FLD(f) abuf->fields.sfmt_add3.f
1366 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1367 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
1369 /* Record the fields for the semantic handler. */
1370 FLD (f_simm16
) = f_simm16
;
1372 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1373 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldi16", "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1375 #if WITH_PROFILE_MODEL_P
1376 /* Record the fields for profiling. */
1377 if (PROFILE_MODEL_P (current_cpu
))
1379 FLD (out_dr
) = f_r1
;
1388 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1389 CGEN_INSN_INT insn
= entire_insn
;
1390 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1394 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1395 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1397 /* Record the fields for the semantic handler. */
1400 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1401 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1402 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lock", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1404 #if WITH_PROFILE_MODEL_P
1405 /* Record the fields for profiling. */
1406 if (PROFILE_MODEL_P (current_cpu
))
1409 FLD (out_dr
) = f_r1
;
1418 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1419 CGEN_INSN_INT insn
= entire_insn
;
1420 #define FLD(f) abuf->fields.sfmt_st_plus.f
1424 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1425 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1427 /* Record the fields for the semantic handler. */
1430 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1431 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1432 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_machi", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1434 #if WITH_PROFILE_MODEL_P
1435 /* Record the fields for profiling. */
1436 if (PROFILE_MODEL_P (current_cpu
))
1438 FLD (in_src1
) = f_r1
;
1439 FLD (in_src2
) = f_r2
;
1448 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1449 CGEN_INSN_INT insn
= entire_insn
;
1450 #define FLD(f) abuf->fields.sfmt_st_plus.f
1454 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1455 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1457 /* Record the fields for the semantic handler. */
1460 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1461 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1462 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mulhi", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1464 #if WITH_PROFILE_MODEL_P
1465 /* Record the fields for profiling. */
1466 if (PROFILE_MODEL_P (current_cpu
))
1468 FLD (in_src1
) = f_r1
;
1469 FLD (in_src2
) = f_r2
;
1478 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1479 CGEN_INSN_INT insn
= entire_insn
;
1480 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1484 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1485 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1487 /* Record the fields for the semantic handler. */
1490 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1491 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1492 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mv", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1494 #if WITH_PROFILE_MODEL_P
1495 /* Record the fields for profiling. */
1496 if (PROFILE_MODEL_P (current_cpu
))
1499 FLD (out_dr
) = f_r1
;
1506 extract_sfmt_mvfachi
:
1508 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1509 CGEN_INSN_INT insn
= entire_insn
;
1510 #define FLD(f) abuf->fields.sfmt_seth.f
1513 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1515 /* Record the fields for the semantic handler. */
1517 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1518 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mvfachi", "f_r1 0x%x", 'x', f_r1
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1520 #if WITH_PROFILE_MODEL_P
1521 /* Record the fields for profiling. */
1522 if (PROFILE_MODEL_P (current_cpu
))
1524 FLD (out_dr
) = f_r1
;
1533 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1534 CGEN_INSN_INT insn
= entire_insn
;
1535 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1539 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1540 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1542 /* Record the fields for the semantic handler. */
1545 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1546 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mvfc", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1548 #if WITH_PROFILE_MODEL_P
1549 /* Record the fields for profiling. */
1550 if (PROFILE_MODEL_P (current_cpu
))
1552 FLD (out_dr
) = f_r1
;
1559 extract_sfmt_mvtachi
:
1561 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1562 CGEN_INSN_INT insn
= entire_insn
;
1563 #define FLD(f) abuf->fields.sfmt_st_plus.f
1566 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1568 /* Record the fields for the semantic handler. */
1570 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1571 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mvtachi", "f_r1 0x%x", 'x', f_r1
, "src1 0x%x", 'x', f_r1
, (char *) 0));
1573 #if WITH_PROFILE_MODEL_P
1574 /* Record the fields for profiling. */
1575 if (PROFILE_MODEL_P (current_cpu
))
1577 FLD (in_src1
) = f_r1
;
1586 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1587 CGEN_INSN_INT insn
= entire_insn
;
1588 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1592 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1593 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1595 /* Record the fields for the semantic handler. */
1598 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1599 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mvtc", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
1601 #if WITH_PROFILE_MODEL_P
1602 /* Record the fields for profiling. */
1603 if (PROFILE_MODEL_P (current_cpu
))
1614 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1615 #define FLD(f) abuf->fields.fmt_empty.f
1618 /* Record the fields for the semantic handler. */
1619 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_nop", (char *) 0));
1627 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1628 #define FLD(f) abuf->fields.fmt_empty.f
1631 /* Record the fields for the semantic handler. */
1632 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_rac", (char *) 0));
1640 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1641 #define FLD(f) abuf->fields.fmt_empty.f
1644 /* Record the fields for the semantic handler. */
1645 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_rte", (char *) 0));
1647 #if WITH_PROFILE_MODEL_P
1648 /* Record the fields for profiling. */
1649 if (PROFILE_MODEL_P (current_cpu
))
1659 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1660 CGEN_INSN_INT insn
= entire_insn
;
1661 #define FLD(f) abuf->fields.sfmt_seth.f
1665 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1666 f_hi16
= EXTRACT_MSB0_UINT (insn
, 32, 16, 16);
1668 /* Record the fields for the semantic handler. */
1669 FLD (f_hi16
) = f_hi16
;
1671 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1672 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_seth", "f_hi16 0x%x", 'x', f_hi16
, "f_r1 0x%x", 'x', f_r1
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1674 #if WITH_PROFILE_MODEL_P
1675 /* Record the fields for profiling. */
1676 if (PROFILE_MODEL_P (current_cpu
))
1678 FLD (out_dr
) = f_r1
;
1687 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1688 CGEN_INSN_INT insn
= entire_insn
;
1689 #define FLD(f) abuf->fields.sfmt_add3.f
1694 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1695 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1696 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
1698 /* Record the fields for the semantic handler. */
1699 FLD (f_simm16
) = f_simm16
;
1702 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1703 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1704 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_sll3", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1706 #if WITH_PROFILE_MODEL_P
1707 /* Record the fields for profiling. */
1708 if (PROFILE_MODEL_P (current_cpu
))
1711 FLD (out_dr
) = f_r1
;
1720 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1721 CGEN_INSN_INT insn
= entire_insn
;
1722 #define FLD(f) abuf->fields.sfmt_slli.f
1726 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1727 f_uimm5
= EXTRACT_MSB0_UINT (insn
, 16, 11, 5);
1729 /* Record the fields for the semantic handler. */
1731 FLD (f_uimm5
) = f_uimm5
;
1732 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1733 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_slli", "f_r1 0x%x", 'x', f_r1
, "f_uimm5 0x%x", 'x', f_uimm5
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1735 #if WITH_PROFILE_MODEL_P
1736 /* Record the fields for profiling. */
1737 if (PROFILE_MODEL_P (current_cpu
))
1740 FLD (out_dr
) = f_r1
;
1749 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1750 CGEN_INSN_INT insn
= entire_insn
;
1751 #define FLD(f) abuf->fields.sfmt_st_plus.f
1755 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1756 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1758 /* Record the fields for the semantic handler. */
1761 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1762 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1763 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_st", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1765 #if WITH_PROFILE_MODEL_P
1766 /* Record the fields for profiling. */
1767 if (PROFILE_MODEL_P (current_cpu
))
1769 FLD (in_src1
) = f_r1
;
1770 FLD (in_src2
) = f_r2
;
1779 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1780 CGEN_INSN_INT insn
= entire_insn
;
1781 #define FLD(f) abuf->fields.sfmt_st_d.f
1786 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1787 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1788 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
1790 /* Record the fields for the semantic handler. */
1791 FLD (f_simm16
) = f_simm16
;
1794 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1795 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1796 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_st_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1798 #if WITH_PROFILE_MODEL_P
1799 /* Record the fields for profiling. */
1800 if (PROFILE_MODEL_P (current_cpu
))
1802 FLD (in_src1
) = f_r1
;
1803 FLD (in_src2
) = f_r2
;
1812 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1813 CGEN_INSN_INT insn
= entire_insn
;
1814 #define FLD(f) abuf->fields.sfmt_st_plus.f
1818 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1819 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1821 /* Record the fields for the semantic handler. */
1824 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1825 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1826 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_stb", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1828 #if WITH_PROFILE_MODEL_P
1829 /* Record the fields for profiling. */
1830 if (PROFILE_MODEL_P (current_cpu
))
1832 FLD (in_src1
) = f_r1
;
1833 FLD (in_src2
) = f_r2
;
1842 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1843 CGEN_INSN_INT insn
= entire_insn
;
1844 #define FLD(f) abuf->fields.sfmt_st_d.f
1849 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1850 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1851 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
1853 /* Record the fields for the semantic handler. */
1854 FLD (f_simm16
) = f_simm16
;
1857 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1858 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1859 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_stb_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1861 #if WITH_PROFILE_MODEL_P
1862 /* Record the fields for profiling. */
1863 if (PROFILE_MODEL_P (current_cpu
))
1865 FLD (in_src1
) = f_r1
;
1866 FLD (in_src2
) = f_r2
;
1875 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1876 CGEN_INSN_INT insn
= entire_insn
;
1877 #define FLD(f) abuf->fields.sfmt_st_plus.f
1881 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1882 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1884 /* Record the fields for the semantic handler. */
1887 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1888 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1889 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_sth", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1891 #if WITH_PROFILE_MODEL_P
1892 /* Record the fields for profiling. */
1893 if (PROFILE_MODEL_P (current_cpu
))
1895 FLD (in_src1
) = f_r1
;
1896 FLD (in_src2
) = f_r2
;
1905 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1906 CGEN_INSN_INT insn
= entire_insn
;
1907 #define FLD(f) abuf->fields.sfmt_st_d.f
1912 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1913 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1914 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
1916 /* Record the fields for the semantic handler. */
1917 FLD (f_simm16
) = f_simm16
;
1920 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1921 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1922 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_sth_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1924 #if WITH_PROFILE_MODEL_P
1925 /* Record the fields for profiling. */
1926 if (PROFILE_MODEL_P (current_cpu
))
1928 FLD (in_src1
) = f_r1
;
1929 FLD (in_src2
) = f_r2
;
1936 extract_sfmt_st_plus
:
1938 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1939 CGEN_INSN_INT insn
= entire_insn
;
1940 #define FLD(f) abuf->fields.sfmt_st_plus.f
1944 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1945 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1947 /* Record the fields for the semantic handler. */
1950 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1951 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1952 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_st_plus", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1954 #if WITH_PROFILE_MODEL_P
1955 /* Record the fields for profiling. */
1956 if (PROFILE_MODEL_P (current_cpu
))
1958 FLD (in_src1
) = f_r1
;
1959 FLD (in_src2
) = f_r2
;
1960 FLD (out_src2
) = f_r2
;
1969 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1970 CGEN_INSN_INT insn
= entire_insn
;
1971 #define FLD(f) abuf->fields.sfmt_trap.f
1974 f_uimm4
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1976 /* Record the fields for the semantic handler. */
1977 FLD (f_uimm4
) = f_uimm4
;
1978 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_trap", "f_uimm4 0x%x", 'x', f_uimm4
, (char *) 0));
1980 #if WITH_PROFILE_MODEL_P
1981 /* Record the fields for profiling. */
1982 if (PROFILE_MODEL_P (current_cpu
))
1990 extract_sfmt_unlock
:
1992 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
1993 CGEN_INSN_INT insn
= entire_insn
;
1994 #define FLD(f) abuf->fields.sfmt_st_plus.f
1998 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1999 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2001 /* Record the fields for the semantic handler. */
2004 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2005 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2006 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_unlock", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2008 #if WITH_PROFILE_MODEL_P
2009 /* Record the fields for profiling. */
2010 if (PROFILE_MODEL_P (current_cpu
))
2012 FLD (in_src1
) = f_r1
;
2013 FLD (in_src2
) = f_r2
;
2020 extract_sfmt_clrpsw
:
2022 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
2023 CGEN_INSN_INT insn
= entire_insn
;
2024 #define FLD(f) abuf->fields.sfmt_clrpsw.f
2027 f_uimm8
= EXTRACT_MSB0_UINT (insn
, 16, 8, 8);
2029 /* Record the fields for the semantic handler. */
2030 FLD (f_uimm8
) = f_uimm8
;
2031 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_clrpsw", "f_uimm8 0x%x", 'x', f_uimm8
, (char *) 0));
2037 extract_sfmt_setpsw
:
2039 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
2040 CGEN_INSN_INT insn
= entire_insn
;
2041 #define FLD(f) abuf->fields.sfmt_clrpsw.f
2044 f_uimm8
= EXTRACT_MSB0_UINT (insn
, 16, 8, 8);
2046 /* Record the fields for the semantic handler. */
2047 FLD (f_uimm8
) = f_uimm8
;
2048 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_setpsw", "f_uimm8 0x%x", 'x', f_uimm8
, (char *) 0));
2056 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
2057 CGEN_INSN_INT insn
= entire_insn
;
2058 #define FLD(f) abuf->fields.sfmt_bset.f
2063 f_uimm3
= EXTRACT_MSB0_UINT (insn
, 32, 5, 3);
2064 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
2065 f_simm16
= EXTRACT_MSB0_INT (insn
, 32, 16, 16);
2067 /* Record the fields for the semantic handler. */
2068 FLD (f_simm16
) = f_simm16
;
2070 FLD (f_uimm3
) = f_uimm3
;
2071 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
2072 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bset", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_uimm3 0x%x", 'x', f_uimm3
, "sr 0x%x", 'x', f_r2
, (char *) 0));
2074 #if WITH_PROFILE_MODEL_P
2075 /* Record the fields for profiling. */
2076 if (PROFILE_MODEL_P (current_cpu
))
2087 const IDESC
*idesc
= &m32rbf_insn_data
[itype
];
2088 CGEN_INSN_INT insn
= entire_insn
;
2089 #define FLD(f) abuf->fields.sfmt_bset.f
2093 f_uimm3
= EXTRACT_MSB0_UINT (insn
, 16, 5, 3);
2094 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2096 /* Record the fields for the semantic handler. */
2098 FLD (f_uimm3
) = f_uimm3
;
2099 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
2100 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_btst", "f_r2 0x%x", 'x', f_r2
, "f_uimm3 0x%x", 'x', f_uimm3
, "sr 0x%x", 'x', f_r2
, (char *) 0));
2102 #if WITH_PROFILE_MODEL_P
2103 /* Record the fields for profiling. */
2104 if (PROFILE_MODEL_P (current_cpu
))