Commit | Line | Data |
---|---|---|
646c6f2b DE |
1 | /* Simulator instruction extractor for m32r. |
2 | ||
b8a9943d DE |
3 | This file is machine generated with CGEN. |
4 | ||
9d70630e | 5 | Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. |
646c6f2b | 6 | |
9d70630e | 7 | This file is part of the GNU Simulators. |
646c6f2b DE |
8 | |
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) | |
12 | any later version. | |
13 | ||
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. | |
18 | ||
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. | |
22 | ||
23 | */ | |
24 | ||
9d70630e DE |
25 | #define WANT_CPU |
26 | #define WANT_CPU_M32R | |
27 | ||
646c6f2b | 28 | #include "sim-main.h" |
646c6f2b DE |
29 | #include "cpu-sim.h" |
30 | ||
31 | void | |
e0a85af6 | 32 | EX_FN_NAME (m32r,fmt_add) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 33 | { |
e0a85af6 DE |
34 | #define FLD(f) abuf->fields.fmt_add.f |
35 | EXTRACT_FMT_ADD_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 36 | |
e0a85af6 | 37 | EXTRACT_FMT_ADD_CODE |
646c6f2b DE |
38 | |
39 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
40 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
41 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 42 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_add", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
43 | |
44 | abuf->length = length; | |
45 | abuf->addr = pc; | |
46 | ||
47 | #if WITH_PROFILE_MODEL_P | |
48 | /* Record the fields for profiling. */ | |
49 | if (PROFILE_MODEL_P (current_cpu)) | |
50 | { | |
51 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
52 | abuf->h_gr_set = 0 | (1 << f_r1); | |
53 | } | |
54 | #endif | |
55 | #undef FLD | |
56 | } | |
57 | ||
58 | void | |
e0a85af6 | 59 | EX_FN_NAME (m32r,fmt_add3) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 60 | { |
e0a85af6 DE |
61 | #define FLD(f) abuf->fields.fmt_add3.f |
62 | EXTRACT_FMT_ADD3_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
9d70630e | 63 | |
e0a85af6 | 64 | EXTRACT_FMT_ADD3_CODE |
646c6f2b DE |
65 | |
66 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
67 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
68 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
646c6f2b | 69 | FLD (f_simm16) = f_simm16; |
e0a85af6 | 70 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_add3", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "slo16 0x%x", 'x', f_simm16, (char *) 0)); |
646c6f2b DE |
71 | |
72 | abuf->length = length; | |
73 | abuf->addr = pc; | |
74 | ||
75 | #if WITH_PROFILE_MODEL_P | |
76 | /* Record the fields for profiling. */ | |
77 | if (PROFILE_MODEL_P (current_cpu)) | |
78 | { | |
79 | abuf->h_gr_get = 0 | (1 << f_r2); | |
80 | abuf->h_gr_set = 0 | (1 << f_r1); | |
81 | } | |
82 | #endif | |
83 | #undef FLD | |
84 | } | |
85 | ||
86 | void | |
e0a85af6 | 87 | EX_FN_NAME (m32r,fmt_and3) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 88 | { |
e0a85af6 DE |
89 | #define FLD(f) abuf->fields.fmt_and3.f |
90 | EXTRACT_FMT_AND3_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */ | |
9d70630e | 91 | |
e0a85af6 | 92 | EXTRACT_FMT_AND3_CODE |
646c6f2b DE |
93 | |
94 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
95 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
96 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
97 | FLD (f_uimm16) = f_uimm16; | |
e0a85af6 | 98 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_and3", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "uimm16 0x%x", 'x', f_uimm16, (char *) 0)); |
646c6f2b DE |
99 | |
100 | abuf->length = length; | |
101 | abuf->addr = pc; | |
102 | ||
103 | #if WITH_PROFILE_MODEL_P | |
104 | /* Record the fields for profiling. */ | |
105 | if (PROFILE_MODEL_P (current_cpu)) | |
106 | { | |
9d70630e | 107 | abuf->h_gr_get = 0 | (1 << f_r2); |
646c6f2b DE |
108 | abuf->h_gr_set = 0 | (1 << f_r1); |
109 | } | |
110 | #endif | |
111 | #undef FLD | |
112 | } | |
113 | ||
114 | void | |
e0a85af6 | 115 | EX_FN_NAME (m32r,fmt_or3) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 116 | { |
e0a85af6 DE |
117 | #define FLD(f) abuf->fields.fmt_or3.f |
118 | EXTRACT_FMT_OR3_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */ | |
9d70630e | 119 | |
e0a85af6 | 120 | EXTRACT_FMT_OR3_CODE |
646c6f2b DE |
121 | |
122 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
123 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
124 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
646c6f2b | 125 | FLD (f_uimm16) = f_uimm16; |
e0a85af6 | 126 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_or3", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "ulo16 0x%x", 'x', f_uimm16, (char *) 0)); |
646c6f2b DE |
127 | |
128 | abuf->length = length; | |
129 | abuf->addr = pc; | |
130 | ||
131 | #if WITH_PROFILE_MODEL_P | |
132 | /* Record the fields for profiling. */ | |
133 | if (PROFILE_MODEL_P (current_cpu)) | |
134 | { | |
135 | abuf->h_gr_get = 0 | (1 << f_r2); | |
136 | abuf->h_gr_set = 0 | (1 << f_r1); | |
137 | } | |
138 | #endif | |
139 | #undef FLD | |
140 | } | |
141 | ||
142 | void | |
e0a85af6 | 143 | EX_FN_NAME (m32r,fmt_addi) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 144 | { |
e0a85af6 DE |
145 | #define FLD(f) abuf->fields.fmt_addi.f |
146 | EXTRACT_FMT_ADDI_VARS /* f-op1 f-r1 f-simm8 */ | |
9d70630e | 147 | |
e0a85af6 | 148 | EXTRACT_FMT_ADDI_CODE |
646c6f2b DE |
149 | |
150 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
151 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
152 | FLD (f_simm8) = f_simm8; | |
e0a85af6 | 153 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_addi", "dr 0x%x", 'x', f_r1, "simm8 0x%x", 'x', f_simm8, (char *) 0)); |
646c6f2b DE |
154 | |
155 | abuf->length = length; | |
156 | abuf->addr = pc; | |
157 | ||
158 | #if WITH_PROFILE_MODEL_P | |
159 | /* Record the fields for profiling. */ | |
160 | if (PROFILE_MODEL_P (current_cpu)) | |
161 | { | |
9d70630e | 162 | abuf->h_gr_get = 0 | (1 << f_r1); |
646c6f2b DE |
163 | abuf->h_gr_set = 0 | (1 << f_r1); |
164 | } | |
165 | #endif | |
166 | #undef FLD | |
167 | } | |
168 | ||
169 | void | |
e0a85af6 | 170 | EX_FN_NAME (m32r,fmt_addv) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 171 | { |
e0a85af6 DE |
172 | #define FLD(f) abuf->fields.fmt_addv.f |
173 | EXTRACT_FMT_ADDV_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 174 | |
e0a85af6 | 175 | EXTRACT_FMT_ADDV_CODE |
b8641a4d DE |
176 | |
177 | /* Record the fields for the semantic handler. */ | |
178 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
179 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 180 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_addv", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0)); |
b8641a4d DE |
181 | |
182 | abuf->length = length; | |
183 | abuf->addr = pc; | |
184 | ||
185 | #if WITH_PROFILE_MODEL_P | |
186 | /* Record the fields for profiling. */ | |
187 | if (PROFILE_MODEL_P (current_cpu)) | |
188 | { | |
189 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
190 | abuf->h_gr_set = 0 | (1 << f_r1); | |
191 | } | |
192 | #endif | |
193 | #undef FLD | |
194 | } | |
195 | ||
196 | void | |
e0a85af6 | 197 | EX_FN_NAME (m32r,fmt_addv3) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 198 | { |
e0a85af6 DE |
199 | #define FLD(f) abuf->fields.fmt_addv3.f |
200 | EXTRACT_FMT_ADDV3_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
b8641a4d | 201 | |
e0a85af6 | 202 | EXTRACT_FMT_ADDV3_CODE |
646c6f2b DE |
203 | |
204 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
205 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
206 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
207 | FLD (f_simm16) = f_simm16; | |
e0a85af6 | 208 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_addv3", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "simm16 0x%x", 'x', f_simm16, (char *) 0)); |
646c6f2b DE |
209 | |
210 | abuf->length = length; | |
211 | abuf->addr = pc; | |
212 | ||
213 | #if WITH_PROFILE_MODEL_P | |
214 | /* Record the fields for profiling. */ | |
215 | if (PROFILE_MODEL_P (current_cpu)) | |
216 | { | |
217 | abuf->h_gr_get = 0 | (1 << f_r2); | |
218 | abuf->h_gr_set = 0 | (1 << f_r1); | |
219 | } | |
220 | #endif | |
221 | #undef FLD | |
222 | } | |
223 | ||
224 | void | |
e0a85af6 | 225 | EX_FN_NAME (m32r,fmt_addx) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 226 | { |
e0a85af6 DE |
227 | #define FLD(f) abuf->fields.fmt_addx.f |
228 | EXTRACT_FMT_ADDX_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 229 | |
e0a85af6 | 230 | EXTRACT_FMT_ADDX_CODE |
646c6f2b DE |
231 | |
232 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
233 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
234 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 235 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_addx", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
236 | |
237 | abuf->length = length; | |
238 | abuf->addr = pc; | |
239 | ||
240 | #if WITH_PROFILE_MODEL_P | |
241 | /* Record the fields for profiling. */ | |
242 | if (PROFILE_MODEL_P (current_cpu)) | |
243 | { | |
244 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
245 | abuf->h_gr_set = 0 | (1 << f_r1); | |
246 | } | |
247 | #endif | |
248 | #undef FLD | |
249 | } | |
250 | ||
251 | void | |
e0a85af6 | 252 | EX_FN_NAME (m32r,fmt_bc8) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 253 | { |
e0a85af6 DE |
254 | #define FLD(f) abuf->fields.fmt_bc8.f |
255 | EXTRACT_FMT_BC8_VARS /* f-op1 f-r1 f-disp8 */ | |
9d70630e | 256 | |
e0a85af6 | 257 | EXTRACT_FMT_BC8_CODE |
646c6f2b DE |
258 | |
259 | /* Record the fields for the semantic handler. */ | |
9d70630e | 260 | RECORD_IADDR (FLD (f_disp8), (pc & -4L) + f_disp8); |
e0a85af6 | 261 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_bc8", "disp8 0x%x", 'x', f_disp8, (char *) 0)); |
646c6f2b DE |
262 | |
263 | abuf->length = length; | |
264 | abuf->addr = pc; | |
646c6f2b DE |
265 | #undef FLD |
266 | } | |
267 | ||
268 | void | |
e0a85af6 | 269 | EX_FN_NAME (m32r,fmt_bc24) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 270 | { |
e0a85af6 DE |
271 | #define FLD(f) abuf->fields.fmt_bc24.f |
272 | EXTRACT_FMT_BC24_VARS /* f-op1 f-r1 f-disp24 */ | |
9d70630e | 273 | |
e0a85af6 | 274 | EXTRACT_FMT_BC24_CODE |
646c6f2b DE |
275 | |
276 | /* Record the fields for the semantic handler. */ | |
9d70630e | 277 | RECORD_IADDR (FLD (f_disp24), pc + f_disp24); |
e0a85af6 | 278 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_bc24", "disp24 0x%x", 'x', f_disp24, (char *) 0)); |
646c6f2b DE |
279 | |
280 | abuf->length = length; | |
281 | abuf->addr = pc; | |
646c6f2b DE |
282 | #undef FLD |
283 | } | |
284 | ||
285 | void | |
e0a85af6 | 286 | EX_FN_NAME (m32r,fmt_beq) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 287 | { |
e0a85af6 DE |
288 | #define FLD(f) abuf->fields.fmt_beq.f |
289 | EXTRACT_FMT_BEQ_VARS /* f-op1 f-r1 f-op2 f-r2 f-disp16 */ | |
9d70630e | 290 | |
e0a85af6 | 291 | EXTRACT_FMT_BEQ_CODE |
646c6f2b DE |
292 | |
293 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
294 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
295 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
296 | RECORD_IADDR (FLD (f_disp16), pc + f_disp16); | |
e0a85af6 | 297 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_beq", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, "disp16 0x%x", 'x', f_disp16, (char *) 0)); |
646c6f2b DE |
298 | |
299 | abuf->length = length; | |
300 | abuf->addr = pc; | |
301 | ||
302 | #if WITH_PROFILE_MODEL_P | |
303 | /* Record the fields for profiling. */ | |
304 | if (PROFILE_MODEL_P (current_cpu)) | |
305 | { | |
306 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
646c6f2b DE |
307 | } |
308 | #endif | |
309 | #undef FLD | |
310 | } | |
311 | ||
312 | void | |
e0a85af6 | 313 | EX_FN_NAME (m32r,fmt_beqz) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 314 | { |
e0a85af6 DE |
315 | #define FLD(f) abuf->fields.fmt_beqz.f |
316 | EXTRACT_FMT_BEQZ_VARS /* f-op1 f-r1 f-op2 f-r2 f-disp16 */ | |
9d70630e | 317 | |
e0a85af6 | 318 | EXTRACT_FMT_BEQZ_CODE |
646c6f2b DE |
319 | |
320 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
321 | FLD (f_r2) = & CPU (h_gr)[f_r2]; |
322 | RECORD_IADDR (FLD (f_disp16), pc + f_disp16); | |
e0a85af6 | 323 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_beqz", "src2 0x%x", 'x', f_r2, "disp16 0x%x", 'x', f_disp16, (char *) 0)); |
646c6f2b DE |
324 | |
325 | abuf->length = length; | |
326 | abuf->addr = pc; | |
327 | ||
328 | #if WITH_PROFILE_MODEL_P | |
329 | /* Record the fields for profiling. */ | |
330 | if (PROFILE_MODEL_P (current_cpu)) | |
331 | { | |
332 | abuf->h_gr_get = 0 | (1 << f_r2); | |
646c6f2b DE |
333 | } |
334 | #endif | |
335 | #undef FLD | |
336 | } | |
337 | ||
338 | void | |
e0a85af6 | 339 | EX_FN_NAME (m32r,fmt_bl8) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 340 | { |
e0a85af6 DE |
341 | #define FLD(f) abuf->fields.fmt_bl8.f |
342 | EXTRACT_FMT_BL8_VARS /* f-op1 f-r1 f-disp8 */ | |
646c6f2b | 343 | |
e0a85af6 | 344 | EXTRACT_FMT_BL8_CODE |
646c6f2b DE |
345 | |
346 | /* Record the fields for the semantic handler. */ | |
347 | RECORD_IADDR (FLD (f_disp8), (pc & -4L) + f_disp8); | |
e0a85af6 | 348 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_bl8", "disp8 0x%x", 'x', f_disp8, (char *) 0)); |
646c6f2b DE |
349 | |
350 | abuf->length = length; | |
351 | abuf->addr = pc; | |
b8a9943d DE |
352 | |
353 | #if WITH_PROFILE_MODEL_P | |
354 | /* Record the fields for profiling. */ | |
355 | if (PROFILE_MODEL_P (current_cpu)) | |
356 | { | |
357 | abuf->h_gr_set = 0 | (1 << 14); | |
358 | } | |
359 | #endif | |
646c6f2b DE |
360 | #undef FLD |
361 | } | |
362 | ||
363 | void | |
e0a85af6 | 364 | EX_FN_NAME (m32r,fmt_bl24) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 365 | { |
e0a85af6 DE |
366 | #define FLD(f) abuf->fields.fmt_bl24.f |
367 | EXTRACT_FMT_BL24_VARS /* f-op1 f-r1 f-disp24 */ | |
9d70630e | 368 | |
e0a85af6 | 369 | EXTRACT_FMT_BL24_CODE |
646c6f2b DE |
370 | |
371 | /* Record the fields for the semantic handler. */ | |
372 | RECORD_IADDR (FLD (f_disp24), pc + f_disp24); | |
e0a85af6 | 373 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_bl24", "disp24 0x%x", 'x', f_disp24, (char *) 0)); |
646c6f2b DE |
374 | |
375 | abuf->length = length; | |
376 | abuf->addr = pc; | |
b8a9943d DE |
377 | |
378 | #if WITH_PROFILE_MODEL_P | |
379 | /* Record the fields for profiling. */ | |
380 | if (PROFILE_MODEL_P (current_cpu)) | |
381 | { | |
382 | abuf->h_gr_set = 0 | (1 << 14); | |
383 | } | |
384 | #endif | |
646c6f2b DE |
385 | #undef FLD |
386 | } | |
387 | ||
388 | void | |
e0a85af6 | 389 | EX_FN_NAME (m32r,fmt_bra8) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 390 | { |
e0a85af6 DE |
391 | #define FLD(f) abuf->fields.fmt_bra8.f |
392 | EXTRACT_FMT_BRA8_VARS /* f-op1 f-r1 f-disp8 */ | |
9d70630e | 393 | |
e0a85af6 | 394 | EXTRACT_FMT_BRA8_CODE |
646c6f2b DE |
395 | |
396 | /* Record the fields for the semantic handler. */ | |
9d70630e | 397 | RECORD_IADDR (FLD (f_disp8), (pc & -4L) + f_disp8); |
e0a85af6 | 398 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_bra8", "disp8 0x%x", 'x', f_disp8, (char *) 0)); |
646c6f2b DE |
399 | |
400 | abuf->length = length; | |
401 | abuf->addr = pc; | |
646c6f2b DE |
402 | #undef FLD |
403 | } | |
404 | ||
405 | void | |
e0a85af6 | 406 | EX_FN_NAME (m32r,fmt_bra24) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 407 | { |
e0a85af6 DE |
408 | #define FLD(f) abuf->fields.fmt_bra24.f |
409 | EXTRACT_FMT_BRA24_VARS /* f-op1 f-r1 f-disp24 */ | |
9d70630e | 410 | |
e0a85af6 | 411 | EXTRACT_FMT_BRA24_CODE |
646c6f2b DE |
412 | |
413 | /* Record the fields for the semantic handler. */ | |
9d70630e | 414 | RECORD_IADDR (FLD (f_disp24), pc + f_disp24); |
e0a85af6 | 415 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_bra24", "disp24 0x%x", 'x', f_disp24, (char *) 0)); |
646c6f2b DE |
416 | |
417 | abuf->length = length; | |
418 | abuf->addr = pc; | |
646c6f2b DE |
419 | #undef FLD |
420 | } | |
421 | ||
422 | void | |
e0a85af6 | 423 | EX_FN_NAME (m32r,fmt_cmp) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 424 | { |
e0a85af6 DE |
425 | #define FLD(f) abuf->fields.fmt_cmp.f |
426 | EXTRACT_FMT_CMP_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 427 | |
e0a85af6 | 428 | EXTRACT_FMT_CMP_CODE |
646c6f2b DE |
429 | |
430 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
431 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
432 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 433 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_cmp", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
434 | |
435 | abuf->length = length; | |
436 | abuf->addr = pc; | |
437 | ||
438 | #if WITH_PROFILE_MODEL_P | |
439 | /* Record the fields for profiling. */ | |
440 | if (PROFILE_MODEL_P (current_cpu)) | |
441 | { | |
9d70630e | 442 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); |
646c6f2b DE |
443 | } |
444 | #endif | |
445 | #undef FLD | |
446 | } | |
447 | ||
448 | void | |
e0a85af6 | 449 | EX_FN_NAME (m32r,fmt_cmpi) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 450 | { |
e0a85af6 DE |
451 | #define FLD(f) abuf->fields.fmt_cmpi.f |
452 | EXTRACT_FMT_CMPI_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
9d70630e | 453 | |
e0a85af6 | 454 | EXTRACT_FMT_CMPI_CODE |
646c6f2b DE |
455 | |
456 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
457 | FLD (f_r2) = & CPU (h_gr)[f_r2]; |
458 | FLD (f_simm16) = f_simm16; | |
e0a85af6 | 459 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_cmpi", "src2 0x%x", 'x', f_r2, "simm16 0x%x", 'x', f_simm16, (char *) 0)); |
646c6f2b DE |
460 | |
461 | abuf->length = length; | |
462 | abuf->addr = pc; | |
463 | ||
464 | #if WITH_PROFILE_MODEL_P | |
465 | /* Record the fields for profiling. */ | |
466 | if (PROFILE_MODEL_P (current_cpu)) | |
467 | { | |
468 | abuf->h_gr_get = 0 | (1 << f_r2); | |
469 | } | |
470 | #endif | |
471 | #undef FLD | |
472 | } | |
473 | ||
474 | void | |
e0a85af6 | 475 | EX_FN_NAME (m32r,fmt_div) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 476 | { |
e0a85af6 DE |
477 | #define FLD(f) abuf->fields.fmt_div.f |
478 | EXTRACT_FMT_DIV_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
9d70630e | 479 | |
e0a85af6 | 480 | EXTRACT_FMT_DIV_CODE |
646c6f2b DE |
481 | |
482 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
483 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
484 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 485 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_div", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
486 | |
487 | abuf->length = length; | |
488 | abuf->addr = pc; | |
489 | ||
490 | #if WITH_PROFILE_MODEL_P | |
491 | /* Record the fields for profiling. */ | |
492 | if (PROFILE_MODEL_P (current_cpu)) | |
493 | { | |
9d70630e DE |
494 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); |
495 | abuf->h_gr_set = 0 | (1 << f_r1); | |
646c6f2b DE |
496 | } |
497 | #endif | |
498 | #undef FLD | |
499 | } | |
500 | ||
501 | void | |
e0a85af6 | 502 | EX_FN_NAME (m32r,fmt_jl) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 503 | { |
e0a85af6 DE |
504 | #define FLD(f) abuf->fields.fmt_jl.f |
505 | EXTRACT_FMT_JL_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 506 | |
e0a85af6 | 507 | EXTRACT_FMT_JL_CODE |
646c6f2b DE |
508 | |
509 | /* Record the fields for the semantic handler. */ | |
9d70630e | 510 | FLD (f_r2) = & CPU (h_gr)[f_r2]; |
e0a85af6 | 511 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_jl", "sr 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
512 | |
513 | abuf->length = length; | |
514 | abuf->addr = pc; | |
515 | ||
516 | #if WITH_PROFILE_MODEL_P | |
517 | /* Record the fields for profiling. */ | |
518 | if (PROFILE_MODEL_P (current_cpu)) | |
519 | { | |
520 | abuf->h_gr_get = 0 | (1 << f_r2); | |
b8a9943d | 521 | abuf->h_gr_set = 0 | (1 << 14); |
646c6f2b DE |
522 | } |
523 | #endif | |
524 | #undef FLD | |
525 | } | |
526 | ||
527 | void | |
e0a85af6 | 528 | EX_FN_NAME (m32r,fmt_jmp) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 529 | { |
e0a85af6 DE |
530 | #define FLD(f) abuf->fields.fmt_jmp.f |
531 | EXTRACT_FMT_JMP_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 532 | |
e0a85af6 | 533 | EXTRACT_FMT_JMP_CODE |
646c6f2b DE |
534 | |
535 | /* Record the fields for the semantic handler. */ | |
9d70630e | 536 | FLD (f_r2) = & CPU (h_gr)[f_r2]; |
e0a85af6 | 537 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_jmp", "sr 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
538 | |
539 | abuf->length = length; | |
540 | abuf->addr = pc; | |
541 | ||
542 | #if WITH_PROFILE_MODEL_P | |
543 | /* Record the fields for profiling. */ | |
544 | if (PROFILE_MODEL_P (current_cpu)) | |
545 | { | |
9d70630e | 546 | abuf->h_gr_get = 0 | (1 << f_r2); |
646c6f2b DE |
547 | } |
548 | #endif | |
549 | #undef FLD | |
550 | } | |
551 | ||
552 | void | |
e0a85af6 | 553 | EX_FN_NAME (m32r,fmt_ld) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 554 | { |
e0a85af6 DE |
555 | #define FLD(f) abuf->fields.fmt_ld.f |
556 | EXTRACT_FMT_LD_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 557 | |
e0a85af6 | 558 | EXTRACT_FMT_LD_CODE |
646c6f2b DE |
559 | |
560 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
561 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
562 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 563 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_ld", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
564 | |
565 | abuf->length = length; | |
566 | abuf->addr = pc; | |
567 | ||
568 | #if WITH_PROFILE_MODEL_P | |
569 | /* Record the fields for profiling. */ | |
570 | if (PROFILE_MODEL_P (current_cpu)) | |
571 | { | |
9d70630e DE |
572 | abuf->h_gr_get = 0 | (1 << f_r2); |
573 | abuf->h_gr_set = 0 | (1 << f_r1); | |
646c6f2b DE |
574 | } |
575 | #endif | |
576 | #undef FLD | |
577 | } | |
578 | ||
579 | void | |
e0a85af6 | 580 | EX_FN_NAME (m32r,fmt_ld_d) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 581 | { |
e0a85af6 DE |
582 | #define FLD(f) abuf->fields.fmt_ld_d.f |
583 | EXTRACT_FMT_LD_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
646c6f2b | 584 | |
e0a85af6 | 585 | EXTRACT_FMT_LD_D_CODE |
646c6f2b DE |
586 | |
587 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
588 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
589 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
590 | FLD (f_simm16) = f_simm16; | |
e0a85af6 | 591 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_ld_d", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "slo16 0x%x", 'x', f_simm16, (char *) 0)); |
646c6f2b DE |
592 | |
593 | abuf->length = length; | |
594 | abuf->addr = pc; | |
595 | ||
596 | #if WITH_PROFILE_MODEL_P | |
597 | /* Record the fields for profiling. */ | |
598 | if (PROFILE_MODEL_P (current_cpu)) | |
599 | { | |
9d70630e DE |
600 | abuf->h_gr_get = 0 | (1 << f_r2); |
601 | abuf->h_gr_set = 0 | (1 << f_r1); | |
646c6f2b DE |
602 | } |
603 | #endif | |
604 | #undef FLD | |
605 | } | |
606 | ||
607 | void | |
e0a85af6 | 608 | EX_FN_NAME (m32r,fmt_ldb) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 609 | { |
e0a85af6 DE |
610 | #define FLD(f) abuf->fields.fmt_ldb.f |
611 | EXTRACT_FMT_LDB_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
646c6f2b | 612 | |
e0a85af6 | 613 | EXTRACT_FMT_LDB_CODE |
646c6f2b DE |
614 | |
615 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
616 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
617 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 618 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_ldb", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
619 | |
620 | abuf->length = length; | |
621 | abuf->addr = pc; | |
622 | ||
623 | #if WITH_PROFILE_MODEL_P | |
624 | /* Record the fields for profiling. */ | |
625 | if (PROFILE_MODEL_P (current_cpu)) | |
626 | { | |
9d70630e DE |
627 | abuf->h_gr_get = 0 | (1 << f_r2); |
628 | abuf->h_gr_set = 0 | (1 << f_r1); | |
646c6f2b DE |
629 | } |
630 | #endif | |
631 | #undef FLD | |
632 | } | |
633 | ||
634 | void | |
e0a85af6 | 635 | EX_FN_NAME (m32r,fmt_ldb_d) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 636 | { |
e0a85af6 DE |
637 | #define FLD(f) abuf->fields.fmt_ldb_d.f |
638 | EXTRACT_FMT_LDB_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
9d70630e | 639 | |
e0a85af6 | 640 | EXTRACT_FMT_LDB_D_CODE |
646c6f2b DE |
641 | |
642 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
643 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
644 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
646c6f2b | 645 | FLD (f_simm16) = f_simm16; |
e0a85af6 | 646 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_ldb_d", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "slo16 0x%x", 'x', f_simm16, (char *) 0)); |
646c6f2b DE |
647 | |
648 | abuf->length = length; | |
649 | abuf->addr = pc; | |
650 | ||
651 | #if WITH_PROFILE_MODEL_P | |
652 | /* Record the fields for profiling. */ | |
653 | if (PROFILE_MODEL_P (current_cpu)) | |
654 | { | |
655 | abuf->h_gr_get = 0 | (1 << f_r2); | |
9d70630e | 656 | abuf->h_gr_set = 0 | (1 << f_r1); |
646c6f2b DE |
657 | } |
658 | #endif | |
659 | #undef FLD | |
660 | } | |
661 | ||
662 | void | |
e0a85af6 | 663 | EX_FN_NAME (m32r,fmt_ldh) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 664 | { |
e0a85af6 DE |
665 | #define FLD(f) abuf->fields.fmt_ldh.f |
666 | EXTRACT_FMT_LDH_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 667 | |
e0a85af6 | 668 | EXTRACT_FMT_LDH_CODE |
646c6f2b DE |
669 | |
670 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
671 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
672 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 673 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_ldh", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
674 | |
675 | abuf->length = length; | |
676 | abuf->addr = pc; | |
677 | ||
678 | #if WITH_PROFILE_MODEL_P | |
679 | /* Record the fields for profiling. */ | |
680 | if (PROFILE_MODEL_P (current_cpu)) | |
681 | { | |
9d70630e DE |
682 | abuf->h_gr_get = 0 | (1 << f_r2); |
683 | abuf->h_gr_set = 0 | (1 << f_r1); | |
646c6f2b DE |
684 | } |
685 | #endif | |
686 | #undef FLD | |
687 | } | |
688 | ||
689 | void | |
e0a85af6 | 690 | EX_FN_NAME (m32r,fmt_ldh_d) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 691 | { |
e0a85af6 DE |
692 | #define FLD(f) abuf->fields.fmt_ldh_d.f |
693 | EXTRACT_FMT_LDH_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
9d70630e | 694 | |
e0a85af6 | 695 | EXTRACT_FMT_LDH_D_CODE |
646c6f2b DE |
696 | |
697 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
698 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
699 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
700 | FLD (f_simm16) = f_simm16; | |
e0a85af6 | 701 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_ldh_d", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "slo16 0x%x", 'x', f_simm16, (char *) 0)); |
646c6f2b DE |
702 | |
703 | abuf->length = length; | |
704 | abuf->addr = pc; | |
705 | ||
706 | #if WITH_PROFILE_MODEL_P | |
707 | /* Record the fields for profiling. */ | |
708 | if (PROFILE_MODEL_P (current_cpu)) | |
709 | { | |
710 | abuf->h_gr_get = 0 | (1 << f_r2); | |
9d70630e | 711 | abuf->h_gr_set = 0 | (1 << f_r1); |
646c6f2b DE |
712 | } |
713 | #endif | |
714 | #undef FLD | |
715 | } | |
716 | ||
717 | void | |
e0a85af6 | 718 | EX_FN_NAME (m32r,fmt_ld_plus) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 719 | { |
e0a85af6 DE |
720 | #define FLD(f) abuf->fields.fmt_ld_plus.f |
721 | EXTRACT_FMT_LD_PLUS_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 722 | |
e0a85af6 | 723 | EXTRACT_FMT_LD_PLUS_CODE |
b8641a4d DE |
724 | |
725 | /* Record the fields for the semantic handler. */ | |
726 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
727 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 728 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_ld_plus", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0)); |
b8641a4d DE |
729 | |
730 | abuf->length = length; | |
731 | abuf->addr = pc; | |
732 | ||
733 | #if WITH_PROFILE_MODEL_P | |
734 | /* Record the fields for profiling. */ | |
735 | if (PROFILE_MODEL_P (current_cpu)) | |
736 | { | |
737 | abuf->h_gr_get = 0 | (1 << f_r2); | |
738 | abuf->h_gr_set = 0 | (1 << f_r1) | (1 << f_r2); | |
739 | } | |
740 | #endif | |
741 | #undef FLD | |
742 | } | |
743 | ||
744 | void | |
e0a85af6 | 745 | EX_FN_NAME (m32r,fmt_ld24) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 746 | { |
e0a85af6 DE |
747 | #define FLD(f) abuf->fields.fmt_ld24.f |
748 | EXTRACT_FMT_LD24_VARS /* f-op1 f-r1 f-uimm24 */ | |
b8641a4d | 749 | |
e0a85af6 | 750 | EXTRACT_FMT_LD24_CODE |
646c6f2b DE |
751 | |
752 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
753 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
754 | FLD (f_uimm24) = f_uimm24; | |
e0a85af6 | 755 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_ld24", "dr 0x%x", 'x', f_r1, "uimm24 0x%x", 'x', f_uimm24, (char *) 0)); |
646c6f2b DE |
756 | |
757 | abuf->length = length; | |
758 | abuf->addr = pc; | |
759 | ||
760 | #if WITH_PROFILE_MODEL_P | |
761 | /* Record the fields for profiling. */ | |
762 | if (PROFILE_MODEL_P (current_cpu)) | |
763 | { | |
646c6f2b DE |
764 | abuf->h_gr_set = 0 | (1 << f_r1); |
765 | } | |
766 | #endif | |
767 | #undef FLD | |
768 | } | |
769 | ||
770 | void | |
e0a85af6 | 771 | EX_FN_NAME (m32r,fmt_ldi8) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 772 | { |
e0a85af6 DE |
773 | #define FLD(f) abuf->fields.fmt_ldi8.f |
774 | EXTRACT_FMT_LDI8_VARS /* f-op1 f-r1 f-simm8 */ | |
9d70630e | 775 | |
e0a85af6 | 776 | EXTRACT_FMT_LDI8_CODE |
646c6f2b DE |
777 | |
778 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
779 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
780 | FLD (f_simm8) = f_simm8; | |
e0a85af6 | 781 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_ldi8", "dr 0x%x", 'x', f_r1, "simm8 0x%x", 'x', f_simm8, (char *) 0)); |
646c6f2b DE |
782 | |
783 | abuf->length = length; | |
784 | abuf->addr = pc; | |
785 | ||
786 | #if WITH_PROFILE_MODEL_P | |
787 | /* Record the fields for profiling. */ | |
788 | if (PROFILE_MODEL_P (current_cpu)) | |
789 | { | |
646c6f2b DE |
790 | abuf->h_gr_set = 0 | (1 << f_r1); |
791 | } | |
792 | #endif | |
793 | #undef FLD | |
794 | } | |
795 | ||
796 | void | |
e0a85af6 | 797 | EX_FN_NAME (m32r,fmt_ldi16) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 798 | { |
e0a85af6 DE |
799 | #define FLD(f) abuf->fields.fmt_ldi16.f |
800 | EXTRACT_FMT_LDI16_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
9d70630e | 801 | |
e0a85af6 | 802 | EXTRACT_FMT_LDI16_CODE |
646c6f2b DE |
803 | |
804 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
805 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
806 | FLD (f_simm16) = f_simm16; | |
e0a85af6 | 807 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_ldi16", "dr 0x%x", 'x', f_r1, "slo16 0x%x", 'x', f_simm16, (char *) 0)); |
646c6f2b DE |
808 | |
809 | abuf->length = length; | |
810 | abuf->addr = pc; | |
811 | ||
812 | #if WITH_PROFILE_MODEL_P | |
813 | /* Record the fields for profiling. */ | |
814 | if (PROFILE_MODEL_P (current_cpu)) | |
815 | { | |
646c6f2b DE |
816 | abuf->h_gr_set = 0 | (1 << f_r1); |
817 | } | |
818 | #endif | |
819 | #undef FLD | |
820 | } | |
821 | ||
822 | void | |
e0a85af6 | 823 | EX_FN_NAME (m32r,fmt_lock) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 824 | { |
e0a85af6 DE |
825 | #define FLD(f) abuf->fields.fmt_lock.f |
826 | EXTRACT_FMT_LOCK_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
b8641a4d | 827 | |
e0a85af6 | 828 | EXTRACT_FMT_LOCK_CODE |
b8641a4d DE |
829 | |
830 | /* Record the fields for the semantic handler. */ | |
831 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
832 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 833 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_lock", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0)); |
b8641a4d DE |
834 | |
835 | abuf->length = length; | |
836 | abuf->addr = pc; | |
837 | ||
838 | #if WITH_PROFILE_MODEL_P | |
839 | /* Record the fields for profiling. */ | |
840 | if (PROFILE_MODEL_P (current_cpu)) | |
841 | { | |
cab58155 DE |
842 | abuf->h_gr_get = 0 | (1 << f_r2); |
843 | abuf->h_gr_set = 0 | (1 << f_r1); | |
b8641a4d DE |
844 | } |
845 | #endif | |
846 | #undef FLD | |
847 | } | |
848 | ||
849 | void | |
e0a85af6 | 850 | EX_FN_NAME (m32r,fmt_machi) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 851 | { |
e0a85af6 DE |
852 | #define FLD(f) abuf->fields.fmt_machi.f |
853 | EXTRACT_FMT_MACHI_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 854 | |
e0a85af6 | 855 | EXTRACT_FMT_MACHI_CODE |
646c6f2b DE |
856 | |
857 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
858 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
859 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 860 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_machi", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
861 | |
862 | abuf->length = length; | |
863 | abuf->addr = pc; | |
864 | ||
865 | #if WITH_PROFILE_MODEL_P | |
866 | /* Record the fields for profiling. */ | |
867 | if (PROFILE_MODEL_P (current_cpu)) | |
868 | { | |
869 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
646c6f2b DE |
870 | } |
871 | #endif | |
872 | #undef FLD | |
873 | } | |
874 | ||
875 | void | |
e0a85af6 | 876 | EX_FN_NAME (m32r,fmt_mulhi) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 877 | { |
e0a85af6 DE |
878 | #define FLD(f) abuf->fields.fmt_mulhi.f |
879 | EXTRACT_FMT_MULHI_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 880 | |
e0a85af6 | 881 | EXTRACT_FMT_MULHI_CODE |
646c6f2b DE |
882 | |
883 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
884 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
885 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 886 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_mulhi", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0)); |
b8641a4d DE |
887 | |
888 | abuf->length = length; | |
889 | abuf->addr = pc; | |
890 | ||
891 | #if WITH_PROFILE_MODEL_P | |
892 | /* Record the fields for profiling. */ | |
893 | if (PROFILE_MODEL_P (current_cpu)) | |
894 | { | |
895 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
896 | } | |
897 | #endif | |
898 | #undef FLD | |
899 | } | |
900 | ||
901 | void | |
e0a85af6 | 902 | EX_FN_NAME (m32r,fmt_mv) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 903 | { |
e0a85af6 DE |
904 | #define FLD(f) abuf->fields.fmt_mv.f |
905 | EXTRACT_FMT_MV_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
b8641a4d | 906 | |
e0a85af6 | 907 | EXTRACT_FMT_MV_CODE |
b8641a4d DE |
908 | |
909 | /* Record the fields for the semantic handler. */ | |
910 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
911 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 912 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_mv", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
913 | |
914 | abuf->length = length; | |
915 | abuf->addr = pc; | |
916 | ||
917 | #if WITH_PROFILE_MODEL_P | |
918 | /* Record the fields for profiling. */ | |
919 | if (PROFILE_MODEL_P (current_cpu)) | |
920 | { | |
921 | abuf->h_gr_get = 0 | (1 << f_r2); | |
9d70630e | 922 | abuf->h_gr_set = 0 | (1 << f_r1); |
646c6f2b DE |
923 | } |
924 | #endif | |
925 | #undef FLD | |
926 | } | |
927 | ||
928 | void | |
e0a85af6 | 929 | EX_FN_NAME (m32r,fmt_mvfachi) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 930 | { |
e0a85af6 DE |
931 | #define FLD(f) abuf->fields.fmt_mvfachi.f |
932 | EXTRACT_FMT_MVFACHI_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 933 | |
e0a85af6 | 934 | EXTRACT_FMT_MVFACHI_CODE |
646c6f2b DE |
935 | |
936 | /* Record the fields for the semantic handler. */ | |
9d70630e | 937 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
e0a85af6 | 938 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_mvfachi", "dr 0x%x", 'x', f_r1, (char *) 0)); |
646c6f2b DE |
939 | |
940 | abuf->length = length; | |
941 | abuf->addr = pc; | |
942 | ||
943 | #if WITH_PROFILE_MODEL_P | |
944 | /* Record the fields for profiling. */ | |
945 | if (PROFILE_MODEL_P (current_cpu)) | |
946 | { | |
9d70630e | 947 | abuf->h_gr_set = 0 | (1 << f_r1); |
646c6f2b DE |
948 | } |
949 | #endif | |
950 | #undef FLD | |
951 | } | |
952 | ||
953 | void | |
e0a85af6 | 954 | EX_FN_NAME (m32r,fmt_mvfc) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 955 | { |
e0a85af6 DE |
956 | #define FLD(f) abuf->fields.fmt_mvfc.f |
957 | EXTRACT_FMT_MVFC_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 958 | |
e0a85af6 | 959 | EXTRACT_FMT_MVFC_CODE |
646c6f2b DE |
960 | |
961 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
962 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
963 | FLD (f_r2) = f_r2; | |
e0a85af6 | 964 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_mvfc", "dr 0x%x", 'x', f_r1, "scr 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
965 | |
966 | abuf->length = length; | |
967 | abuf->addr = pc; | |
968 | ||
969 | #if WITH_PROFILE_MODEL_P | |
970 | /* Record the fields for profiling. */ | |
971 | if (PROFILE_MODEL_P (current_cpu)) | |
972 | { | |
646c6f2b DE |
973 | abuf->h_gr_set = 0 | (1 << f_r1); |
974 | } | |
975 | #endif | |
976 | #undef FLD | |
977 | } | |
978 | ||
979 | void | |
e0a85af6 | 980 | EX_FN_NAME (m32r,fmt_mvtachi) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 981 | { |
e0a85af6 DE |
982 | #define FLD(f) abuf->fields.fmt_mvtachi.f |
983 | EXTRACT_FMT_MVTACHI_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 984 | |
e0a85af6 | 985 | EXTRACT_FMT_MVTACHI_CODE |
646c6f2b DE |
986 | |
987 | /* Record the fields for the semantic handler. */ | |
9d70630e | 988 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
e0a85af6 | 989 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_mvtachi", "src1 0x%x", 'x', f_r1, (char *) 0)); |
646c6f2b DE |
990 | |
991 | abuf->length = length; | |
992 | abuf->addr = pc; | |
993 | ||
994 | #if WITH_PROFILE_MODEL_P | |
995 | /* Record the fields for profiling. */ | |
996 | if (PROFILE_MODEL_P (current_cpu)) | |
997 | { | |
9d70630e | 998 | abuf->h_gr_get = 0 | (1 << f_r1); |
646c6f2b DE |
999 | } |
1000 | #endif | |
1001 | #undef FLD | |
1002 | } | |
1003 | ||
1004 | void | |
e0a85af6 | 1005 | EX_FN_NAME (m32r,fmt_mvtc) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 1006 | { |
e0a85af6 DE |
1007 | #define FLD(f) abuf->fields.fmt_mvtc.f |
1008 | EXTRACT_FMT_MVTC_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 1009 | |
e0a85af6 | 1010 | EXTRACT_FMT_MVTC_CODE |
646c6f2b DE |
1011 | |
1012 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
1013 | FLD (f_r1) = f_r1; |
1014 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 1015 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_mvtc", "dcr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
1016 | |
1017 | abuf->length = length; | |
1018 | abuf->addr = pc; | |
1019 | ||
1020 | #if WITH_PROFILE_MODEL_P | |
1021 | /* Record the fields for profiling. */ | |
1022 | if (PROFILE_MODEL_P (current_cpu)) | |
1023 | { | |
1024 | abuf->h_gr_get = 0 | (1 << f_r2); | |
646c6f2b DE |
1025 | } |
1026 | #endif | |
1027 | #undef FLD | |
1028 | } | |
1029 | ||
1030 | void | |
e0a85af6 | 1031 | EX_FN_NAME (m32r,fmt_nop) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 1032 | { |
e0a85af6 DE |
1033 | #define FLD(f) abuf->fields.fmt_nop.f |
1034 | EXTRACT_FMT_NOP_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 1035 | |
e0a85af6 | 1036 | EXTRACT_FMT_NOP_CODE |
646c6f2b DE |
1037 | |
1038 | /* Record the fields for the semantic handler. */ | |
e0a85af6 | 1039 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_nop", (char *) 0)); |
646c6f2b DE |
1040 | |
1041 | abuf->length = length; | |
1042 | abuf->addr = pc; | |
646c6f2b DE |
1043 | #undef FLD |
1044 | } | |
1045 | ||
1046 | void | |
e0a85af6 | 1047 | EX_FN_NAME (m32r,fmt_rac) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 1048 | { |
e0a85af6 DE |
1049 | #define FLD(f) abuf->fields.fmt_rac.f |
1050 | EXTRACT_FMT_RAC_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 1051 | |
e0a85af6 | 1052 | EXTRACT_FMT_RAC_CODE |
646c6f2b DE |
1053 | |
1054 | /* Record the fields for the semantic handler. */ | |
e0a85af6 | 1055 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_rac", (char *) 0)); |
646c6f2b DE |
1056 | |
1057 | abuf->length = length; | |
1058 | abuf->addr = pc; | |
646c6f2b DE |
1059 | #undef FLD |
1060 | } | |
1061 | ||
1062 | void | |
e0a85af6 | 1063 | EX_FN_NAME (m32r,fmt_rte) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8a9943d | 1064 | { |
e0a85af6 DE |
1065 | #define FLD(f) abuf->fields.fmt_rte.f |
1066 | EXTRACT_FMT_RTE_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
b8a9943d | 1067 | |
e0a85af6 | 1068 | EXTRACT_FMT_RTE_CODE |
b8a9943d DE |
1069 | |
1070 | /* Record the fields for the semantic handler. */ | |
e0a85af6 | 1071 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_rte", (char *) 0)); |
b8a9943d DE |
1072 | |
1073 | abuf->length = length; | |
1074 | abuf->addr = pc; | |
1075 | #undef FLD | |
1076 | } | |
1077 | ||
1078 | void | |
e0a85af6 | 1079 | EX_FN_NAME (m32r,fmt_seth) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 1080 | { |
e0a85af6 DE |
1081 | #define FLD(f) abuf->fields.fmt_seth.f |
1082 | EXTRACT_FMT_SETH_VARS /* f-op1 f-r1 f-op2 f-r2 f-hi16 */ | |
9d70630e | 1083 | |
e0a85af6 | 1084 | EXTRACT_FMT_SETH_CODE |
646c6f2b DE |
1085 | |
1086 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
1087 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
1088 | FLD (f_hi16) = f_hi16; | |
e0a85af6 | 1089 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_seth", "dr 0x%x", 'x', f_r1, "hi16 0x%x", 'x', f_hi16, (char *) 0)); |
b8641a4d DE |
1090 | |
1091 | abuf->length = length; | |
1092 | abuf->addr = pc; | |
1093 | ||
1094 | #if WITH_PROFILE_MODEL_P | |
1095 | /* Record the fields for profiling. */ | |
1096 | if (PROFILE_MODEL_P (current_cpu)) | |
1097 | { | |
1098 | abuf->h_gr_set = 0 | (1 << f_r1); | |
1099 | } | |
1100 | #endif | |
1101 | #undef FLD | |
1102 | } | |
1103 | ||
1104 | void | |
e0a85af6 | 1105 | EX_FN_NAME (m32r,fmt_sll3) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 1106 | { |
e0a85af6 DE |
1107 | #define FLD(f) abuf->fields.fmt_sll3.f |
1108 | EXTRACT_FMT_SLL3_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
b8641a4d | 1109 | |
e0a85af6 | 1110 | EXTRACT_FMT_SLL3_CODE |
b8641a4d DE |
1111 | |
1112 | /* Record the fields for the semantic handler. */ | |
1113 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
1114 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
1115 | FLD (f_simm16) = f_simm16; | |
e0a85af6 | 1116 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_sll3", "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "simm16 0x%x", 'x', f_simm16, (char *) 0)); |
646c6f2b DE |
1117 | |
1118 | abuf->length = length; | |
1119 | abuf->addr = pc; | |
1120 | ||
1121 | #if WITH_PROFILE_MODEL_P | |
1122 | /* Record the fields for profiling. */ | |
1123 | if (PROFILE_MODEL_P (current_cpu)) | |
1124 | { | |
b8641a4d | 1125 | abuf->h_gr_get = 0 | (1 << f_r2); |
646c6f2b DE |
1126 | abuf->h_gr_set = 0 | (1 << f_r1); |
1127 | } | |
1128 | #endif | |
1129 | #undef FLD | |
1130 | } | |
1131 | ||
1132 | void | |
e0a85af6 | 1133 | EX_FN_NAME (m32r,fmt_slli) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 1134 | { |
e0a85af6 DE |
1135 | #define FLD(f) abuf->fields.fmt_slli.f |
1136 | EXTRACT_FMT_SLLI_VARS /* f-op1 f-r1 f-shift-op2 f-uimm5 */ | |
9d70630e | 1137 | |
e0a85af6 | 1138 | EXTRACT_FMT_SLLI_CODE |
646c6f2b DE |
1139 | |
1140 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
1141 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
1142 | FLD (f_uimm5) = f_uimm5; | |
e0a85af6 | 1143 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_slli", "dr 0x%x", 'x', f_r1, "uimm5 0x%x", 'x', f_uimm5, (char *) 0)); |
646c6f2b DE |
1144 | |
1145 | abuf->length = length; | |
1146 | abuf->addr = pc; | |
1147 | ||
1148 | #if WITH_PROFILE_MODEL_P | |
1149 | /* Record the fields for profiling. */ | |
1150 | if (PROFILE_MODEL_P (current_cpu)) | |
1151 | { | |
9d70630e | 1152 | abuf->h_gr_get = 0 | (1 << f_r1); |
646c6f2b DE |
1153 | abuf->h_gr_set = 0 | (1 << f_r1); |
1154 | } | |
1155 | #endif | |
1156 | #undef FLD | |
1157 | } | |
1158 | ||
1159 | void | |
e0a85af6 | 1160 | EX_FN_NAME (m32r,fmt_st) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 1161 | { |
e0a85af6 DE |
1162 | #define FLD(f) abuf->fields.fmt_st.f |
1163 | EXTRACT_FMT_ST_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
b8641a4d | 1164 | |
e0a85af6 | 1165 | EXTRACT_FMT_ST_CODE |
b8641a4d DE |
1166 | |
1167 | /* Record the fields for the semantic handler. */ | |
1168 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
1169 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 1170 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_st", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0)); |
b8641a4d DE |
1171 | |
1172 | abuf->length = length; | |
1173 | abuf->addr = pc; | |
1174 | ||
1175 | #if WITH_PROFILE_MODEL_P | |
1176 | /* Record the fields for profiling. */ | |
1177 | if (PROFILE_MODEL_P (current_cpu)) | |
1178 | { | |
1179 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
1180 | } | |
1181 | #endif | |
1182 | #undef FLD | |
1183 | } | |
1184 | ||
1185 | void | |
e0a85af6 | 1186 | EX_FN_NAME (m32r,fmt_st_d) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 1187 | { |
e0a85af6 DE |
1188 | #define FLD(f) abuf->fields.fmt_st_d.f |
1189 | EXTRACT_FMT_ST_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
9d70630e | 1190 | |
e0a85af6 | 1191 | EXTRACT_FMT_ST_D_CODE |
646c6f2b DE |
1192 | |
1193 | /* Record the fields for the semantic handler. */ | |
9d70630e DE |
1194 | FLD (f_r1) = & CPU (h_gr)[f_r1]; |
1195 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
646c6f2b | 1196 | FLD (f_simm16) = f_simm16; |
e0a85af6 | 1197 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_st_d", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, "slo16 0x%x", 'x', f_simm16, (char *) 0)); |
646c6f2b DE |
1198 | |
1199 | abuf->length = length; | |
1200 | abuf->addr = pc; | |
1201 | ||
1202 | #if WITH_PROFILE_MODEL_P | |
1203 | /* Record the fields for profiling. */ | |
1204 | if (PROFILE_MODEL_P (current_cpu)) | |
1205 | { | |
9d70630e | 1206 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); |
646c6f2b DE |
1207 | } |
1208 | #endif | |
1209 | #undef FLD | |
1210 | } | |
1211 | ||
1212 | void | |
e0a85af6 | 1213 | EX_FN_NAME (m32r,fmt_stb) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 1214 | { |
e0a85af6 DE |
1215 | #define FLD(f) abuf->fields.fmt_stb.f |
1216 | EXTRACT_FMT_STB_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
9d70630e | 1217 | |
e0a85af6 | 1218 | EXTRACT_FMT_STB_CODE |
b8641a4d DE |
1219 | |
1220 | /* Record the fields for the semantic handler. */ | |
1221 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
1222 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 1223 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_stb", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0)); |
b8641a4d DE |
1224 | |
1225 | abuf->length = length; | |
1226 | abuf->addr = pc; | |
1227 | ||
1228 | #if WITH_PROFILE_MODEL_P | |
1229 | /* Record the fields for profiling. */ | |
1230 | if (PROFILE_MODEL_P (current_cpu)) | |
1231 | { | |
1232 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
1233 | } | |
1234 | #endif | |
1235 | #undef FLD | |
1236 | } | |
1237 | ||
1238 | void | |
e0a85af6 | 1239 | EX_FN_NAME (m32r,fmt_stb_d) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 1240 | { |
e0a85af6 DE |
1241 | #define FLD(f) abuf->fields.fmt_stb_d.f |
1242 | EXTRACT_FMT_STB_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
b8641a4d | 1243 | |
e0a85af6 | 1244 | EXTRACT_FMT_STB_D_CODE |
b8641a4d DE |
1245 | |
1246 | /* Record the fields for the semantic handler. */ | |
1247 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
1248 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
1249 | FLD (f_simm16) = f_simm16; | |
e0a85af6 | 1250 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_stb_d", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, "slo16 0x%x", 'x', f_simm16, (char *) 0)); |
b8641a4d DE |
1251 | |
1252 | abuf->length = length; | |
1253 | abuf->addr = pc; | |
1254 | ||
1255 | #if WITH_PROFILE_MODEL_P | |
1256 | /* Record the fields for profiling. */ | |
1257 | if (PROFILE_MODEL_P (current_cpu)) | |
1258 | { | |
1259 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
1260 | } | |
1261 | #endif | |
1262 | #undef FLD | |
1263 | } | |
1264 | ||
1265 | void | |
e0a85af6 | 1266 | EX_FN_NAME (m32r,fmt_sth) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 1267 | { |
e0a85af6 DE |
1268 | #define FLD(f) abuf->fields.fmt_sth.f |
1269 | EXTRACT_FMT_STH_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
b8641a4d | 1270 | |
e0a85af6 | 1271 | EXTRACT_FMT_STH_CODE |
b8641a4d DE |
1272 | |
1273 | /* Record the fields for the semantic handler. */ | |
1274 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
1275 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 1276 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_sth", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0)); |
b8641a4d DE |
1277 | |
1278 | abuf->length = length; | |
1279 | abuf->addr = pc; | |
1280 | ||
1281 | #if WITH_PROFILE_MODEL_P | |
1282 | /* Record the fields for profiling. */ | |
1283 | if (PROFILE_MODEL_P (current_cpu)) | |
1284 | { | |
1285 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
1286 | } | |
1287 | #endif | |
1288 | #undef FLD | |
1289 | } | |
1290 | ||
1291 | void | |
e0a85af6 | 1292 | EX_FN_NAME (m32r,fmt_sth_d) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 1293 | { |
e0a85af6 DE |
1294 | #define FLD(f) abuf->fields.fmt_sth_d.f |
1295 | EXTRACT_FMT_STH_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */ | |
b8641a4d | 1296 | |
e0a85af6 | 1297 | EXTRACT_FMT_STH_D_CODE |
b8641a4d DE |
1298 | |
1299 | /* Record the fields for the semantic handler. */ | |
1300 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
1301 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
1302 | FLD (f_simm16) = f_simm16; | |
e0a85af6 | 1303 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_sth_d", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, "slo16 0x%x", 'x', f_simm16, (char *) 0)); |
b8641a4d DE |
1304 | |
1305 | abuf->length = length; | |
1306 | abuf->addr = pc; | |
1307 | ||
1308 | #if WITH_PROFILE_MODEL_P | |
1309 | /* Record the fields for profiling. */ | |
1310 | if (PROFILE_MODEL_P (current_cpu)) | |
1311 | { | |
1312 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
1313 | } | |
1314 | #endif | |
1315 | #undef FLD | |
1316 | } | |
1317 | ||
1318 | void | |
e0a85af6 | 1319 | EX_FN_NAME (m32r,fmt_st_plus) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 1320 | { |
e0a85af6 DE |
1321 | #define FLD(f) abuf->fields.fmt_st_plus.f |
1322 | EXTRACT_FMT_ST_PLUS_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
b8641a4d | 1323 | |
e0a85af6 | 1324 | EXTRACT_FMT_ST_PLUS_CODE |
b8641a4d DE |
1325 | |
1326 | /* Record the fields for the semantic handler. */ | |
1327 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
1328 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 1329 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_st_plus", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0)); |
b8641a4d DE |
1330 | |
1331 | abuf->length = length; | |
1332 | abuf->addr = pc; | |
1333 | ||
1334 | #if WITH_PROFILE_MODEL_P | |
1335 | /* Record the fields for profiling. */ | |
1336 | if (PROFILE_MODEL_P (current_cpu)) | |
1337 | { | |
1338 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
1339 | abuf->h_gr_set = 0 | (1 << f_r2); | |
1340 | } | |
1341 | #endif | |
1342 | #undef FLD | |
1343 | } | |
1344 | ||
1345 | void | |
e0a85af6 | 1346 | EX_FN_NAME (m32r,fmt_trap) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 1347 | { |
e0a85af6 DE |
1348 | #define FLD(f) abuf->fields.fmt_trap.f |
1349 | EXTRACT_FMT_TRAP_VARS /* f-op1 f-r1 f-op2 f-uimm4 */ | |
b8641a4d | 1350 | |
e0a85af6 | 1351 | EXTRACT_FMT_TRAP_CODE |
646c6f2b DE |
1352 | |
1353 | /* Record the fields for the semantic handler. */ | |
9d70630e | 1354 | FLD (f_uimm4) = f_uimm4; |
e0a85af6 | 1355 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_trap", "uimm4 0x%x", 'x', f_uimm4, (char *) 0)); |
b8641a4d DE |
1356 | |
1357 | abuf->length = length; | |
1358 | abuf->addr = pc; | |
1359 | #undef FLD | |
1360 | } | |
1361 | ||
1362 | void | |
e0a85af6 | 1363 | EX_FN_NAME (m32r,fmt_unlock) (SIM_CPU *current_cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
b8641a4d | 1364 | { |
e0a85af6 DE |
1365 | #define FLD(f) abuf->fields.fmt_unlock.f |
1366 | EXTRACT_FMT_UNLOCK_VARS /* f-op1 f-r1 f-op2 f-r2 */ | |
b8641a4d | 1367 | |
e0a85af6 | 1368 | EXTRACT_FMT_UNLOCK_CODE |
b8641a4d DE |
1369 | |
1370 | /* Record the fields for the semantic handler. */ | |
1371 | FLD (f_r1) = & CPU (h_gr)[f_r1]; | |
1372 | FLD (f_r2) = & CPU (h_gr)[f_r2]; | |
e0a85af6 | 1373 | TRACE_EXTRACT (current_cpu, (current_cpu, pc, "fmt_unlock", "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0)); |
646c6f2b DE |
1374 | |
1375 | abuf->length = length; | |
1376 | abuf->addr = pc; | |
b8641a4d DE |
1377 | |
1378 | #if WITH_PROFILE_MODEL_P | |
1379 | /* Record the fields for profiling. */ | |
1380 | if (PROFILE_MODEL_P (current_cpu)) | |
1381 | { | |
1382 | abuf->h_gr_get = 0 | (1 << f_r1) | (1 << f_r2); | |
1383 | } | |
1384 | #endif | |
646c6f2b DE |
1385 | #undef FLD |
1386 | } | |
1387 | ||
1388 | void | |
9d70630e | 1389 | EX_FN_NAME (m32r,illegal) (SIM_CPU *cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 1390 | { |
9d70630e | 1391 | abuf->length = CGEN_BASE_INSN_SIZE; |
646c6f2b | 1392 | abuf->addr = pc; |
9d70630e DE |
1393 | /* Leave signalling to semantic fn. */ |
1394 | } | |
646c6f2b | 1395 | |
9d70630e | 1396 | #if 0 /*wip*/ |
646c6f2b | 1397 | void |
9d70630e | 1398 | EXC_FN_NAME (m32r,illegal) (SIM_CPU *cpu, PCADDR pc, insn_t insn, ARGBUF *abuf) |
646c6f2b | 1399 | { |
9d70630e | 1400 | abuf->length = CGEN_BASE_INSN_SIZE; |
646c6f2b | 1401 | abuf->addr = pc; |
9d70630e | 1402 | /* Leave signalling to semantic fn. */ |
646c6f2b | 1403 | } |
646c6f2b | 1404 | #endif |