1 /* Simulator instruction extractor for m32r.
3 This file is machine generated with CGEN.
5 Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
7 This file is part of the GNU Simulators.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 EX_FN_NAME (m32r
,fmt_add
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
34 #define FLD(f) abuf->fields.fmt_add.f
35 EXTRACT_FMT_ADD_VARS
/* f-op1 f-r1 f-op2 f-r2 */
39 /* Record the fields for the semantic handler. */
40 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
41 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
42 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_add", "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
44 abuf
->length
= length
;
47 #if WITH_PROFILE_MODEL_P
48 /* Record the fields for profiling. */
49 if (PROFILE_MODEL_P (current_cpu
))
51 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
52 abuf
->h_gr_set
= 0 | (1 << f_r1
);
59 EX_FN_NAME (m32r
,fmt_add3
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
61 #define FLD(f) abuf->fields.fmt_add3.f
62 EXTRACT_FMT_ADD3_VARS
/* f-op1 f-r1 f-op2 f-r2 f-simm16 */
66 /* Record the fields for the semantic handler. */
67 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
68 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
69 FLD (f_simm16
) = f_simm16
;
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));
72 abuf
->length
= length
;
75 #if WITH_PROFILE_MODEL_P
76 /* Record the fields for profiling. */
77 if (PROFILE_MODEL_P (current_cpu
))
79 abuf
->h_gr_get
= 0 | (1 << f_r2
);
80 abuf
->h_gr_set
= 0 | (1 << f_r1
);
87 EX_FN_NAME (m32r
,fmt_and3
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
89 #define FLD(f) abuf->fields.fmt_and3.f
90 EXTRACT_FMT_AND3_VARS
/* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
94 /* Record the fields for the semantic handler. */
95 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
96 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
97 FLD (f_uimm16
) = f_uimm16
;
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));
100 abuf
->length
= length
;
103 #if WITH_PROFILE_MODEL_P
104 /* Record the fields for profiling. */
105 if (PROFILE_MODEL_P (current_cpu
))
107 abuf
->h_gr_get
= 0 | (1 << f_r2
);
108 abuf
->h_gr_set
= 0 | (1 << f_r1
);
115 EX_FN_NAME (m32r
,fmt_or3
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
117 #define FLD(f) abuf->fields.fmt_or3.f
118 EXTRACT_FMT_OR3_VARS
/* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
122 /* Record the fields for the semantic handler. */
123 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
124 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
125 FLD (f_uimm16
) = f_uimm16
;
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));
128 abuf
->length
= length
;
131 #if WITH_PROFILE_MODEL_P
132 /* Record the fields for profiling. */
133 if (PROFILE_MODEL_P (current_cpu
))
135 abuf
->h_gr_get
= 0 | (1 << f_r2
);
136 abuf
->h_gr_set
= 0 | (1 << f_r1
);
143 EX_FN_NAME (m32r
,fmt_addi
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
145 #define FLD(f) abuf->fields.fmt_addi.f
146 EXTRACT_FMT_ADDI_VARS
/* f-op1 f-r1 f-simm8 */
148 EXTRACT_FMT_ADDI_CODE
150 /* Record the fields for the semantic handler. */
151 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
152 FLD (f_simm8
) = f_simm8
;
153 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_addi", "dr 0x%x", 'x', f_r1
, "simm8 0x%x", 'x', f_simm8
, (char *) 0));
155 abuf
->length
= length
;
158 #if WITH_PROFILE_MODEL_P
159 /* Record the fields for profiling. */
160 if (PROFILE_MODEL_P (current_cpu
))
162 abuf
->h_gr_get
= 0 | (1 << f_r1
);
163 abuf
->h_gr_set
= 0 | (1 << f_r1
);
170 EX_FN_NAME (m32r
,fmt_addv
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
172 #define FLD(f) abuf->fields.fmt_addv.f
173 EXTRACT_FMT_ADDV_VARS
/* f-op1 f-r1 f-op2 f-r2 */
175 EXTRACT_FMT_ADDV_CODE
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
];
180 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_addv", "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
182 abuf
->length
= length
;
185 #if WITH_PROFILE_MODEL_P
186 /* Record the fields for profiling. */
187 if (PROFILE_MODEL_P (current_cpu
))
189 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
190 abuf
->h_gr_set
= 0 | (1 << f_r1
);
197 EX_FN_NAME (m32r
,fmt_addv3
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
199 #define FLD(f) abuf->fields.fmt_addv3.f
200 EXTRACT_FMT_ADDV3_VARS
/* f-op1 f-r1 f-op2 f-r2 f-simm16 */
202 EXTRACT_FMT_ADDV3_CODE
204 /* Record the fields for the semantic handler. */
205 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
206 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
207 FLD (f_simm16
) = f_simm16
;
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));
210 abuf
->length
= length
;
213 #if WITH_PROFILE_MODEL_P
214 /* Record the fields for profiling. */
215 if (PROFILE_MODEL_P (current_cpu
))
217 abuf
->h_gr_get
= 0 | (1 << f_r2
);
218 abuf
->h_gr_set
= 0 | (1 << f_r1
);
225 EX_FN_NAME (m32r
,fmt_addx
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
227 #define FLD(f) abuf->fields.fmt_addx.f
228 EXTRACT_FMT_ADDX_VARS
/* f-op1 f-r1 f-op2 f-r2 */
230 EXTRACT_FMT_ADDX_CODE
232 /* Record the fields for the semantic handler. */
233 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
234 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
235 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_addx", "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
237 abuf
->length
= length
;
240 #if WITH_PROFILE_MODEL_P
241 /* Record the fields for profiling. */
242 if (PROFILE_MODEL_P (current_cpu
))
244 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
245 abuf
->h_gr_set
= 0 | (1 << f_r1
);
252 EX_FN_NAME (m32r
,fmt_bc8
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
254 #define FLD(f) abuf->fields.fmt_bc8.f
255 EXTRACT_FMT_BC8_VARS
/* f-op1 f-r1 f-disp8 */
259 /* Record the fields for the semantic handler. */
260 RECORD_IADDR (FLD (f_disp8
), (pc
& -4L) + f_disp8
);
261 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_bc8", "disp8 0x%x", 'x', f_disp8
, (char *) 0));
263 abuf
->length
= length
;
269 EX_FN_NAME (m32r
,fmt_bc24
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
271 #define FLD(f) abuf->fields.fmt_bc24.f
272 EXTRACT_FMT_BC24_VARS
/* f-op1 f-r1 f-disp24 */
274 EXTRACT_FMT_BC24_CODE
276 /* Record the fields for the semantic handler. */
277 RECORD_IADDR (FLD (f_disp24
), pc
+ f_disp24
);
278 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_bc24", "disp24 0x%x", 'x', f_disp24
, (char *) 0));
280 abuf
->length
= length
;
286 EX_FN_NAME (m32r
,fmt_beq
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
288 #define FLD(f) abuf->fields.fmt_beq.f
289 EXTRACT_FMT_BEQ_VARS
/* f-op1 f-r1 f-op2 f-r2 f-disp16 */
293 /* Record the fields for the semantic handler. */
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
);
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));
299 abuf
->length
= length
;
302 #if WITH_PROFILE_MODEL_P
303 /* Record the fields for profiling. */
304 if (PROFILE_MODEL_P (current_cpu
))
306 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
313 EX_FN_NAME (m32r
,fmt_beqz
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
315 #define FLD(f) abuf->fields.fmt_beqz.f
316 EXTRACT_FMT_BEQZ_VARS
/* f-op1 f-r1 f-op2 f-r2 f-disp16 */
318 EXTRACT_FMT_BEQZ_CODE
320 /* Record the fields for the semantic handler. */
321 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
322 RECORD_IADDR (FLD (f_disp16
), pc
+ f_disp16
);
323 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_beqz", "src2 0x%x", 'x', f_r2
, "disp16 0x%x", 'x', f_disp16
, (char *) 0));
325 abuf
->length
= length
;
328 #if WITH_PROFILE_MODEL_P
329 /* Record the fields for profiling. */
330 if (PROFILE_MODEL_P (current_cpu
))
332 abuf
->h_gr_get
= 0 | (1 << f_r2
);
339 EX_FN_NAME (m32r
,fmt_bl8
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
341 #define FLD(f) abuf->fields.fmt_bl8.f
342 EXTRACT_FMT_BL8_VARS
/* f-op1 f-r1 f-disp8 */
346 /* Record the fields for the semantic handler. */
347 RECORD_IADDR (FLD (f_disp8
), (pc
& -4L) + f_disp8
);
348 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_bl8", "disp8 0x%x", 'x', f_disp8
, (char *) 0));
350 abuf
->length
= length
;
353 #if WITH_PROFILE_MODEL_P
354 /* Record the fields for profiling. */
355 if (PROFILE_MODEL_P (current_cpu
))
357 abuf
->h_gr_set
= 0 | (1 << 14);
364 EX_FN_NAME (m32r
,fmt_bl24
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
366 #define FLD(f) abuf->fields.fmt_bl24.f
367 EXTRACT_FMT_BL24_VARS
/* f-op1 f-r1 f-disp24 */
369 EXTRACT_FMT_BL24_CODE
371 /* Record the fields for the semantic handler. */
372 RECORD_IADDR (FLD (f_disp24
), pc
+ f_disp24
);
373 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_bl24", "disp24 0x%x", 'x', f_disp24
, (char *) 0));
375 abuf
->length
= length
;
378 #if WITH_PROFILE_MODEL_P
379 /* Record the fields for profiling. */
380 if (PROFILE_MODEL_P (current_cpu
))
382 abuf
->h_gr_set
= 0 | (1 << 14);
389 EX_FN_NAME (m32r
,fmt_bra8
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
391 #define FLD(f) abuf->fields.fmt_bra8.f
392 EXTRACT_FMT_BRA8_VARS
/* f-op1 f-r1 f-disp8 */
394 EXTRACT_FMT_BRA8_CODE
396 /* Record the fields for the semantic handler. */
397 RECORD_IADDR (FLD (f_disp8
), (pc
& -4L) + f_disp8
);
398 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_bra8", "disp8 0x%x", 'x', f_disp8
, (char *) 0));
400 abuf
->length
= length
;
406 EX_FN_NAME (m32r
,fmt_bra24
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
408 #define FLD(f) abuf->fields.fmt_bra24.f
409 EXTRACT_FMT_BRA24_VARS
/* f-op1 f-r1 f-disp24 */
411 EXTRACT_FMT_BRA24_CODE
413 /* Record the fields for the semantic handler. */
414 RECORD_IADDR (FLD (f_disp24
), pc
+ f_disp24
);
415 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_bra24", "disp24 0x%x", 'x', f_disp24
, (char *) 0));
417 abuf
->length
= length
;
423 EX_FN_NAME (m32r
,fmt_cmp
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
425 #define FLD(f) abuf->fields.fmt_cmp.f
426 EXTRACT_FMT_CMP_VARS
/* f-op1 f-r1 f-op2 f-r2 */
430 /* Record the fields for the semantic handler. */
431 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
432 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
433 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_cmp", "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
435 abuf
->length
= length
;
438 #if WITH_PROFILE_MODEL_P
439 /* Record the fields for profiling. */
440 if (PROFILE_MODEL_P (current_cpu
))
442 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
449 EX_FN_NAME (m32r
,fmt_cmpi
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
451 #define FLD(f) abuf->fields.fmt_cmpi.f
452 EXTRACT_FMT_CMPI_VARS
/* f-op1 f-r1 f-op2 f-r2 f-simm16 */
454 EXTRACT_FMT_CMPI_CODE
456 /* Record the fields for the semantic handler. */
457 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
458 FLD (f_simm16
) = f_simm16
;
459 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_cmpi", "src2 0x%x", 'x', f_r2
, "simm16 0x%x", 'x', f_simm16
, (char *) 0));
461 abuf
->length
= length
;
464 #if WITH_PROFILE_MODEL_P
465 /* Record the fields for profiling. */
466 if (PROFILE_MODEL_P (current_cpu
))
468 abuf
->h_gr_get
= 0 | (1 << f_r2
);
475 EX_FN_NAME (m32r
,fmt_div
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
477 #define FLD(f) abuf->fields.fmt_div.f
478 EXTRACT_FMT_DIV_VARS
/* f-op1 f-r1 f-op2 f-r2 f-simm16 */
482 /* Record the fields for the semantic handler. */
483 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
484 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
485 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_div", "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
487 abuf
->length
= length
;
490 #if WITH_PROFILE_MODEL_P
491 /* Record the fields for profiling. */
492 if (PROFILE_MODEL_P (current_cpu
))
494 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
495 abuf
->h_gr_set
= 0 | (1 << f_r1
);
502 EX_FN_NAME (m32r
,fmt_jl
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
504 #define FLD(f) abuf->fields.fmt_jl.f
505 EXTRACT_FMT_JL_VARS
/* f-op1 f-r1 f-op2 f-r2 */
509 /* Record the fields for the semantic handler. */
510 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
511 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_jl", "sr 0x%x", 'x', f_r2
, (char *) 0));
513 abuf
->length
= length
;
516 #if WITH_PROFILE_MODEL_P
517 /* Record the fields for profiling. */
518 if (PROFILE_MODEL_P (current_cpu
))
520 abuf
->h_gr_get
= 0 | (1 << f_r2
);
521 abuf
->h_gr_set
= 0 | (1 << 14);
528 EX_FN_NAME (m32r
,fmt_jmp
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
530 #define FLD(f) abuf->fields.fmt_jmp.f
531 EXTRACT_FMT_JMP_VARS
/* f-op1 f-r1 f-op2 f-r2 */
535 /* Record the fields for the semantic handler. */
536 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
537 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_jmp", "sr 0x%x", 'x', f_r2
, (char *) 0));
539 abuf
->length
= length
;
542 #if WITH_PROFILE_MODEL_P
543 /* Record the fields for profiling. */
544 if (PROFILE_MODEL_P (current_cpu
))
546 abuf
->h_gr_get
= 0 | (1 << f_r2
);
553 EX_FN_NAME (m32r
,fmt_ld
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
555 #define FLD(f) abuf->fields.fmt_ld.f
556 EXTRACT_FMT_LD_VARS
/* f-op1 f-r1 f-op2 f-r2 */
560 /* Record the fields for the semantic handler. */
561 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
562 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
563 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_ld", "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
565 abuf
->length
= length
;
568 #if WITH_PROFILE_MODEL_P
569 /* Record the fields for profiling. */
570 if (PROFILE_MODEL_P (current_cpu
))
572 abuf
->h_gr_get
= 0 | (1 << f_r2
);
573 abuf
->h_gr_set
= 0 | (1 << f_r1
);
580 EX_FN_NAME (m32r
,fmt_ld_d
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
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 */
585 EXTRACT_FMT_LD_D_CODE
587 /* Record the fields for the semantic handler. */
588 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
589 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
590 FLD (f_simm16
) = f_simm16
;
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));
593 abuf
->length
= length
;
596 #if WITH_PROFILE_MODEL_P
597 /* Record the fields for profiling. */
598 if (PROFILE_MODEL_P (current_cpu
))
600 abuf
->h_gr_get
= 0 | (1 << f_r2
);
601 abuf
->h_gr_set
= 0 | (1 << f_r1
);
608 EX_FN_NAME (m32r
,fmt_ldb
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
610 #define FLD(f) abuf->fields.fmt_ldb.f
611 EXTRACT_FMT_LDB_VARS
/* f-op1 f-r1 f-op2 f-r2 */
615 /* Record the fields for the semantic handler. */
616 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
617 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
618 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_ldb", "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
620 abuf
->length
= length
;
623 #if WITH_PROFILE_MODEL_P
624 /* Record the fields for profiling. */
625 if (PROFILE_MODEL_P (current_cpu
))
627 abuf
->h_gr_get
= 0 | (1 << f_r2
);
628 abuf
->h_gr_set
= 0 | (1 << f_r1
);
635 EX_FN_NAME (m32r
,fmt_ldb_d
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
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 */
640 EXTRACT_FMT_LDB_D_CODE
642 /* Record the fields for the semantic handler. */
643 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
644 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
645 FLD (f_simm16
) = f_simm16
;
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));
648 abuf
->length
= length
;
651 #if WITH_PROFILE_MODEL_P
652 /* Record the fields for profiling. */
653 if (PROFILE_MODEL_P (current_cpu
))
655 abuf
->h_gr_get
= 0 | (1 << f_r2
);
656 abuf
->h_gr_set
= 0 | (1 << f_r1
);
663 EX_FN_NAME (m32r
,fmt_ldh
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
665 #define FLD(f) abuf->fields.fmt_ldh.f
666 EXTRACT_FMT_LDH_VARS
/* f-op1 f-r1 f-op2 f-r2 */
670 /* Record the fields for the semantic handler. */
671 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
672 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
673 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_ldh", "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
675 abuf
->length
= length
;
678 #if WITH_PROFILE_MODEL_P
679 /* Record the fields for profiling. */
680 if (PROFILE_MODEL_P (current_cpu
))
682 abuf
->h_gr_get
= 0 | (1 << f_r2
);
683 abuf
->h_gr_set
= 0 | (1 << f_r1
);
690 EX_FN_NAME (m32r
,fmt_ldh_d
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
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 */
695 EXTRACT_FMT_LDH_D_CODE
697 /* Record the fields for the semantic handler. */
698 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
699 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
700 FLD (f_simm16
) = f_simm16
;
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));
703 abuf
->length
= length
;
706 #if WITH_PROFILE_MODEL_P
707 /* Record the fields for profiling. */
708 if (PROFILE_MODEL_P (current_cpu
))
710 abuf
->h_gr_get
= 0 | (1 << f_r2
);
711 abuf
->h_gr_set
= 0 | (1 << f_r1
);
718 EX_FN_NAME (m32r
,fmt_ld_plus
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
720 #define FLD(f) abuf->fields.fmt_ld_plus.f
721 EXTRACT_FMT_LD_PLUS_VARS
/* f-op1 f-r1 f-op2 f-r2 */
723 EXTRACT_FMT_LD_PLUS_CODE
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
];
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));
730 abuf
->length
= length
;
733 #if WITH_PROFILE_MODEL_P
734 /* Record the fields for profiling. */
735 if (PROFILE_MODEL_P (current_cpu
))
737 abuf
->h_gr_get
= 0 | (1 << f_r2
);
738 abuf
->h_gr_set
= 0 | (1 << f_r1
) | (1 << f_r2
);
745 EX_FN_NAME (m32r
,fmt_ld24
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
747 #define FLD(f) abuf->fields.fmt_ld24.f
748 EXTRACT_FMT_LD24_VARS
/* f-op1 f-r1 f-uimm24 */
750 EXTRACT_FMT_LD24_CODE
752 /* Record the fields for the semantic handler. */
753 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
754 FLD (f_uimm24
) = f_uimm24
;
755 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_ld24", "dr 0x%x", 'x', f_r1
, "uimm24 0x%x", 'x', f_uimm24
, (char *) 0));
757 abuf
->length
= length
;
760 #if WITH_PROFILE_MODEL_P
761 /* Record the fields for profiling. */
762 if (PROFILE_MODEL_P (current_cpu
))
764 abuf
->h_gr_set
= 0 | (1 << f_r1
);
771 EX_FN_NAME (m32r
,fmt_ldi8
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
773 #define FLD(f) abuf->fields.fmt_ldi8.f
774 EXTRACT_FMT_LDI8_VARS
/* f-op1 f-r1 f-simm8 */
776 EXTRACT_FMT_LDI8_CODE
778 /* Record the fields for the semantic handler. */
779 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
780 FLD (f_simm8
) = f_simm8
;
781 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_ldi8", "dr 0x%x", 'x', f_r1
, "simm8 0x%x", 'x', f_simm8
, (char *) 0));
783 abuf
->length
= length
;
786 #if WITH_PROFILE_MODEL_P
787 /* Record the fields for profiling. */
788 if (PROFILE_MODEL_P (current_cpu
))
790 abuf
->h_gr_set
= 0 | (1 << f_r1
);
797 EX_FN_NAME (m32r
,fmt_ldi16
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
799 #define FLD(f) abuf->fields.fmt_ldi16.f
800 EXTRACT_FMT_LDI16_VARS
/* f-op1 f-r1 f-op2 f-r2 f-simm16 */
802 EXTRACT_FMT_LDI16_CODE
804 /* Record the fields for the semantic handler. */
805 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
806 FLD (f_simm16
) = f_simm16
;
807 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_ldi16", "dr 0x%x", 'x', f_r1
, "slo16 0x%x", 'x', f_simm16
, (char *) 0));
809 abuf
->length
= length
;
812 #if WITH_PROFILE_MODEL_P
813 /* Record the fields for profiling. */
814 if (PROFILE_MODEL_P (current_cpu
))
816 abuf
->h_gr_set
= 0 | (1 << f_r1
);
823 EX_FN_NAME (m32r
,fmt_lock
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
825 #define FLD(f) abuf->fields.fmt_lock.f
826 EXTRACT_FMT_LOCK_VARS
/* f-op1 f-r1 f-op2 f-r2 */
828 EXTRACT_FMT_LOCK_CODE
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
];
833 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_lock", "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
835 abuf
->length
= length
;
838 #if WITH_PROFILE_MODEL_P
839 /* Record the fields for profiling. */
840 if (PROFILE_MODEL_P (current_cpu
))
842 abuf
->h_gr_get
= 0 | (1 << f_r2
);
843 abuf
->h_gr_set
= 0 | (1 << f_r1
);
850 EX_FN_NAME (m32r
,fmt_machi
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
852 #define FLD(f) abuf->fields.fmt_machi.f
853 EXTRACT_FMT_MACHI_VARS
/* f-op1 f-r1 f-op2 f-r2 */
855 EXTRACT_FMT_MACHI_CODE
857 /* Record the fields for the semantic handler. */
858 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
859 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
860 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_machi", "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
862 abuf
->length
= length
;
865 #if WITH_PROFILE_MODEL_P
866 /* Record the fields for profiling. */
867 if (PROFILE_MODEL_P (current_cpu
))
869 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
876 EX_FN_NAME (m32r
,fmt_mulhi
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
878 #define FLD(f) abuf->fields.fmt_mulhi.f
879 EXTRACT_FMT_MULHI_VARS
/* f-op1 f-r1 f-op2 f-r2 */
881 EXTRACT_FMT_MULHI_CODE
883 /* Record the fields for the semantic handler. */
884 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
885 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
886 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_mulhi", "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
888 abuf
->length
= length
;
891 #if WITH_PROFILE_MODEL_P
892 /* Record the fields for profiling. */
893 if (PROFILE_MODEL_P (current_cpu
))
895 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
902 EX_FN_NAME (m32r
,fmt_mv
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
904 #define FLD(f) abuf->fields.fmt_mv.f
905 EXTRACT_FMT_MV_VARS
/* f-op1 f-r1 f-op2 f-r2 */
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
];
912 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_mv", "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
914 abuf
->length
= length
;
917 #if WITH_PROFILE_MODEL_P
918 /* Record the fields for profiling. */
919 if (PROFILE_MODEL_P (current_cpu
))
921 abuf
->h_gr_get
= 0 | (1 << f_r2
);
922 abuf
->h_gr_set
= 0 | (1 << f_r1
);
929 EX_FN_NAME (m32r
,fmt_mvfachi
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
931 #define FLD(f) abuf->fields.fmt_mvfachi.f
932 EXTRACT_FMT_MVFACHI_VARS
/* f-op1 f-r1 f-op2 f-r2 */
934 EXTRACT_FMT_MVFACHI_CODE
936 /* Record the fields for the semantic handler. */
937 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
938 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_mvfachi", "dr 0x%x", 'x', f_r1
, (char *) 0));
940 abuf
->length
= length
;
943 #if WITH_PROFILE_MODEL_P
944 /* Record the fields for profiling. */
945 if (PROFILE_MODEL_P (current_cpu
))
947 abuf
->h_gr_set
= 0 | (1 << f_r1
);
954 EX_FN_NAME (m32r
,fmt_mvfc
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
956 #define FLD(f) abuf->fields.fmt_mvfc.f
957 EXTRACT_FMT_MVFC_VARS
/* f-op1 f-r1 f-op2 f-r2 */
959 EXTRACT_FMT_MVFC_CODE
961 /* Record the fields for the semantic handler. */
962 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
964 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_mvfc", "dr 0x%x", 'x', f_r1
, "scr 0x%x", 'x', f_r2
, (char *) 0));
966 abuf
->length
= length
;
969 #if WITH_PROFILE_MODEL_P
970 /* Record the fields for profiling. */
971 if (PROFILE_MODEL_P (current_cpu
))
973 abuf
->h_gr_set
= 0 | (1 << f_r1
);
980 EX_FN_NAME (m32r
,fmt_mvtachi
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
982 #define FLD(f) abuf->fields.fmt_mvtachi.f
983 EXTRACT_FMT_MVTACHI_VARS
/* f-op1 f-r1 f-op2 f-r2 */
985 EXTRACT_FMT_MVTACHI_CODE
987 /* Record the fields for the semantic handler. */
988 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
989 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_mvtachi", "src1 0x%x", 'x', f_r1
, (char *) 0));
991 abuf
->length
= length
;
994 #if WITH_PROFILE_MODEL_P
995 /* Record the fields for profiling. */
996 if (PROFILE_MODEL_P (current_cpu
))
998 abuf
->h_gr_get
= 0 | (1 << f_r1
);
1005 EX_FN_NAME (m32r
,fmt_mvtc
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1007 #define FLD(f) abuf->fields.fmt_mvtc.f
1008 EXTRACT_FMT_MVTC_VARS
/* f-op1 f-r1 f-op2 f-r2 */
1010 EXTRACT_FMT_MVTC_CODE
1012 /* Record the fields for the semantic handler. */
1014 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
1015 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_mvtc", "dcr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
1017 abuf
->length
= length
;
1020 #if WITH_PROFILE_MODEL_P
1021 /* Record the fields for profiling. */
1022 if (PROFILE_MODEL_P (current_cpu
))
1024 abuf
->h_gr_get
= 0 | (1 << f_r2
);
1031 EX_FN_NAME (m32r
,fmt_nop
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1033 #define FLD(f) abuf->fields.fmt_nop.f
1034 EXTRACT_FMT_NOP_VARS
/* f-op1 f-r1 f-op2 f-r2 */
1036 EXTRACT_FMT_NOP_CODE
1038 /* Record the fields for the semantic handler. */
1039 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_nop", (char *) 0));
1041 abuf
->length
= length
;
1047 EX_FN_NAME (m32r
,fmt_rac
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1049 #define FLD(f) abuf->fields.fmt_rac.f
1050 EXTRACT_FMT_RAC_VARS
/* f-op1 f-r1 f-op2 f-r2 */
1052 EXTRACT_FMT_RAC_CODE
1054 /* Record the fields for the semantic handler. */
1055 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_rac", (char *) 0));
1057 abuf
->length
= length
;
1063 EX_FN_NAME (m32r
,fmt_rte
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1065 #define FLD(f) abuf->fields.fmt_rte.f
1066 EXTRACT_FMT_RTE_VARS
/* f-op1 f-r1 f-op2 f-r2 */
1068 EXTRACT_FMT_RTE_CODE
1070 /* Record the fields for the semantic handler. */
1071 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_rte", (char *) 0));
1073 abuf
->length
= length
;
1079 EX_FN_NAME (m32r
,fmt_seth
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1081 #define FLD(f) abuf->fields.fmt_seth.f
1082 EXTRACT_FMT_SETH_VARS
/* f-op1 f-r1 f-op2 f-r2 f-hi16 */
1084 EXTRACT_FMT_SETH_CODE
1086 /* Record the fields for the semantic handler. */
1087 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
1088 FLD (f_hi16
) = f_hi16
;
1089 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_seth", "dr 0x%x", 'x', f_r1
, "hi16 0x%x", 'x', f_hi16
, (char *) 0));
1091 abuf
->length
= length
;
1094 #if WITH_PROFILE_MODEL_P
1095 /* Record the fields for profiling. */
1096 if (PROFILE_MODEL_P (current_cpu
))
1098 abuf
->h_gr_set
= 0 | (1 << f_r1
);
1105 EX_FN_NAME (m32r
,fmt_sll3
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1107 #define FLD(f) abuf->fields.fmt_sll3.f
1108 EXTRACT_FMT_SLL3_VARS
/* f-op1 f-r1 f-op2 f-r2 f-simm16 */
1110 EXTRACT_FMT_SLL3_CODE
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
;
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));
1118 abuf
->length
= length
;
1121 #if WITH_PROFILE_MODEL_P
1122 /* Record the fields for profiling. */
1123 if (PROFILE_MODEL_P (current_cpu
))
1125 abuf
->h_gr_get
= 0 | (1 << f_r2
);
1126 abuf
->h_gr_set
= 0 | (1 << f_r1
);
1133 EX_FN_NAME (m32r
,fmt_slli
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1135 #define FLD(f) abuf->fields.fmt_slli.f
1136 EXTRACT_FMT_SLLI_VARS
/* f-op1 f-r1 f-shift-op2 f-uimm5 */
1138 EXTRACT_FMT_SLLI_CODE
1140 /* Record the fields for the semantic handler. */
1141 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
1142 FLD (f_uimm5
) = f_uimm5
;
1143 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_slli", "dr 0x%x", 'x', f_r1
, "uimm5 0x%x", 'x', f_uimm5
, (char *) 0));
1145 abuf
->length
= length
;
1148 #if WITH_PROFILE_MODEL_P
1149 /* Record the fields for profiling. */
1150 if (PROFILE_MODEL_P (current_cpu
))
1152 abuf
->h_gr_get
= 0 | (1 << f_r1
);
1153 abuf
->h_gr_set
= 0 | (1 << f_r1
);
1160 EX_FN_NAME (m32r
,fmt_st
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1162 #define FLD(f) abuf->fields.fmt_st.f
1163 EXTRACT_FMT_ST_VARS
/* f-op1 f-r1 f-op2 f-r2 */
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
];
1170 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_st", "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1172 abuf
->length
= length
;
1175 #if WITH_PROFILE_MODEL_P
1176 /* Record the fields for profiling. */
1177 if (PROFILE_MODEL_P (current_cpu
))
1179 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
1186 EX_FN_NAME (m32r
,fmt_st_d
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
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 */
1191 EXTRACT_FMT_ST_D_CODE
1193 /* Record the fields for the semantic handler. */
1194 FLD (f_r1
) = & CPU (h_gr
)[f_r1
];
1195 FLD (f_r2
) = & CPU (h_gr
)[f_r2
];
1196 FLD (f_simm16
) = f_simm16
;
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));
1199 abuf
->length
= length
;
1202 #if WITH_PROFILE_MODEL_P
1203 /* Record the fields for profiling. */
1204 if (PROFILE_MODEL_P (current_cpu
))
1206 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
1213 EX_FN_NAME (m32r
,fmt_stb
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1215 #define FLD(f) abuf->fields.fmt_stb.f
1216 EXTRACT_FMT_STB_VARS
/* f-op1 f-r1 f-op2 f-r2 */
1218 EXTRACT_FMT_STB_CODE
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
];
1223 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_stb", "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1225 abuf
->length
= length
;
1228 #if WITH_PROFILE_MODEL_P
1229 /* Record the fields for profiling. */
1230 if (PROFILE_MODEL_P (current_cpu
))
1232 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
1239 EX_FN_NAME (m32r
,fmt_stb_d
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
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 */
1244 EXTRACT_FMT_STB_D_CODE
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
;
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));
1252 abuf
->length
= length
;
1255 #if WITH_PROFILE_MODEL_P
1256 /* Record the fields for profiling. */
1257 if (PROFILE_MODEL_P (current_cpu
))
1259 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
1266 EX_FN_NAME (m32r
,fmt_sth
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1268 #define FLD(f) abuf->fields.fmt_sth.f
1269 EXTRACT_FMT_STH_VARS
/* f-op1 f-r1 f-op2 f-r2 */
1271 EXTRACT_FMT_STH_CODE
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
];
1276 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_sth", "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1278 abuf
->length
= length
;
1281 #if WITH_PROFILE_MODEL_P
1282 /* Record the fields for profiling. */
1283 if (PROFILE_MODEL_P (current_cpu
))
1285 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
1292 EX_FN_NAME (m32r
,fmt_sth_d
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
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 */
1297 EXTRACT_FMT_STH_D_CODE
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
;
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));
1305 abuf
->length
= length
;
1308 #if WITH_PROFILE_MODEL_P
1309 /* Record the fields for profiling. */
1310 if (PROFILE_MODEL_P (current_cpu
))
1312 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
1319 EX_FN_NAME (m32r
,fmt_st_plus
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1321 #define FLD(f) abuf->fields.fmt_st_plus.f
1322 EXTRACT_FMT_ST_PLUS_VARS
/* f-op1 f-r1 f-op2 f-r2 */
1324 EXTRACT_FMT_ST_PLUS_CODE
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
];
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));
1331 abuf
->length
= length
;
1334 #if WITH_PROFILE_MODEL_P
1335 /* Record the fields for profiling. */
1336 if (PROFILE_MODEL_P (current_cpu
))
1338 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
1339 abuf
->h_gr_set
= 0 | (1 << f_r2
);
1346 EX_FN_NAME (m32r
,fmt_trap
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1348 #define FLD(f) abuf->fields.fmt_trap.f
1349 EXTRACT_FMT_TRAP_VARS
/* f-op1 f-r1 f-op2 f-uimm4 */
1351 EXTRACT_FMT_TRAP_CODE
1353 /* Record the fields for the semantic handler. */
1354 FLD (f_uimm4
) = f_uimm4
;
1355 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_trap", "uimm4 0x%x", 'x', f_uimm4
, (char *) 0));
1357 abuf
->length
= length
;
1363 EX_FN_NAME (m32r
,fmt_unlock
) (SIM_CPU
*current_cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1365 #define FLD(f) abuf->fields.fmt_unlock.f
1366 EXTRACT_FMT_UNLOCK_VARS
/* f-op1 f-r1 f-op2 f-r2 */
1368 EXTRACT_FMT_UNLOCK_CODE
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
];
1373 TRACE_EXTRACT (current_cpu
, (current_cpu
, pc
, "fmt_unlock", "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1375 abuf
->length
= length
;
1378 #if WITH_PROFILE_MODEL_P
1379 /* Record the fields for profiling. */
1380 if (PROFILE_MODEL_P (current_cpu
))
1382 abuf
->h_gr_get
= 0 | (1 << f_r1
) | (1 << f_r2
);
1389 EX_FN_NAME (m32r
,illegal
) (SIM_CPU
*cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1391 abuf
->length
= CGEN_BASE_INSN_SIZE
;
1393 /* Leave signalling to semantic fn. */
1398 EXC_FN_NAME (m32r
,illegal
) (SIM_CPU
*cpu
, PCADDR pc
, insn_t insn
, ARGBUF
*abuf
)
1400 abuf
->length
= CGEN_BASE_INSN_SIZE
;
1402 /* Leave signalling to semantic fn. */