1 /* Simulator model support for m32rxf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996-2024 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This file 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 3, or (at your option)
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 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 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
25 #define WANT_CPU m32rxf
26 #define WANT_CPU_M32RXF
30 /* The profiling data is recorded here, but is accessed via the profiling
31 mechanism. After all, this is information for profiling. */
33 #if WITH_PROFILE_MODEL_P
35 /* Model handlers for each insn. */
38 model_m32rx_add (SIM_CPU
*current_cpu
, void *sem_arg
)
40 #define FLD(f) abuf->fields.sfmt_add.f
41 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
42 const IDESC
* UNUSED idesc
= abuf
->idesc
;
46 int UNUSED insn_referenced
= abuf
->written
;
52 out_dr
= FLD (out_dr
);
56 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
63 model_m32rx_add3 (SIM_CPU
*current_cpu
, void *sem_arg
)
65 #define FLD(f) abuf->fields.sfmt_add3.f
66 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
67 const IDESC
* UNUSED idesc
= abuf
->idesc
;
71 int UNUSED insn_referenced
= abuf
->written
;
76 out_dr
= FLD (out_dr
);
79 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
86 model_m32rx_and (SIM_CPU
*current_cpu
, void *sem_arg
)
88 #define FLD(f) abuf->fields.sfmt_add.f
89 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
90 const IDESC
* UNUSED idesc
= abuf
->idesc
;
94 int UNUSED insn_referenced
= abuf
->written
;
100 out_dr
= FLD (out_dr
);
101 referenced
|= 1 << 0;
102 referenced
|= 1 << 1;
103 referenced
|= 1 << 2;
104 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
111 model_m32rx_and3 (SIM_CPU
*current_cpu
, void *sem_arg
)
113 #define FLD(f) abuf->fields.sfmt_and3.f
114 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
115 const IDESC
* UNUSED idesc
= abuf
->idesc
;
119 int UNUSED insn_referenced
= abuf
->written
;
124 out_dr
= FLD (out_dr
);
125 referenced
|= 1 << 0;
126 referenced
|= 1 << 2;
127 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
134 model_m32rx_or (SIM_CPU
*current_cpu
, void *sem_arg
)
136 #define FLD(f) abuf->fields.sfmt_add.f
137 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
138 const IDESC
* UNUSED idesc
= abuf
->idesc
;
142 int UNUSED insn_referenced
= abuf
->written
;
148 out_dr
= FLD (out_dr
);
149 referenced
|= 1 << 0;
150 referenced
|= 1 << 1;
151 referenced
|= 1 << 2;
152 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
159 model_m32rx_or3 (SIM_CPU
*current_cpu
, void *sem_arg
)
161 #define FLD(f) abuf->fields.sfmt_and3.f
162 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
163 const IDESC
* UNUSED idesc
= abuf
->idesc
;
167 int UNUSED insn_referenced
= abuf
->written
;
172 out_dr
= FLD (out_dr
);
173 referenced
|= 1 << 0;
174 referenced
|= 1 << 2;
175 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
182 model_m32rx_xor (SIM_CPU
*current_cpu
, void *sem_arg
)
184 #define FLD(f) abuf->fields.sfmt_add.f
185 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
186 const IDESC
* UNUSED idesc
= abuf
->idesc
;
190 int UNUSED insn_referenced
= abuf
->written
;
196 out_dr
= FLD (out_dr
);
197 referenced
|= 1 << 0;
198 referenced
|= 1 << 1;
199 referenced
|= 1 << 2;
200 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
207 model_m32rx_xor3 (SIM_CPU
*current_cpu
, void *sem_arg
)
209 #define FLD(f) abuf->fields.sfmt_and3.f
210 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
211 const IDESC
* UNUSED idesc
= abuf
->idesc
;
215 int UNUSED insn_referenced
= abuf
->written
;
220 out_dr
= FLD (out_dr
);
221 referenced
|= 1 << 0;
222 referenced
|= 1 << 2;
223 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
230 model_m32rx_addi (SIM_CPU
*current_cpu
, void *sem_arg
)
232 #define FLD(f) abuf->fields.sfmt_addi.f
233 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
234 const IDESC
* UNUSED idesc
= abuf
->idesc
;
238 int UNUSED insn_referenced
= abuf
->written
;
243 out_dr
= FLD (out_dr
);
244 referenced
|= 1 << 1;
245 referenced
|= 1 << 2;
246 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
253 model_m32rx_addv (SIM_CPU
*current_cpu
, void *sem_arg
)
255 #define FLD(f) abuf->fields.sfmt_add.f
256 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
257 const IDESC
* UNUSED idesc
= abuf
->idesc
;
261 int UNUSED insn_referenced
= abuf
->written
;
267 out_dr
= FLD (out_dr
);
268 referenced
|= 1 << 0;
269 referenced
|= 1 << 1;
270 referenced
|= 1 << 2;
271 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
278 model_m32rx_addv3 (SIM_CPU
*current_cpu
, void *sem_arg
)
280 #define FLD(f) abuf->fields.sfmt_add3.f
281 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
282 const IDESC
* UNUSED idesc
= abuf
->idesc
;
286 int UNUSED insn_referenced
= abuf
->written
;
291 out_dr
= FLD (out_dr
);
292 referenced
|= 1 << 0;
293 referenced
|= 1 << 2;
294 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
301 model_m32rx_addx (SIM_CPU
*current_cpu
, void *sem_arg
)
303 #define FLD(f) abuf->fields.sfmt_add.f
304 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
305 const IDESC
* UNUSED idesc
= abuf
->idesc
;
309 int UNUSED insn_referenced
= abuf
->written
;
315 out_dr
= FLD (out_dr
);
316 referenced
|= 1 << 0;
317 referenced
|= 1 << 1;
318 referenced
|= 1 << 2;
319 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
326 model_m32rx_bc8 (SIM_CPU
*current_cpu
, void *sem_arg
)
328 #define FLD(f) abuf->fields.sfmt_bl8.f
329 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
330 const IDESC
* UNUSED idesc
= abuf
->idesc
;
334 int UNUSED insn_referenced
= abuf
->written
;
336 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
337 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
344 model_m32rx_bc24 (SIM_CPU
*current_cpu
, void *sem_arg
)
346 #define FLD(f) abuf->fields.sfmt_bl24.f
347 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
348 const IDESC
* UNUSED idesc
= abuf
->idesc
;
352 int UNUSED insn_referenced
= abuf
->written
;
354 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
355 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
362 model_m32rx_beq (SIM_CPU
*current_cpu
, void *sem_arg
)
364 #define FLD(f) abuf->fields.sfmt_beq.f
365 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
366 const IDESC
* UNUSED idesc
= abuf
->idesc
;
370 int UNUSED insn_referenced
= abuf
->written
;
372 if (insn_referenced
& (1 << 3)) referenced
|= 1 << 1;
373 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
377 int UNUSED insn_referenced
= abuf
->written
;
380 in_src1
= FLD (in_src1
);
381 in_src2
= FLD (in_src2
);
382 referenced
|= 1 << 0;
383 referenced
|= 1 << 1;
384 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 1, referenced
, in_src1
, in_src2
);
391 model_m32rx_beqz (SIM_CPU
*current_cpu
, void *sem_arg
)
393 #define FLD(f) abuf->fields.sfmt_beq.f
394 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
395 const IDESC
* UNUSED idesc
= abuf
->idesc
;
399 int UNUSED insn_referenced
= abuf
->written
;
401 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
402 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
406 int UNUSED insn_referenced
= abuf
->written
;
409 in_src2
= FLD (in_src2
);
410 referenced
|= 1 << 1;
411 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 1, referenced
, in_src1
, in_src2
);
418 model_m32rx_bgez (SIM_CPU
*current_cpu
, void *sem_arg
)
420 #define FLD(f) abuf->fields.sfmt_beq.f
421 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
422 const IDESC
* UNUSED idesc
= abuf
->idesc
;
426 int UNUSED insn_referenced
= abuf
->written
;
428 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
429 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
433 int UNUSED insn_referenced
= abuf
->written
;
436 in_src2
= FLD (in_src2
);
437 referenced
|= 1 << 1;
438 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 1, referenced
, in_src1
, in_src2
);
445 model_m32rx_bgtz (SIM_CPU
*current_cpu
, void *sem_arg
)
447 #define FLD(f) abuf->fields.sfmt_beq.f
448 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
449 const IDESC
* UNUSED idesc
= abuf
->idesc
;
453 int UNUSED insn_referenced
= abuf
->written
;
455 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
456 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
460 int UNUSED insn_referenced
= abuf
->written
;
463 in_src2
= FLD (in_src2
);
464 referenced
|= 1 << 1;
465 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 1, referenced
, in_src1
, in_src2
);
472 model_m32rx_blez (SIM_CPU
*current_cpu
, void *sem_arg
)
474 #define FLD(f) abuf->fields.sfmt_beq.f
475 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
476 const IDESC
* UNUSED idesc
= abuf
->idesc
;
480 int UNUSED insn_referenced
= abuf
->written
;
482 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
483 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
487 int UNUSED insn_referenced
= abuf
->written
;
490 in_src2
= FLD (in_src2
);
491 referenced
|= 1 << 1;
492 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 1, referenced
, in_src1
, in_src2
);
499 model_m32rx_bltz (SIM_CPU
*current_cpu
, void *sem_arg
)
501 #define FLD(f) abuf->fields.sfmt_beq.f
502 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
503 const IDESC
* UNUSED idesc
= abuf
->idesc
;
507 int UNUSED insn_referenced
= abuf
->written
;
509 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
510 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
514 int UNUSED insn_referenced
= abuf
->written
;
517 in_src2
= FLD (in_src2
);
518 referenced
|= 1 << 1;
519 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 1, referenced
, in_src1
, in_src2
);
526 model_m32rx_bnez (SIM_CPU
*current_cpu
, void *sem_arg
)
528 #define FLD(f) abuf->fields.sfmt_beq.f
529 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
530 const IDESC
* UNUSED idesc
= abuf
->idesc
;
534 int UNUSED insn_referenced
= abuf
->written
;
536 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
537 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
541 int UNUSED insn_referenced
= abuf
->written
;
544 in_src2
= FLD (in_src2
);
545 referenced
|= 1 << 1;
546 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 1, referenced
, in_src1
, in_src2
);
553 model_m32rx_bl8 (SIM_CPU
*current_cpu
, void *sem_arg
)
555 #define FLD(f) abuf->fields.sfmt_bl8.f
556 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
557 const IDESC
* UNUSED idesc
= abuf
->idesc
;
561 int UNUSED insn_referenced
= abuf
->written
;
563 referenced
|= 1 << 1;
564 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
571 model_m32rx_bl24 (SIM_CPU
*current_cpu
, void *sem_arg
)
573 #define FLD(f) abuf->fields.sfmt_bl24.f
574 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
575 const IDESC
* UNUSED idesc
= abuf
->idesc
;
579 int UNUSED insn_referenced
= abuf
->written
;
581 referenced
|= 1 << 1;
582 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
589 model_m32rx_bcl8 (SIM_CPU
*current_cpu
, void *sem_arg
)
591 #define FLD(f) abuf->fields.sfmt_bl8.f
592 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
593 const IDESC
* UNUSED idesc
= abuf
->idesc
;
597 int UNUSED insn_referenced
= abuf
->written
;
599 if (insn_referenced
& (1 << 4)) referenced
|= 1 << 1;
600 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
607 model_m32rx_bcl24 (SIM_CPU
*current_cpu
, void *sem_arg
)
609 #define FLD(f) abuf->fields.sfmt_bl24.f
610 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
611 const IDESC
* UNUSED idesc
= abuf
->idesc
;
615 int UNUSED insn_referenced
= abuf
->written
;
617 if (insn_referenced
& (1 << 4)) referenced
|= 1 << 1;
618 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
625 model_m32rx_bnc8 (SIM_CPU
*current_cpu
, void *sem_arg
)
627 #define FLD(f) abuf->fields.sfmt_bl8.f
628 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
629 const IDESC
* UNUSED idesc
= abuf
->idesc
;
633 int UNUSED insn_referenced
= abuf
->written
;
635 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
636 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
643 model_m32rx_bnc24 (SIM_CPU
*current_cpu
, void *sem_arg
)
645 #define FLD(f) abuf->fields.sfmt_bl24.f
646 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
647 const IDESC
* UNUSED idesc
= abuf
->idesc
;
651 int UNUSED insn_referenced
= abuf
->written
;
653 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
654 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
661 model_m32rx_bne (SIM_CPU
*current_cpu
, void *sem_arg
)
663 #define FLD(f) abuf->fields.sfmt_beq.f
664 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
665 const IDESC
* UNUSED idesc
= abuf
->idesc
;
669 int UNUSED insn_referenced
= abuf
->written
;
671 if (insn_referenced
& (1 << 3)) referenced
|= 1 << 1;
672 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
676 int UNUSED insn_referenced
= abuf
->written
;
679 in_src1
= FLD (in_src1
);
680 in_src2
= FLD (in_src2
);
681 referenced
|= 1 << 0;
682 referenced
|= 1 << 1;
683 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 1, referenced
, in_src1
, in_src2
);
690 model_m32rx_bra8 (SIM_CPU
*current_cpu
, void *sem_arg
)
692 #define FLD(f) abuf->fields.sfmt_bl8.f
693 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
694 const IDESC
* UNUSED idesc
= abuf
->idesc
;
698 int UNUSED insn_referenced
= abuf
->written
;
700 referenced
|= 1 << 1;
701 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
708 model_m32rx_bra24 (SIM_CPU
*current_cpu
, void *sem_arg
)
710 #define FLD(f) abuf->fields.sfmt_bl24.f
711 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
712 const IDESC
* UNUSED idesc
= abuf
->idesc
;
716 int UNUSED insn_referenced
= abuf
->written
;
718 referenced
|= 1 << 1;
719 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
726 model_m32rx_bncl8 (SIM_CPU
*current_cpu
, void *sem_arg
)
728 #define FLD(f) abuf->fields.sfmt_bl8.f
729 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
730 const IDESC
* UNUSED idesc
= abuf
->idesc
;
734 int UNUSED insn_referenced
= abuf
->written
;
736 if (insn_referenced
& (1 << 4)) referenced
|= 1 << 1;
737 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
744 model_m32rx_bncl24 (SIM_CPU
*current_cpu
, void *sem_arg
)
746 #define FLD(f) abuf->fields.sfmt_bl24.f
747 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
748 const IDESC
* UNUSED idesc
= abuf
->idesc
;
752 int UNUSED insn_referenced
= abuf
->written
;
754 if (insn_referenced
& (1 << 4)) referenced
|= 1 << 1;
755 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
762 model_m32rx_cmp (SIM_CPU
*current_cpu
, void *sem_arg
)
764 #define FLD(f) abuf->fields.sfmt_st_plus.f
765 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
766 const IDESC
* UNUSED idesc
= abuf
->idesc
;
770 int UNUSED insn_referenced
= abuf
->written
;
773 in_src1
= FLD (in_src1
);
774 in_src2
= FLD (in_src2
);
775 referenced
|= 1 << 0;
776 referenced
|= 1 << 1;
777 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
784 model_m32rx_cmpi (SIM_CPU
*current_cpu
, void *sem_arg
)
786 #define FLD(f) abuf->fields.sfmt_st_d.f
787 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
788 const IDESC
* UNUSED idesc
= abuf
->idesc
;
792 int UNUSED insn_referenced
= abuf
->written
;
795 in_src2
= FLD (in_src2
);
796 referenced
|= 1 << 1;
797 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
804 model_m32rx_cmpu (SIM_CPU
*current_cpu
, void *sem_arg
)
806 #define FLD(f) abuf->fields.sfmt_st_plus.f
807 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
808 const IDESC
* UNUSED idesc
= abuf
->idesc
;
812 int UNUSED insn_referenced
= abuf
->written
;
815 in_src1
= FLD (in_src1
);
816 in_src2
= FLD (in_src2
);
817 referenced
|= 1 << 0;
818 referenced
|= 1 << 1;
819 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
826 model_m32rx_cmpui (SIM_CPU
*current_cpu
, void *sem_arg
)
828 #define FLD(f) abuf->fields.sfmt_st_d.f
829 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
830 const IDESC
* UNUSED idesc
= abuf
->idesc
;
834 int UNUSED insn_referenced
= abuf
->written
;
837 in_src2
= FLD (in_src2
);
838 referenced
|= 1 << 1;
839 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
846 model_m32rx_cmpeq (SIM_CPU
*current_cpu
, void *sem_arg
)
848 #define FLD(f) abuf->fields.sfmt_st_plus.f
849 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
850 const IDESC
* UNUSED idesc
= abuf
->idesc
;
854 int UNUSED insn_referenced
= abuf
->written
;
857 in_src1
= FLD (in_src1
);
858 in_src2
= FLD (in_src2
);
859 referenced
|= 1 << 0;
860 referenced
|= 1 << 1;
861 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
868 model_m32rx_cmpz (SIM_CPU
*current_cpu
, void *sem_arg
)
870 #define FLD(f) abuf->fields.sfmt_st_plus.f
871 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
872 const IDESC
* UNUSED idesc
= abuf
->idesc
;
876 int UNUSED insn_referenced
= abuf
->written
;
879 in_src2
= FLD (in_src2
);
880 referenced
|= 1 << 1;
881 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
888 model_m32rx_div (SIM_CPU
*current_cpu
, void *sem_arg
)
890 #define FLD(f) abuf->fields.sfmt_add.f
891 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
892 const IDESC
* UNUSED idesc
= abuf
->idesc
;
896 int UNUSED insn_referenced
= abuf
->written
;
902 out_dr
= FLD (out_dr
);
903 referenced
|= 1 << 0;
904 if (insn_referenced
& (1 << 0)) referenced
|= 1 << 1;
905 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 2;
906 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
913 model_m32rx_divu (SIM_CPU
*current_cpu
, void *sem_arg
)
915 #define FLD(f) abuf->fields.sfmt_add.f
916 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
917 const IDESC
* UNUSED idesc
= abuf
->idesc
;
921 int UNUSED insn_referenced
= abuf
->written
;
927 out_dr
= FLD (out_dr
);
928 referenced
|= 1 << 0;
929 if (insn_referenced
& (1 << 0)) referenced
|= 1 << 1;
930 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 2;
931 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
938 model_m32rx_rem (SIM_CPU
*current_cpu
, void *sem_arg
)
940 #define FLD(f) abuf->fields.sfmt_add.f
941 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
942 const IDESC
* UNUSED idesc
= abuf
->idesc
;
946 int UNUSED insn_referenced
= abuf
->written
;
952 out_dr
= FLD (out_dr
);
953 referenced
|= 1 << 0;
954 if (insn_referenced
& (1 << 0)) referenced
|= 1 << 1;
955 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 2;
956 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
963 model_m32rx_remu (SIM_CPU
*current_cpu
, void *sem_arg
)
965 #define FLD(f) abuf->fields.sfmt_add.f
966 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
967 const IDESC
* UNUSED idesc
= abuf
->idesc
;
971 int UNUSED insn_referenced
= abuf
->written
;
977 out_dr
= FLD (out_dr
);
978 referenced
|= 1 << 0;
979 if (insn_referenced
& (1 << 0)) referenced
|= 1 << 1;
980 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 2;
981 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
988 model_m32rx_divh (SIM_CPU
*current_cpu
, void *sem_arg
)
990 #define FLD(f) abuf->fields.sfmt_add.f
991 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
992 const IDESC
* UNUSED idesc
= abuf
->idesc
;
996 int UNUSED insn_referenced
= abuf
->written
;
1000 in_sr
= FLD (in_sr
);
1001 in_dr
= FLD (in_dr
);
1002 out_dr
= FLD (out_dr
);
1003 referenced
|= 1 << 0;
1004 if (insn_referenced
& (1 << 0)) referenced
|= 1 << 1;
1005 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 2;
1006 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1013 model_m32rx_jc (SIM_CPU
*current_cpu
, void *sem_arg
)
1015 #define FLD(f) abuf->fields.sfmt_jl.f
1016 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1017 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1021 int UNUSED insn_referenced
= abuf
->written
;
1023 in_sr
= FLD (in_sr
);
1024 if (insn_referenced
& (1 << 1)) referenced
|= 1 << 0;
1025 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
1026 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
1033 model_m32rx_jnc (SIM_CPU
*current_cpu
, void *sem_arg
)
1035 #define FLD(f) abuf->fields.sfmt_jl.f
1036 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1037 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1041 int UNUSED insn_referenced
= abuf
->written
;
1043 in_sr
= FLD (in_sr
);
1044 if (insn_referenced
& (1 << 1)) referenced
|= 1 << 0;
1045 if (insn_referenced
& (1 << 2)) referenced
|= 1 << 1;
1046 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
1053 model_m32rx_jl (SIM_CPU
*current_cpu
, void *sem_arg
)
1055 #define FLD(f) abuf->fields.sfmt_jl.f
1056 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1057 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1061 int UNUSED insn_referenced
= abuf
->written
;
1063 in_sr
= FLD (in_sr
);
1064 referenced
|= 1 << 0;
1065 referenced
|= 1 << 1;
1066 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
1073 model_m32rx_jmp (SIM_CPU
*current_cpu
, void *sem_arg
)
1075 #define FLD(f) abuf->fields.sfmt_jl.f
1076 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1077 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1081 int UNUSED insn_referenced
= abuf
->written
;
1083 in_sr
= FLD (in_sr
);
1084 referenced
|= 1 << 0;
1085 referenced
|= 1 << 1;
1086 cycles
+= m32rxf_model_m32rx_u_cti (current_cpu
, idesc
, 0, referenced
, in_sr
);
1093 model_m32rx_ld (SIM_CPU
*current_cpu
, void *sem_arg
)
1095 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1096 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1097 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1101 int UNUSED insn_referenced
= abuf
->written
;
1104 in_sr
= FLD (in_sr
);
1105 out_dr
= FLD (out_dr
);
1106 referenced
|= 1 << 0;
1107 referenced
|= 1 << 1;
1108 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1115 model_m32rx_ld_d (SIM_CPU
*current_cpu
, void *sem_arg
)
1117 #define FLD(f) abuf->fields.sfmt_add3.f
1118 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1119 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1123 int UNUSED insn_referenced
= abuf
->written
;
1126 in_sr
= FLD (in_sr
);
1127 out_dr
= FLD (out_dr
);
1128 referenced
|= 1 << 0;
1129 referenced
|= 1 << 1;
1130 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1137 model_m32rx_ldb (SIM_CPU
*current_cpu
, void *sem_arg
)
1139 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1140 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1141 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1145 int UNUSED insn_referenced
= abuf
->written
;
1148 in_sr
= FLD (in_sr
);
1149 out_dr
= FLD (out_dr
);
1150 referenced
|= 1 << 0;
1151 referenced
|= 1 << 1;
1152 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1159 model_m32rx_ldb_d (SIM_CPU
*current_cpu
, void *sem_arg
)
1161 #define FLD(f) abuf->fields.sfmt_add3.f
1162 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1163 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1167 int UNUSED insn_referenced
= abuf
->written
;
1170 in_sr
= FLD (in_sr
);
1171 out_dr
= FLD (out_dr
);
1172 referenced
|= 1 << 0;
1173 referenced
|= 1 << 1;
1174 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1181 model_m32rx_ldh (SIM_CPU
*current_cpu
, void *sem_arg
)
1183 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1184 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1185 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1189 int UNUSED insn_referenced
= abuf
->written
;
1192 in_sr
= FLD (in_sr
);
1193 out_dr
= FLD (out_dr
);
1194 referenced
|= 1 << 0;
1195 referenced
|= 1 << 1;
1196 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1203 model_m32rx_ldh_d (SIM_CPU
*current_cpu
, void *sem_arg
)
1205 #define FLD(f) abuf->fields.sfmt_add3.f
1206 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1207 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1211 int UNUSED insn_referenced
= abuf
->written
;
1214 in_sr
= FLD (in_sr
);
1215 out_dr
= FLD (out_dr
);
1216 referenced
|= 1 << 0;
1217 referenced
|= 1 << 1;
1218 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1225 model_m32rx_ldub (SIM_CPU
*current_cpu
, void *sem_arg
)
1227 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1228 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1229 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1233 int UNUSED insn_referenced
= abuf
->written
;
1236 in_sr
= FLD (in_sr
);
1237 out_dr
= FLD (out_dr
);
1238 referenced
|= 1 << 0;
1239 referenced
|= 1 << 1;
1240 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1247 model_m32rx_ldub_d (SIM_CPU
*current_cpu
, void *sem_arg
)
1249 #define FLD(f) abuf->fields.sfmt_add3.f
1250 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1251 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1255 int UNUSED insn_referenced
= abuf
->written
;
1258 in_sr
= FLD (in_sr
);
1259 out_dr
= FLD (out_dr
);
1260 referenced
|= 1 << 0;
1261 referenced
|= 1 << 1;
1262 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1269 model_m32rx_lduh (SIM_CPU
*current_cpu
, void *sem_arg
)
1271 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1272 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1273 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1277 int UNUSED insn_referenced
= abuf
->written
;
1280 in_sr
= FLD (in_sr
);
1281 out_dr
= FLD (out_dr
);
1282 referenced
|= 1 << 0;
1283 referenced
|= 1 << 1;
1284 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1291 model_m32rx_lduh_d (SIM_CPU
*current_cpu
, void *sem_arg
)
1293 #define FLD(f) abuf->fields.sfmt_add3.f
1294 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1295 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1299 int UNUSED insn_referenced
= abuf
->written
;
1302 in_sr
= FLD (in_sr
);
1303 out_dr
= FLD (out_dr
);
1304 referenced
|= 1 << 0;
1305 referenced
|= 1 << 1;
1306 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1313 model_m32rx_ld_plus (SIM_CPU
*current_cpu
, void *sem_arg
)
1315 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1316 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1317 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1321 int UNUSED insn_referenced
= abuf
->written
;
1324 in_sr
= FLD (in_sr
);
1325 out_dr
= FLD (out_dr
);
1326 referenced
|= 1 << 0;
1327 referenced
|= 1 << 1;
1328 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1332 int UNUSED insn_referenced
= abuf
->written
;
1336 in_dr
= FLD (in_sr
);
1337 out_dr
= FLD (out_sr
);
1338 referenced
|= 1 << 0;
1339 referenced
|= 1 << 2;
1340 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 1, referenced
, in_sr
, in_dr
, out_dr
);
1347 model_m32rx_ld24 (SIM_CPU
*current_cpu
, void *sem_arg
)
1349 #define FLD(f) abuf->fields.sfmt_ld24.f
1350 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1351 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1355 int UNUSED insn_referenced
= abuf
->written
;
1359 out_dr
= FLD (out_dr
);
1360 referenced
|= 1 << 2;
1361 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1368 model_m32rx_ldi8 (SIM_CPU
*current_cpu
, void *sem_arg
)
1370 #define FLD(f) abuf->fields.sfmt_addi.f
1371 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1372 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1376 int UNUSED insn_referenced
= abuf
->written
;
1380 out_dr
= FLD (out_dr
);
1381 referenced
|= 1 << 2;
1382 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1389 model_m32rx_ldi16 (SIM_CPU
*current_cpu
, void *sem_arg
)
1391 #define FLD(f) abuf->fields.sfmt_add3.f
1392 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1393 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1397 int UNUSED insn_referenced
= abuf
->written
;
1401 out_dr
= FLD (out_dr
);
1402 referenced
|= 1 << 2;
1403 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1410 model_m32rx_lock (SIM_CPU
*current_cpu
, void *sem_arg
)
1412 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1413 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1414 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1418 int UNUSED insn_referenced
= abuf
->written
;
1421 in_sr
= FLD (in_sr
);
1422 out_dr
= FLD (out_dr
);
1423 referenced
|= 1 << 0;
1424 referenced
|= 1 << 1;
1425 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
1432 model_m32rx_machi_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1434 #define FLD(f) abuf->fields.sfmt_machi_a.f
1435 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1436 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1440 int UNUSED insn_referenced
= abuf
->written
;
1443 in_src1
= FLD (in_src1
);
1444 in_src2
= FLD (in_src2
);
1445 referenced
|= 1 << 0;
1446 referenced
|= 1 << 1;
1447 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
1454 model_m32rx_maclo_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1456 #define FLD(f) abuf->fields.sfmt_machi_a.f
1457 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1458 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1462 int UNUSED insn_referenced
= abuf
->written
;
1465 in_src1
= FLD (in_src1
);
1466 in_src2
= FLD (in_src2
);
1467 referenced
|= 1 << 0;
1468 referenced
|= 1 << 1;
1469 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
1476 model_m32rx_macwhi_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1478 #define FLD(f) abuf->fields.sfmt_machi_a.f
1479 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1480 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1484 int UNUSED insn_referenced
= abuf
->written
;
1487 in_src1
= FLD (in_src1
);
1488 in_src2
= FLD (in_src2
);
1489 referenced
|= 1 << 0;
1490 referenced
|= 1 << 1;
1491 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
1498 model_m32rx_macwlo_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1500 #define FLD(f) abuf->fields.sfmt_machi_a.f
1501 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1502 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1506 int UNUSED insn_referenced
= abuf
->written
;
1509 in_src1
= FLD (in_src1
);
1510 in_src2
= FLD (in_src2
);
1511 referenced
|= 1 << 0;
1512 referenced
|= 1 << 1;
1513 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
1520 model_m32rx_mul (SIM_CPU
*current_cpu
, void *sem_arg
)
1522 #define FLD(f) abuf->fields.sfmt_add.f
1523 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1524 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1528 int UNUSED insn_referenced
= abuf
->written
;
1532 in_sr
= FLD (in_sr
);
1533 in_dr
= FLD (in_dr
);
1534 out_dr
= FLD (out_dr
);
1535 referenced
|= 1 << 0;
1536 referenced
|= 1 << 1;
1537 referenced
|= 1 << 2;
1538 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1545 model_m32rx_mulhi_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1547 #define FLD(f) abuf->fields.sfmt_machi_a.f
1548 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1549 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1553 int UNUSED insn_referenced
= abuf
->written
;
1556 in_src1
= FLD (in_src1
);
1557 in_src2
= FLD (in_src2
);
1558 referenced
|= 1 << 0;
1559 referenced
|= 1 << 1;
1560 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
1567 model_m32rx_mullo_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1569 #define FLD(f) abuf->fields.sfmt_machi_a.f
1570 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1571 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1575 int UNUSED insn_referenced
= abuf
->written
;
1578 in_src1
= FLD (in_src1
);
1579 in_src2
= FLD (in_src2
);
1580 referenced
|= 1 << 0;
1581 referenced
|= 1 << 1;
1582 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
1589 model_m32rx_mulwhi_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1591 #define FLD(f) abuf->fields.sfmt_machi_a.f
1592 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1593 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1597 int UNUSED insn_referenced
= abuf
->written
;
1600 in_src1
= FLD (in_src1
);
1601 in_src2
= FLD (in_src2
);
1602 referenced
|= 1 << 0;
1603 referenced
|= 1 << 1;
1604 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
1611 model_m32rx_mulwlo_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1613 #define FLD(f) abuf->fields.sfmt_machi_a.f
1614 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1615 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1619 int UNUSED insn_referenced
= abuf
->written
;
1622 in_src1
= FLD (in_src1
);
1623 in_src2
= FLD (in_src2
);
1624 referenced
|= 1 << 0;
1625 referenced
|= 1 << 1;
1626 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
1633 model_m32rx_mv (SIM_CPU
*current_cpu
, void *sem_arg
)
1635 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1636 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1637 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1641 int UNUSED insn_referenced
= abuf
->written
;
1645 in_sr
= FLD (in_sr
);
1646 out_dr
= FLD (out_dr
);
1647 referenced
|= 1 << 0;
1648 referenced
|= 1 << 2;
1649 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1656 model_m32rx_mvfachi_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1658 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
1659 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1660 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1664 int UNUSED insn_referenced
= abuf
->written
;
1668 out_dr
= FLD (out_dr
);
1669 referenced
|= 1 << 2;
1670 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1677 model_m32rx_mvfaclo_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1679 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
1680 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1681 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1685 int UNUSED insn_referenced
= abuf
->written
;
1689 out_dr
= FLD (out_dr
);
1690 referenced
|= 1 << 2;
1691 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1698 model_m32rx_mvfacmi_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1700 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
1701 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1702 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1706 int UNUSED insn_referenced
= abuf
->written
;
1710 out_dr
= FLD (out_dr
);
1711 referenced
|= 1 << 2;
1712 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1719 model_m32rx_mvfc (SIM_CPU
*current_cpu
, void *sem_arg
)
1721 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1722 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1723 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1727 int UNUSED insn_referenced
= abuf
->written
;
1731 out_dr
= FLD (out_dr
);
1732 referenced
|= 1 << 2;
1733 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1740 model_m32rx_mvtachi_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1742 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
1743 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1744 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1748 int UNUSED insn_referenced
= abuf
->written
;
1752 in_sr
= FLD (in_src1
);
1753 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1760 model_m32rx_mvtaclo_a (SIM_CPU
*current_cpu
, void *sem_arg
)
1762 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
1763 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1764 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1768 int UNUSED insn_referenced
= abuf
->written
;
1772 in_sr
= FLD (in_src1
);
1773 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1780 model_m32rx_mvtc (SIM_CPU
*current_cpu
, void *sem_arg
)
1782 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1783 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1784 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1788 int UNUSED insn_referenced
= abuf
->written
;
1792 in_sr
= FLD (in_sr
);
1793 referenced
|= 1 << 0;
1794 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1801 model_m32rx_neg (SIM_CPU
*current_cpu
, void *sem_arg
)
1803 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1804 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1805 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1809 int UNUSED insn_referenced
= abuf
->written
;
1813 in_sr
= FLD (in_sr
);
1814 out_dr
= FLD (out_dr
);
1815 referenced
|= 1 << 0;
1816 referenced
|= 1 << 2;
1817 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1824 model_m32rx_nop (SIM_CPU
*current_cpu
, void *sem_arg
)
1826 #define FLD(f) abuf->fields.sfmt_empty.f
1827 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1828 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1832 int UNUSED insn_referenced
= abuf
->written
;
1836 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1843 model_m32rx_not (SIM_CPU
*current_cpu
, void *sem_arg
)
1845 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1846 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1847 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1851 int UNUSED insn_referenced
= abuf
->written
;
1855 in_sr
= FLD (in_sr
);
1856 out_dr
= FLD (out_dr
);
1857 referenced
|= 1 << 0;
1858 referenced
|= 1 << 2;
1859 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1866 model_m32rx_rac_dsi (SIM_CPU
*current_cpu
, void *sem_arg
)
1868 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
1869 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1870 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1874 int UNUSED insn_referenced
= abuf
->written
;
1877 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
1884 model_m32rx_rach_dsi (SIM_CPU
*current_cpu
, void *sem_arg
)
1886 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
1887 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1888 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1892 int UNUSED insn_referenced
= abuf
->written
;
1895 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
1902 model_m32rx_rte (SIM_CPU
*current_cpu
, void *sem_arg
)
1904 #define FLD(f) abuf->fields.sfmt_empty.f
1905 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1906 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1910 int UNUSED insn_referenced
= abuf
->written
;
1914 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1921 model_m32rx_seth (SIM_CPU
*current_cpu
, void *sem_arg
)
1923 #define FLD(f) abuf->fields.sfmt_seth.f
1924 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1925 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1929 int UNUSED insn_referenced
= abuf
->written
;
1933 out_dr
= FLD (out_dr
);
1934 referenced
|= 1 << 2;
1935 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1942 model_m32rx_sll (SIM_CPU
*current_cpu
, void *sem_arg
)
1944 #define FLD(f) abuf->fields.sfmt_add.f
1945 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1946 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1950 int UNUSED insn_referenced
= abuf
->written
;
1954 in_sr
= FLD (in_sr
);
1955 in_dr
= FLD (in_dr
);
1956 out_dr
= FLD (out_dr
);
1957 referenced
|= 1 << 0;
1958 referenced
|= 1 << 1;
1959 referenced
|= 1 << 2;
1960 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1967 model_m32rx_sll3 (SIM_CPU
*current_cpu
, void *sem_arg
)
1969 #define FLD(f) abuf->fields.sfmt_add3.f
1970 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1971 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1975 int UNUSED insn_referenced
= abuf
->written
;
1979 in_sr
= FLD (in_sr
);
1980 out_dr
= FLD (out_dr
);
1981 referenced
|= 1 << 0;
1982 referenced
|= 1 << 2;
1983 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
1990 model_m32rx_slli (SIM_CPU
*current_cpu
, void *sem_arg
)
1992 #define FLD(f) abuf->fields.sfmt_slli.f
1993 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
1994 const IDESC
* UNUSED idesc
= abuf
->idesc
;
1998 int UNUSED insn_referenced
= abuf
->written
;
2002 in_dr
= FLD (in_dr
);
2003 out_dr
= FLD (out_dr
);
2004 referenced
|= 1 << 1;
2005 referenced
|= 1 << 2;
2006 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2013 model_m32rx_sra (SIM_CPU
*current_cpu
, void *sem_arg
)
2015 #define FLD(f) abuf->fields.sfmt_add.f
2016 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2017 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2021 int UNUSED insn_referenced
= abuf
->written
;
2025 in_sr
= FLD (in_sr
);
2026 in_dr
= FLD (in_dr
);
2027 out_dr
= FLD (out_dr
);
2028 referenced
|= 1 << 0;
2029 referenced
|= 1 << 1;
2030 referenced
|= 1 << 2;
2031 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2038 model_m32rx_sra3 (SIM_CPU
*current_cpu
, void *sem_arg
)
2040 #define FLD(f) abuf->fields.sfmt_add3.f
2041 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2042 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2046 int UNUSED insn_referenced
= abuf
->written
;
2050 in_sr
= FLD (in_sr
);
2051 out_dr
= FLD (out_dr
);
2052 referenced
|= 1 << 0;
2053 referenced
|= 1 << 2;
2054 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2061 model_m32rx_srai (SIM_CPU
*current_cpu
, void *sem_arg
)
2063 #define FLD(f) abuf->fields.sfmt_slli.f
2064 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2065 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2069 int UNUSED insn_referenced
= abuf
->written
;
2073 in_dr
= FLD (in_dr
);
2074 out_dr
= FLD (out_dr
);
2075 referenced
|= 1 << 1;
2076 referenced
|= 1 << 2;
2077 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2084 model_m32rx_srl (SIM_CPU
*current_cpu
, void *sem_arg
)
2086 #define FLD(f) abuf->fields.sfmt_add.f
2087 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2088 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2092 int UNUSED insn_referenced
= abuf
->written
;
2096 in_sr
= FLD (in_sr
);
2097 in_dr
= FLD (in_dr
);
2098 out_dr
= FLD (out_dr
);
2099 referenced
|= 1 << 0;
2100 referenced
|= 1 << 1;
2101 referenced
|= 1 << 2;
2102 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2109 model_m32rx_srl3 (SIM_CPU
*current_cpu
, void *sem_arg
)
2111 #define FLD(f) abuf->fields.sfmt_add3.f
2112 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2113 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2117 int UNUSED insn_referenced
= abuf
->written
;
2121 in_sr
= FLD (in_sr
);
2122 out_dr
= FLD (out_dr
);
2123 referenced
|= 1 << 0;
2124 referenced
|= 1 << 2;
2125 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2132 model_m32rx_srli (SIM_CPU
*current_cpu
, void *sem_arg
)
2134 #define FLD(f) abuf->fields.sfmt_slli.f
2135 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2136 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2140 int UNUSED insn_referenced
= abuf
->written
;
2144 in_dr
= FLD (in_dr
);
2145 out_dr
= FLD (out_dr
);
2146 referenced
|= 1 << 1;
2147 referenced
|= 1 << 2;
2148 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2155 model_m32rx_st (SIM_CPU
*current_cpu
, void *sem_arg
)
2157 #define FLD(f) abuf->fields.sfmt_st_plus.f
2158 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2159 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2163 int UNUSED insn_referenced
= abuf
->written
;
2166 in_src1
= FLD (in_src1
);
2167 in_src2
= FLD (in_src2
);
2168 referenced
|= 1 << 0;
2169 referenced
|= 1 << 1;
2170 cycles
+= m32rxf_model_m32rx_u_store (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2177 model_m32rx_st_d (SIM_CPU
*current_cpu
, void *sem_arg
)
2179 #define FLD(f) abuf->fields.sfmt_st_d.f
2180 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2181 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2185 int UNUSED insn_referenced
= abuf
->written
;
2188 in_src1
= FLD (in_src1
);
2189 in_src2
= FLD (in_src2
);
2190 referenced
|= 1 << 0;
2191 referenced
|= 1 << 1;
2192 cycles
+= m32rxf_model_m32rx_u_store (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2199 model_m32rx_stb (SIM_CPU
*current_cpu
, void *sem_arg
)
2201 #define FLD(f) abuf->fields.sfmt_st_plus.f
2202 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2203 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2207 int UNUSED insn_referenced
= abuf
->written
;
2210 in_src1
= FLD (in_src1
);
2211 in_src2
= FLD (in_src2
);
2212 referenced
|= 1 << 0;
2213 referenced
|= 1 << 1;
2214 cycles
+= m32rxf_model_m32rx_u_store (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2221 model_m32rx_stb_d (SIM_CPU
*current_cpu
, void *sem_arg
)
2223 #define FLD(f) abuf->fields.sfmt_st_d.f
2224 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2225 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2229 int UNUSED insn_referenced
= abuf
->written
;
2232 in_src1
= FLD (in_src1
);
2233 in_src2
= FLD (in_src2
);
2234 referenced
|= 1 << 0;
2235 referenced
|= 1 << 1;
2236 cycles
+= m32rxf_model_m32rx_u_store (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2243 model_m32rx_sth (SIM_CPU
*current_cpu
, void *sem_arg
)
2245 #define FLD(f) abuf->fields.sfmt_st_plus.f
2246 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2247 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2251 int UNUSED insn_referenced
= abuf
->written
;
2254 in_src1
= FLD (in_src1
);
2255 in_src2
= FLD (in_src2
);
2256 referenced
|= 1 << 0;
2257 referenced
|= 1 << 1;
2258 cycles
+= m32rxf_model_m32rx_u_store (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2265 model_m32rx_sth_d (SIM_CPU
*current_cpu
, void *sem_arg
)
2267 #define FLD(f) abuf->fields.sfmt_st_d.f
2268 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2269 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2273 int UNUSED insn_referenced
= abuf
->written
;
2276 in_src1
= FLD (in_src1
);
2277 in_src2
= FLD (in_src2
);
2278 referenced
|= 1 << 0;
2279 referenced
|= 1 << 1;
2280 cycles
+= m32rxf_model_m32rx_u_store (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2287 model_m32rx_st_plus (SIM_CPU
*current_cpu
, void *sem_arg
)
2289 #define FLD(f) abuf->fields.sfmt_st_plus.f
2290 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2291 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2295 int UNUSED insn_referenced
= abuf
->written
;
2298 in_src1
= FLD (in_src1
);
2299 in_src2
= FLD (in_src2
);
2300 referenced
|= 1 << 0;
2301 referenced
|= 1 << 1;
2302 cycles
+= m32rxf_model_m32rx_u_store (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2306 int UNUSED insn_referenced
= abuf
->written
;
2310 in_dr
= FLD (in_src2
);
2311 out_dr
= FLD (out_src2
);
2312 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 1, referenced
, in_sr
, in_dr
, out_dr
);
2319 model_m32rx_sth_plus (SIM_CPU
*current_cpu
, void *sem_arg
)
2321 #define FLD(f) abuf->fields.sfmt_st_plus.f
2322 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2323 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2327 int UNUSED insn_referenced
= abuf
->written
;
2330 in_src1
= FLD (in_src1
);
2331 in_src2
= FLD (in_src2
);
2332 referenced
|= 1 << 0;
2333 referenced
|= 1 << 1;
2334 cycles
+= m32rxf_model_m32rx_u_store (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2338 int UNUSED insn_referenced
= abuf
->written
;
2342 in_dr
= FLD (in_src2
);
2343 out_dr
= FLD (out_src2
);
2344 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 1, referenced
, in_sr
, in_dr
, out_dr
);
2351 model_m32rx_stb_plus (SIM_CPU
*current_cpu
, void *sem_arg
)
2353 #define FLD(f) abuf->fields.sfmt_st_plus.f
2354 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2355 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2359 int UNUSED insn_referenced
= abuf
->written
;
2362 in_src1
= FLD (in_src1
);
2363 in_src2
= FLD (in_src2
);
2364 referenced
|= 1 << 0;
2365 referenced
|= 1 << 1;
2366 cycles
+= m32rxf_model_m32rx_u_store (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2370 int UNUSED insn_referenced
= abuf
->written
;
2374 in_dr
= FLD (in_src2
);
2375 out_dr
= FLD (out_src2
);
2376 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 1, referenced
, in_sr
, in_dr
, out_dr
);
2383 model_m32rx_st_minus (SIM_CPU
*current_cpu
, void *sem_arg
)
2385 #define FLD(f) abuf->fields.sfmt_st_plus.f
2386 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2387 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2391 int UNUSED insn_referenced
= abuf
->written
;
2394 in_src1
= FLD (in_src1
);
2395 in_src2
= FLD (in_src2
);
2396 referenced
|= 1 << 0;
2397 referenced
|= 1 << 1;
2398 cycles
+= m32rxf_model_m32rx_u_store (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2402 int UNUSED insn_referenced
= abuf
->written
;
2406 in_dr
= FLD (in_src2
);
2407 out_dr
= FLD (out_src2
);
2408 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 1, referenced
, in_sr
, in_dr
, out_dr
);
2415 model_m32rx_sub (SIM_CPU
*current_cpu
, void *sem_arg
)
2417 #define FLD(f) abuf->fields.sfmt_add.f
2418 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2419 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2423 int UNUSED insn_referenced
= abuf
->written
;
2427 in_sr
= FLD (in_sr
);
2428 in_dr
= FLD (in_dr
);
2429 out_dr
= FLD (out_dr
);
2430 referenced
|= 1 << 0;
2431 referenced
|= 1 << 1;
2432 referenced
|= 1 << 2;
2433 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2440 model_m32rx_subv (SIM_CPU
*current_cpu
, void *sem_arg
)
2442 #define FLD(f) abuf->fields.sfmt_add.f
2443 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2444 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2448 int UNUSED insn_referenced
= abuf
->written
;
2452 in_sr
= FLD (in_sr
);
2453 in_dr
= FLD (in_dr
);
2454 out_dr
= FLD (out_dr
);
2455 referenced
|= 1 << 0;
2456 referenced
|= 1 << 1;
2457 referenced
|= 1 << 2;
2458 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2465 model_m32rx_subx (SIM_CPU
*current_cpu
, void *sem_arg
)
2467 #define FLD(f) abuf->fields.sfmt_add.f
2468 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2469 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2473 int UNUSED insn_referenced
= abuf
->written
;
2477 in_sr
= FLD (in_sr
);
2478 in_dr
= FLD (in_dr
);
2479 out_dr
= FLD (out_dr
);
2480 referenced
|= 1 << 0;
2481 referenced
|= 1 << 1;
2482 referenced
|= 1 << 2;
2483 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2490 model_m32rx_trap (SIM_CPU
*current_cpu
, void *sem_arg
)
2492 #define FLD(f) abuf->fields.sfmt_trap.f
2493 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2494 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2498 int UNUSED insn_referenced
= abuf
->written
;
2502 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2509 model_m32rx_unlock (SIM_CPU
*current_cpu
, void *sem_arg
)
2511 #define FLD(f) abuf->fields.sfmt_st_plus.f
2512 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2513 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2517 int UNUSED insn_referenced
= abuf
->written
;
2520 cycles
+= m32rxf_model_m32rx_u_load (current_cpu
, idesc
, 0, referenced
, in_sr
, out_dr
);
2527 model_m32rx_satb (SIM_CPU
*current_cpu
, void *sem_arg
)
2529 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2530 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2531 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2535 int UNUSED insn_referenced
= abuf
->written
;
2539 in_sr
= FLD (in_sr
);
2540 out_dr
= FLD (out_dr
);
2541 referenced
|= 1 << 0;
2542 referenced
|= 1 << 2;
2543 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2550 model_m32rx_sath (SIM_CPU
*current_cpu
, void *sem_arg
)
2552 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2553 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2554 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2558 int UNUSED insn_referenced
= abuf
->written
;
2562 in_sr
= FLD (in_sr
);
2563 out_dr
= FLD (out_dr
);
2564 referenced
|= 1 << 0;
2565 referenced
|= 1 << 2;
2566 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2573 model_m32rx_sat (SIM_CPU
*current_cpu
, void *sem_arg
)
2575 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2576 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2577 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2581 int UNUSED insn_referenced
= abuf
->written
;
2585 in_sr
= FLD (in_sr
);
2586 out_dr
= FLD (out_dr
);
2587 if (insn_referenced
& (1 << 1)) referenced
|= 1 << 0;
2588 referenced
|= 1 << 2;
2589 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2596 model_m32rx_pcmpbz (SIM_CPU
*current_cpu
, void *sem_arg
)
2598 #define FLD(f) abuf->fields.sfmt_st_plus.f
2599 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2600 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2604 int UNUSED insn_referenced
= abuf
->written
;
2607 in_src2
= FLD (in_src2
);
2608 referenced
|= 1 << 1;
2609 cycles
+= m32rxf_model_m32rx_u_cmp (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2616 model_m32rx_sadd (SIM_CPU
*current_cpu
, void *sem_arg
)
2618 #define FLD(f) abuf->fields.sfmt_empty.f
2619 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2620 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2624 int UNUSED insn_referenced
= abuf
->written
;
2627 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2634 model_m32rx_macwu1 (SIM_CPU
*current_cpu
, void *sem_arg
)
2636 #define FLD(f) abuf->fields.sfmt_st_plus.f
2637 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2638 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2642 int UNUSED insn_referenced
= abuf
->written
;
2645 in_src1
= FLD (in_src1
);
2646 in_src2
= FLD (in_src2
);
2647 referenced
|= 1 << 0;
2648 referenced
|= 1 << 1;
2649 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2656 model_m32rx_msblo (SIM_CPU
*current_cpu
, void *sem_arg
)
2658 #define FLD(f) abuf->fields.sfmt_st_plus.f
2659 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2660 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2664 int UNUSED insn_referenced
= abuf
->written
;
2667 in_src1
= FLD (in_src1
);
2668 in_src2
= FLD (in_src2
);
2669 referenced
|= 1 << 0;
2670 referenced
|= 1 << 1;
2671 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2678 model_m32rx_mulwu1 (SIM_CPU
*current_cpu
, void *sem_arg
)
2680 #define FLD(f) abuf->fields.sfmt_st_plus.f
2681 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2682 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2686 int UNUSED insn_referenced
= abuf
->written
;
2689 in_src1
= FLD (in_src1
);
2690 in_src2
= FLD (in_src2
);
2691 referenced
|= 1 << 0;
2692 referenced
|= 1 << 1;
2693 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2700 model_m32rx_maclh1 (SIM_CPU
*current_cpu
, void *sem_arg
)
2702 #define FLD(f) abuf->fields.sfmt_st_plus.f
2703 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2704 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2708 int UNUSED insn_referenced
= abuf
->written
;
2711 in_src1
= FLD (in_src1
);
2712 in_src2
= FLD (in_src2
);
2713 referenced
|= 1 << 0;
2714 referenced
|= 1 << 1;
2715 cycles
+= m32rxf_model_m32rx_u_mac (current_cpu
, idesc
, 0, referenced
, in_src1
, in_src2
);
2722 model_m32rx_sc (SIM_CPU
*current_cpu
, void *sem_arg
)
2724 #define FLD(f) abuf->fields.sfmt_empty.f
2725 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2726 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2730 int UNUSED insn_referenced
= abuf
->written
;
2734 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2741 model_m32rx_snc (SIM_CPU
*current_cpu
, void *sem_arg
)
2743 #define FLD(f) abuf->fields.sfmt_empty.f
2744 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2745 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2749 int UNUSED insn_referenced
= abuf
->written
;
2753 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2760 model_m32rx_clrpsw (SIM_CPU
*current_cpu
, void *sem_arg
)
2762 #define FLD(f) abuf->fields.sfmt_clrpsw.f
2763 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2764 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2768 int UNUSED insn_referenced
= abuf
->written
;
2772 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2779 model_m32rx_setpsw (SIM_CPU
*current_cpu
, void *sem_arg
)
2781 #define FLD(f) abuf->fields.sfmt_clrpsw.f
2782 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2783 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2787 int UNUSED insn_referenced
= abuf
->written
;
2791 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2798 model_m32rx_bset (SIM_CPU
*current_cpu
, void *sem_arg
)
2800 #define FLD(f) abuf->fields.sfmt_bset.f
2801 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2802 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2806 int UNUSED insn_referenced
= abuf
->written
;
2810 in_sr
= FLD (in_sr
);
2811 referenced
|= 1 << 0;
2812 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2819 model_m32rx_bclr (SIM_CPU
*current_cpu
, void *sem_arg
)
2821 #define FLD(f) abuf->fields.sfmt_bset.f
2822 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2823 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2827 int UNUSED insn_referenced
= abuf
->written
;
2831 in_sr
= FLD (in_sr
);
2832 referenced
|= 1 << 0;
2833 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2840 model_m32rx_btst (SIM_CPU
*current_cpu
, void *sem_arg
)
2842 #define FLD(f) abuf->fields.sfmt_bset.f
2843 const ARGBUF
* UNUSED abuf
= SEM_ARGBUF ((SEM_ARG
) sem_arg
);
2844 const IDESC
* UNUSED idesc
= abuf
->idesc
;
2848 int UNUSED insn_referenced
= abuf
->written
;
2852 in_sr
= FLD (in_sr
);
2853 referenced
|= 1 << 0;
2854 cycles
+= m32rxf_model_m32rx_u_exec (current_cpu
, idesc
, 0, referenced
, in_sr
, in_dr
, out_dr
);
2860 /* We assume UNIT_NONE == 0 because the tables don't always terminate
2863 /* Model timing data for `m32rx'. */
2865 static const INSN_TIMING m32rx_timing
[] = {
2866 { M32RXF_INSN_X_INVALID
, 0, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2867 { M32RXF_INSN_X_AFTER
, 0, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2868 { M32RXF_INSN_X_BEFORE
, 0, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2869 { M32RXF_INSN_X_CTI_CHAIN
, 0, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2870 { M32RXF_INSN_X_CHAIN
, 0, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2871 { M32RXF_INSN_X_BEGIN
, 0, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2872 { M32RXF_INSN_ADD
, model_m32rx_add
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2873 { M32RXF_INSN_ADD3
, model_m32rx_add3
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2874 { M32RXF_INSN_AND
, model_m32rx_and
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2875 { M32RXF_INSN_AND3
, model_m32rx_and3
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2876 { M32RXF_INSN_OR
, model_m32rx_or
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2877 { M32RXF_INSN_OR3
, model_m32rx_or3
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2878 { M32RXF_INSN_XOR
, model_m32rx_xor
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2879 { M32RXF_INSN_XOR3
, model_m32rx_xor3
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2880 { M32RXF_INSN_ADDI
, model_m32rx_addi
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2881 { M32RXF_INSN_ADDV
, model_m32rx_addv
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2882 { M32RXF_INSN_ADDV3
, model_m32rx_addv3
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2883 { M32RXF_INSN_ADDX
, model_m32rx_addx
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2884 { M32RXF_INSN_BC8
, model_m32rx_bc8
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2885 { M32RXF_INSN_BC24
, model_m32rx_bc24
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2886 { M32RXF_INSN_BEQ
, model_m32rx_beq
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 }, { (int) UNIT_M32RX_U_CMP
, 1, 0 } } },
2887 { M32RXF_INSN_BEQZ
, model_m32rx_beqz
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 }, { (int) UNIT_M32RX_U_CMP
, 1, 0 } } },
2888 { M32RXF_INSN_BGEZ
, model_m32rx_bgez
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 }, { (int) UNIT_M32RX_U_CMP
, 1, 0 } } },
2889 { M32RXF_INSN_BGTZ
, model_m32rx_bgtz
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 }, { (int) UNIT_M32RX_U_CMP
, 1, 0 } } },
2890 { M32RXF_INSN_BLEZ
, model_m32rx_blez
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 }, { (int) UNIT_M32RX_U_CMP
, 1, 0 } } },
2891 { M32RXF_INSN_BLTZ
, model_m32rx_bltz
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 }, { (int) UNIT_M32RX_U_CMP
, 1, 0 } } },
2892 { M32RXF_INSN_BNEZ
, model_m32rx_bnez
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 }, { (int) UNIT_M32RX_U_CMP
, 1, 0 } } },
2893 { M32RXF_INSN_BL8
, model_m32rx_bl8
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2894 { M32RXF_INSN_BL24
, model_m32rx_bl24
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2895 { M32RXF_INSN_BCL8
, model_m32rx_bcl8
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2896 { M32RXF_INSN_BCL24
, model_m32rx_bcl24
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2897 { M32RXF_INSN_BNC8
, model_m32rx_bnc8
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2898 { M32RXF_INSN_BNC24
, model_m32rx_bnc24
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2899 { M32RXF_INSN_BNE
, model_m32rx_bne
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 }, { (int) UNIT_M32RX_U_CMP
, 1, 0 } } },
2900 { M32RXF_INSN_BRA8
, model_m32rx_bra8
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2901 { M32RXF_INSN_BRA24
, model_m32rx_bra24
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2902 { M32RXF_INSN_BNCL8
, model_m32rx_bncl8
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2903 { M32RXF_INSN_BNCL24
, model_m32rx_bncl24
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2904 { M32RXF_INSN_CMP
, model_m32rx_cmp
, { { (int) UNIT_M32RX_U_CMP
, 1, 1 } } },
2905 { M32RXF_INSN_CMPI
, model_m32rx_cmpi
, { { (int) UNIT_M32RX_U_CMP
, 1, 1 } } },
2906 { M32RXF_INSN_CMPU
, model_m32rx_cmpu
, { { (int) UNIT_M32RX_U_CMP
, 1, 1 } } },
2907 { M32RXF_INSN_CMPUI
, model_m32rx_cmpui
, { { (int) UNIT_M32RX_U_CMP
, 1, 1 } } },
2908 { M32RXF_INSN_CMPEQ
, model_m32rx_cmpeq
, { { (int) UNIT_M32RX_U_CMP
, 1, 1 } } },
2909 { M32RXF_INSN_CMPZ
, model_m32rx_cmpz
, { { (int) UNIT_M32RX_U_CMP
, 1, 1 } } },
2910 { M32RXF_INSN_DIV
, model_m32rx_div
, { { (int) UNIT_M32RX_U_EXEC
, 1, 37 } } },
2911 { M32RXF_INSN_DIVU
, model_m32rx_divu
, { { (int) UNIT_M32RX_U_EXEC
, 1, 37 } } },
2912 { M32RXF_INSN_REM
, model_m32rx_rem
, { { (int) UNIT_M32RX_U_EXEC
, 1, 37 } } },
2913 { M32RXF_INSN_REMU
, model_m32rx_remu
, { { (int) UNIT_M32RX_U_EXEC
, 1, 37 } } },
2914 { M32RXF_INSN_DIVH
, model_m32rx_divh
, { { (int) UNIT_M32RX_U_EXEC
, 1, 21 } } },
2915 { M32RXF_INSN_JC
, model_m32rx_jc
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2916 { M32RXF_INSN_JNC
, model_m32rx_jnc
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2917 { M32RXF_INSN_JL
, model_m32rx_jl
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2918 { M32RXF_INSN_JMP
, model_m32rx_jmp
, { { (int) UNIT_M32RX_U_CTI
, 1, 1 } } },
2919 { M32RXF_INSN_LD
, model_m32rx_ld
, { { (int) UNIT_M32RX_U_LOAD
, 1, 1 } } },
2920 { M32RXF_INSN_LD_D
, model_m32rx_ld_d
, { { (int) UNIT_M32RX_U_LOAD
, 1, 2 } } },
2921 { M32RXF_INSN_LDB
, model_m32rx_ldb
, { { (int) UNIT_M32RX_U_LOAD
, 1, 1 } } },
2922 { M32RXF_INSN_LDB_D
, model_m32rx_ldb_d
, { { (int) UNIT_M32RX_U_LOAD
, 1, 2 } } },
2923 { M32RXF_INSN_LDH
, model_m32rx_ldh
, { { (int) UNIT_M32RX_U_LOAD
, 1, 1 } } },
2924 { M32RXF_INSN_LDH_D
, model_m32rx_ldh_d
, { { (int) UNIT_M32RX_U_LOAD
, 1, 2 } } },
2925 { M32RXF_INSN_LDUB
, model_m32rx_ldub
, { { (int) UNIT_M32RX_U_LOAD
, 1, 1 } } },
2926 { M32RXF_INSN_LDUB_D
, model_m32rx_ldub_d
, { { (int) UNIT_M32RX_U_LOAD
, 1, 2 } } },
2927 { M32RXF_INSN_LDUH
, model_m32rx_lduh
, { { (int) UNIT_M32RX_U_LOAD
, 1, 1 } } },
2928 { M32RXF_INSN_LDUH_D
, model_m32rx_lduh_d
, { { (int) UNIT_M32RX_U_LOAD
, 1, 2 } } },
2929 { M32RXF_INSN_LD_PLUS
, model_m32rx_ld_plus
, { { (int) UNIT_M32RX_U_LOAD
, 1, 1 }, { (int) UNIT_M32RX_U_EXEC
, 1, 0 } } },
2930 { M32RXF_INSN_LD24
, model_m32rx_ld24
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2931 { M32RXF_INSN_LDI8
, model_m32rx_ldi8
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2932 { M32RXF_INSN_LDI16
, model_m32rx_ldi16
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2933 { M32RXF_INSN_LOCK
, model_m32rx_lock
, { { (int) UNIT_M32RX_U_LOAD
, 1, 1 } } },
2934 { M32RXF_INSN_MACHI_A
, model_m32rx_machi_a
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2935 { M32RXF_INSN_MACLO_A
, model_m32rx_maclo_a
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2936 { M32RXF_INSN_MACWHI_A
, model_m32rx_macwhi_a
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2937 { M32RXF_INSN_MACWLO_A
, model_m32rx_macwlo_a
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2938 { M32RXF_INSN_MUL
, model_m32rx_mul
, { { (int) UNIT_M32RX_U_EXEC
, 1, 4 } } },
2939 { M32RXF_INSN_MULHI_A
, model_m32rx_mulhi_a
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2940 { M32RXF_INSN_MULLO_A
, model_m32rx_mullo_a
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2941 { M32RXF_INSN_MULWHI_A
, model_m32rx_mulwhi_a
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2942 { M32RXF_INSN_MULWLO_A
, model_m32rx_mulwlo_a
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2943 { M32RXF_INSN_MV
, model_m32rx_mv
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2944 { M32RXF_INSN_MVFACHI_A
, model_m32rx_mvfachi_a
, { { (int) UNIT_M32RX_U_EXEC
, 1, 2 } } },
2945 { M32RXF_INSN_MVFACLO_A
, model_m32rx_mvfaclo_a
, { { (int) UNIT_M32RX_U_EXEC
, 1, 2 } } },
2946 { M32RXF_INSN_MVFACMI_A
, model_m32rx_mvfacmi_a
, { { (int) UNIT_M32RX_U_EXEC
, 1, 2 } } },
2947 { M32RXF_INSN_MVFC
, model_m32rx_mvfc
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2948 { M32RXF_INSN_MVTACHI_A
, model_m32rx_mvtachi_a
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2949 { M32RXF_INSN_MVTACLO_A
, model_m32rx_mvtaclo_a
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2950 { M32RXF_INSN_MVTC
, model_m32rx_mvtc
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2951 { M32RXF_INSN_NEG
, model_m32rx_neg
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2952 { M32RXF_INSN_NOP
, model_m32rx_nop
, { { (int) UNIT_M32RX_U_EXEC
, 1, 0 } } },
2953 { M32RXF_INSN_NOT
, model_m32rx_not
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2954 { M32RXF_INSN_RAC_DSI
, model_m32rx_rac_dsi
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2955 { M32RXF_INSN_RACH_DSI
, model_m32rx_rach_dsi
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2956 { M32RXF_INSN_RTE
, model_m32rx_rte
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2957 { M32RXF_INSN_SETH
, model_m32rx_seth
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2958 { M32RXF_INSN_SLL
, model_m32rx_sll
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2959 { M32RXF_INSN_SLL3
, model_m32rx_sll3
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2960 { M32RXF_INSN_SLLI
, model_m32rx_slli
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2961 { M32RXF_INSN_SRA
, model_m32rx_sra
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2962 { M32RXF_INSN_SRA3
, model_m32rx_sra3
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2963 { M32RXF_INSN_SRAI
, model_m32rx_srai
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2964 { M32RXF_INSN_SRL
, model_m32rx_srl
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2965 { M32RXF_INSN_SRL3
, model_m32rx_srl3
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2966 { M32RXF_INSN_SRLI
, model_m32rx_srli
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2967 { M32RXF_INSN_ST
, model_m32rx_st
, { { (int) UNIT_M32RX_U_STORE
, 1, 1 } } },
2968 { M32RXF_INSN_ST_D
, model_m32rx_st_d
, { { (int) UNIT_M32RX_U_STORE
, 1, 2 } } },
2969 { M32RXF_INSN_STB
, model_m32rx_stb
, { { (int) UNIT_M32RX_U_STORE
, 1, 1 } } },
2970 { M32RXF_INSN_STB_D
, model_m32rx_stb_d
, { { (int) UNIT_M32RX_U_STORE
, 1, 2 } } },
2971 { M32RXF_INSN_STH
, model_m32rx_sth
, { { (int) UNIT_M32RX_U_STORE
, 1, 1 } } },
2972 { M32RXF_INSN_STH_D
, model_m32rx_sth_d
, { { (int) UNIT_M32RX_U_STORE
, 1, 2 } } },
2973 { M32RXF_INSN_ST_PLUS
, model_m32rx_st_plus
, { { (int) UNIT_M32RX_U_STORE
, 1, 1 }, { (int) UNIT_M32RX_U_EXEC
, 1, 0 } } },
2974 { M32RXF_INSN_STH_PLUS
, model_m32rx_sth_plus
, { { (int) UNIT_M32RX_U_STORE
, 1, 1 }, { (int) UNIT_M32RX_U_EXEC
, 1, 0 } } },
2975 { M32RXF_INSN_STB_PLUS
, model_m32rx_stb_plus
, { { (int) UNIT_M32RX_U_STORE
, 1, 1 }, { (int) UNIT_M32RX_U_EXEC
, 1, 0 } } },
2976 { M32RXF_INSN_ST_MINUS
, model_m32rx_st_minus
, { { (int) UNIT_M32RX_U_STORE
, 1, 1 }, { (int) UNIT_M32RX_U_EXEC
, 1, 0 } } },
2977 { M32RXF_INSN_SUB
, model_m32rx_sub
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2978 { M32RXF_INSN_SUBV
, model_m32rx_subv
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2979 { M32RXF_INSN_SUBX
, model_m32rx_subx
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2980 { M32RXF_INSN_TRAP
, model_m32rx_trap
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2981 { M32RXF_INSN_UNLOCK
, model_m32rx_unlock
, { { (int) UNIT_M32RX_U_LOAD
, 1, 1 } } },
2982 { M32RXF_INSN_SATB
, model_m32rx_satb
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2983 { M32RXF_INSN_SATH
, model_m32rx_sath
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2984 { M32RXF_INSN_SAT
, model_m32rx_sat
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2985 { M32RXF_INSN_PCMPBZ
, model_m32rx_pcmpbz
, { { (int) UNIT_M32RX_U_CMP
, 1, 1 } } },
2986 { M32RXF_INSN_SADD
, model_m32rx_sadd
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2987 { M32RXF_INSN_MACWU1
, model_m32rx_macwu1
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2988 { M32RXF_INSN_MSBLO
, model_m32rx_msblo
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2989 { M32RXF_INSN_MULWU1
, model_m32rx_mulwu1
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2990 { M32RXF_INSN_MACLH1
, model_m32rx_maclh1
, { { (int) UNIT_M32RX_U_MAC
, 1, 1 } } },
2991 { M32RXF_INSN_SC
, model_m32rx_sc
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2992 { M32RXF_INSN_SNC
, model_m32rx_snc
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2993 { M32RXF_INSN_CLRPSW
, model_m32rx_clrpsw
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2994 { M32RXF_INSN_SETPSW
, model_m32rx_setpsw
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2995 { M32RXF_INSN_BSET
, model_m32rx_bset
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2996 { M32RXF_INSN_BCLR
, model_m32rx_bclr
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
2997 { M32RXF_INSN_BTST
, model_m32rx_btst
, { { (int) UNIT_M32RX_U_EXEC
, 1, 1 } } },
3000 #endif /* WITH_PROFILE_MODEL_P */
3003 m32rx_model_init (SIM_CPU
*cpu
)
3005 CPU_MODEL_DATA (cpu
) = (void *) zalloc (sizeof (MODEL_M32RX_DATA
));
3008 #if WITH_PROFILE_MODEL_P
3009 #define TIMING_DATA(td) td
3011 #define TIMING_DATA(td) 0
3014 static const SIM_MODEL m32rx_models
[] =
3016 { "m32rx", & m32rx_mach
, MODEL_M32RX
, TIMING_DATA (& m32rx_timing
[0]), m32rx_model_init
},
3020 /* The properties of this cpu's implementation. */
3022 static const SIM_MACH_IMP_PROPERTIES m32rxf_imp_properties
=
3034 m32rxf_prepare_run (SIM_CPU
*cpu
)
3036 if (CPU_IDESC (cpu
) == NULL
)
3037 m32rxf_init_idesc_table (cpu
);
3040 static const CGEN_INSN
*
3041 m32rxf_get_idata (SIM_CPU
*cpu
, int inum
)
3043 return CPU_IDESC (cpu
) [inum
].idata
;
3047 m32rx_init_cpu (SIM_CPU
*cpu
)
3049 CPU_REG_FETCH (cpu
) = m32rxf_fetch_register
;
3050 CPU_REG_STORE (cpu
) = m32rxf_store_register
;
3051 CPU_PC_FETCH (cpu
) = m32rxf_h_pc_get
;
3052 CPU_PC_STORE (cpu
) = m32rxf_h_pc_set
;
3053 CPU_GET_IDATA (cpu
) = m32rxf_get_idata
;
3054 CPU_MAX_INSNS (cpu
) = M32RXF_INSN__MAX
;
3055 CPU_INSN_NAME (cpu
) = cgen_insn_name
;
3056 CPU_FULL_ENGINE_FN (cpu
) = m32rxf_engine_run_full
;
3058 CPU_FAST_ENGINE_FN (cpu
) = m32rxf_engine_run_fast
;
3060 CPU_FAST_ENGINE_FN (cpu
) = m32rxf_engine_run_full
;
3064 const SIM_MACH m32rx_mach
=
3066 "m32rx", "m32rx", MACH_M32RX
,
3067 32, 32, & m32rx_models
[0], & m32rxf_imp_properties
,