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