diff options
author | Doug Evans <dje@google.com> | 1999-01-06 03:04:25 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1999-01-06 03:04:25 +0000 |
commit | 368fc7dba80399d03f2310a7288ab1690694fc80 (patch) | |
tree | 932c7541c893896647550927919b13af4dbe26c9 /sim/m32r/model.c | |
parent | d9455383f97d305d38e582bc305b0d88a5c6e13e (diff) | |
download | gdb-368fc7dba80399d03f2310a7288ab1690694fc80.zip gdb-368fc7dba80399d03f2310a7288ab1690694fc80.tar.gz gdb-368fc7dba80399d03f2310a7288ab1690694fc80.tar.bz2 |
* Makefile.in (MAIN_INCLUDE_DEPS): Delete.
(INCLUDE_DEPS,OPS_INCLUDE_DEPS): Delete.
(sim-if.o): Use SIM_MAIN_DEPS.
(arch.o,traps.o,devices.o): Ditto.
(M32RBF_INCLUDE_DEPS): Use CGEN_MAIN_CPU_DEPS.
(m32r.o,mloop.o,cpu.o,decode.o,sem.o,model.o): Simplify dependencies.
(m32rx.o,mloopx.o,cpux.o,decodex.o,semx.o,modelx.o): Ditto.
(stamp-arch): Pass mach=all to cgen-arch.
* cpu.c,cpu.h,decode.c,model.c,sem-switch.c,sem.c: Regenerate.
* m32r-sim.h (fr30bf_h_cr_[gs]et_handler): Declare.
([GS]ET_H_CR): Define.
(fr30bf_h_psw_[gs]et_handler): Declare.
([GS]ET_H_PSW): Define.
(fr30bf_h_accum_[gs]et_handler): Declare.
([GS]ET_H_ACCUM): Define.
(fr30xf_h_{cr,psw,accum}_[gs]et_handler): Declare.
(fr30bf_h_accums_[gs]et_handler): Declare.
([GS]ET_H_ACCUMS): Define.
* sim-if.c (sim_open): Model probing code moved to sim-model.c.
* m32r.c (WANT_CPU): Define as m32rbf.
(all register access fns): Rename to ..._handler.
* cpux.c,cpux.h,decodex.c,modelx.c,semx.c: Regenerate.
* m32rx.c (WANT_CPU): Define as m32rxf.
(all register access fns): Rename to ..._handler.
Diffstat (limited to 'sim/m32r/model.c')
-rw-r--r-- | sim/m32r/model.c | 4353 |
1 files changed, 4064 insertions, 289 deletions
diff --git a/sim/m32r/model.c b/sim/m32r/model.c index 5012cfb..52cb292 100644 --- a/sim/m32r/model.c +++ b/sim/m32r/model.c @@ -1,6 +1,6 @@ -/* Simulator model support for m32r. +/* Simulator model support for m32rbf. -This file is machine generated with CGEN. +THIS FILE IS MACHINE GENERATED WITH CGEN. Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. @@ -22,95 +22,3812 @@ with this program; if not, write to the Free Software Foundation, Inc., */ -#define WANT_CPU -#define WANT_CPU_M32R +#define WANT_CPU m32rbf +#define WANT_CPU_M32RBF #include "sim-main.h" -#include "cpu-sim.h" -#include "cpu-opc.h" /* The profiling data is recorded here, but is accessed via the profiling mechanism. After all, this is information for profiling. */ #if WITH_PROFILE_MODEL_P -/* Track function unit usage for an instruction. */ - -void -m32r_model_profile_insn (SIM_CPU *current_cpu, ARGBUF *abuf) -{ - const MODEL *model = CPU_MODEL (current_cpu); - const INSN_TIMING *timing = MODEL_TIMING (model); - const CGEN_INSN *insn = abuf->opcode; - const UNIT *unit = &timing[CGEN_INSN_NUM (insn)].units[0]; - const UNIT *unit_end = unit + MAX_UNITS; - PROFILE_DATA *profile = CPU_PROFILE_DATA (current_cpu); - - do - { - switch (unit->name) - { - case UNIT_M32R_D_U_STORE : - PROFILE_MODEL_CYCLE_COUNT (profile) += unit->done; - m32r_model_mark_unbusy_reg (current_cpu, abuf); - break; - case UNIT_M32R_D_U_LOAD : - PROFILE_MODEL_CYCLE_COUNT (profile) += unit->done; - m32r_model_mark_busy_reg (current_cpu, abuf); - break; - case UNIT_M32R_D_U_EXEC : - PROFILE_MODEL_CYCLE_COUNT (profile) += unit->done; - m32r_model_mark_unbusy_reg (current_cpu, abuf); - break; - case UNIT_TEST_U_EXEC : - PROFILE_MODEL_CYCLE_COUNT (profile) += unit->done; - break; - } - ++unit; - } - while (unit != unit_end && unit->name != UNIT_NONE); -} - -/* Track function unit usage for an instruction. */ - -void -m32r_model_profile_cti_insn (SIM_CPU *current_cpu, ARGBUF *abuf, int taken_p) -{ - const MODEL *model = CPU_MODEL (current_cpu); - const INSN_TIMING *timing = MODEL_TIMING (model); - const CGEN_INSN *insn = abuf->opcode; - const UNIT *unit = &timing[CGEN_INSN_NUM (insn)].units[0]; - const UNIT *unit_end = unit + MAX_UNITS; - PROFILE_DATA *profile = CPU_PROFILE_DATA (current_cpu); - - do - { - switch (unit->name) - { - case UNIT_M32R_D_U_STORE : - PROFILE_MODEL_CYCLE_COUNT (profile) += unit->done; - m32r_model_mark_unbusy_reg (current_cpu, abuf); - break; - case UNIT_M32R_D_U_LOAD : - PROFILE_MODEL_CYCLE_COUNT (profile) += unit->done; - m32r_model_mark_busy_reg (current_cpu, abuf); - break; - case UNIT_M32R_D_U_EXEC : - PROFILE_MODEL_CYCLE_COUNT (profile) += unit->done; - if (taken_p) PROFILE_MODEL_CTI_STALL_COUNT (profile) += 2; - m32r_model_mark_unbusy_reg (current_cpu, abuf); - break; - case UNIT_TEST_U_EXEC : - PROFILE_MODEL_CYCLE_COUNT (profile) += unit->done; - break; - } - if (taken_p) - PROFILE_MODEL_TAKEN_COUNT (profile) += 1; - else - PROFILE_MODEL_UNTAKEN_COUNT (profile) += 1; - ++unit; - } - while (unit != unit_end && unit->name != UNIT_NONE); +/* Model handlers for each insn. */ + +static int +model_m32r_d_x_invalid (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_x_after (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_x_before (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_x_cti_chain (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_x_chain (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_x_begin (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_add (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_add3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_and (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_and3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_and3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_or (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_or3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_or3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_xor (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_xor3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_and3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_addi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + sr = FLD (in_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_addv (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addv.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_addv3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addv3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_addx (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addx.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bc8 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bc8.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 2)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bc24 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bc24.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 2)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_beq (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beq.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 3)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 1, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_beqz (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 2)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src2 = FLD (in_src2); + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 1, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bgez (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 2)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src2 = FLD (in_src2); + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 1, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bgtz (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 2)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src2 = FLD (in_src2); + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 1, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_blez (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 2)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src2 = FLD (in_src2); + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 1, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bltz (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 2)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src2 = FLD (in_src2); + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 1, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bnez (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 2)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src2 = FLD (in_src2); + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 1, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bl8 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bl8.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bl24 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bl24.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bnc8 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bc8.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 2)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bnc24 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bc24.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 2)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bne (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beq.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + if (insn_referenced & (1 << 3)) referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 1, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bra8 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bra8.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_bra24 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bra24.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_cmp (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_cmp.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_cmpi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_cmpi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src2 = FLD (in_src2); + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_cmpu (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_cmp.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_cmpui (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_cmpi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src2 = FLD (in_src2); + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cmp (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_div (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_div.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + if (insn_referenced & (1 << 2)) referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_divu (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_div.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + if (insn_referenced & (1 << 2)) referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_rem (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_div.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + if (insn_referenced & (1 << 2)) referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_remu (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_div.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + if (insn_referenced & (1 << 2)) referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_jl (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_jl.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + sr = FLD (in_sr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_jmp (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_jmp.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + sr = FLD (in_sr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_cti (current_cpu, abuf->idesc, 0, referenced, sr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ld (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ld.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ld_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ld_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ldb (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldb.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ldb_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldb_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ldh (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldh.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ldh_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldh_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ldub (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldb.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ldub_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldb_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_lduh (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldh.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_lduh_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldh_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ld_plus (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ld_plus.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_sr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 1, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ld24 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ld24.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ldi8 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldi8.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_ldi16 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldi16.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_lock (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_lock.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_machi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_machi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_mac (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_maclo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_machi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_mac (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_macwhi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_machi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_mac (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_macwlo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_machi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_mac (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mul (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mulhi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mulhi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_mac (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mullo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mulhi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_mac (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mulwhi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mulhi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_mac (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mulwlo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mulhi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_mac (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mv (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mv.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mvfachi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvfachi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mvfaclo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvfachi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mvfacmi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvfachi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mvfc (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvfc.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mvtachi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvtachi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_src1); + referenced |= 1 << 0; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mvtaclo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvtachi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_src1); + referenced |= 1 << 0; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_mvtc (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvtc.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + referenced |= 1 << 0; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_neg (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mv.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_nop (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_nop.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_not (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mv.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_rac (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_rac.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + cycles += m32rbf_model_m32r_d_u_mac (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_rach (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_rac.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = -1; + INT src2 = -1; + cycles += m32rbf_model_m32r_d_u_mac (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_rte (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_rte.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_seth (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_seth.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_sll (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_sll3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_sll3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_slli (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_slli.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_sra (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_sra3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_sll3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_srai (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_slli.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_srl (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_srl3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_sll3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_srli (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_slli.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_dr); + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_st (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_st.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = 0; + INT src2 = 0; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_store (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_st_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_st_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = 0; + INT src2 = 0; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_store (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_stb (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_stb.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = 0; + INT src2 = 0; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_store (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_stb_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_stb_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = 0; + INT src2 = 0; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_store (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_sth (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_sth.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = 0; + INT src2 = 0; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_store (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_sth_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_sth_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = 0; + INT src2 = 0; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_store (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_st_plus (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_st_plus.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = 0; + INT src2 = 0; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_store (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_src2); + sr = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 1, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_st_minus (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_st_plus.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT src1 = 0; + INT src2 = 0; + src1 = FLD (in_src1); + src2 = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 1; + cycles += m32rbf_model_m32r_d_u_store (current_cpu, abuf->idesc, 0, referenced, src1, src2); + } + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + dr = FLD (out_src2); + sr = FLD (in_src2); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 1, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_sub (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_subv (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addv.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_subx (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addx.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + sr = FLD (in_sr); + dr = FLD (out_dr); + referenced |= 1 << 0; + referenced |= 1 << 2; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_trap (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_trap.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = -1; + INT sr2 = -1; + INT dr = -1; + cycles += m32rbf_model_m32r_d_u_exec (current_cpu, abuf->idesc, 0, referenced, sr, sr2, dr); + } + return cycles; +#undef FLD +} + +static int +model_m32r_d_unlock (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_unlock.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + INT sr = 0; + INT dr = 0; + cycles += m32rbf_model_m32r_d_u_load (current_cpu, abuf->idesc, 0, referenced, sr, dr); + } + return cycles; +#undef FLD +} + +static int +model_test_x_invalid (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_x_after (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_x_before (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_x_cti_chain (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_x_chain (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_x_begin (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_empty.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_add (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_add3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_and (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_and3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_and3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_or (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_or3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_or3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_xor (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_xor3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_and3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_addi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_addv (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addv.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_addv3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addv3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_addx (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addx.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bc8 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bc8.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bc24 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bc24.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_beq (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beq.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_beqz (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bgez (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bgtz (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_blez (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bltz (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bnez (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beqz.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bl8 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bl8.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bl24 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bl24.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bnc8 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bc8.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bnc24 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bc24.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bne (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_beq.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bra8 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bra8.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_bra24 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_bra24.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_cmp (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_cmp.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_cmpi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_cmpi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_cmpu (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_cmp.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_cmpui (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_cmpi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_div (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_div.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_divu (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_div.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_rem (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_div.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_remu (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_div.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_jl (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_jl.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_jmp (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_jmp.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ld (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ld.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ld_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ld_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ldb (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldb.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ldb_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldb_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ldh (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldh.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ldh_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldh_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ldub (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldb.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ldub_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldb_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_lduh (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldh.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_lduh_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldh_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ld_plus (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ld_plus.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ld24 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ld24.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ldi8 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldi8.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_ldi16 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_ldi16.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_lock (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_lock.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_machi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_machi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_maclo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_machi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_macwhi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_machi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_macwlo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_machi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mul (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mulhi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mulhi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mullo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mulhi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mulwhi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mulhi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mulwlo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mulhi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mv (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mv.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mvfachi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvfachi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mvfaclo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvfachi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mvfacmi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvfachi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mvfc (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvfc.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mvtachi (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvtachi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mvtaclo (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvtachi.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_mvtc (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mvtc.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_neg (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mv.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_nop (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_nop.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_not (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_mv.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_rac (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_rac.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_rach (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_rac.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_rte (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_rte.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_seth (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_seth.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_sll (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_sll3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_sll3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_slli (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_slli.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_sra (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_sra3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_sll3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_srai (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_slli.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_srl (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_srl3 (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_sll3.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_srli (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_slli.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_st (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_st.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_st_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_st_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_stb (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_stb.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_stb_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_stb_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_sth (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_sth.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_sth_d (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_sth_d.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_st_plus (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_st_plus.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_st_minus (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_st_plus.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_sub (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_add.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_subv (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addv.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_subx (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_addx.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_trap (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.cti.fields.fmt_trap.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD +} + +static int +model_test_unlock (SIM_CPU *current_cpu, void *sem_arg) +{ +#define FLD(f) abuf->fields.fmt_unlock.f + ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); + int cycles = 0; + { + int referenced = 0; + int UNUSED insn_referenced = abuf->written; + cycles += m32rbf_model_test_u_exec (current_cpu, abuf->idesc, 0, referenced); + } + return cycles; +#undef FLD } /* We assume UNIT_NONE == 0 because the tables don't always terminate @@ -119,233 +3836,291 @@ m32r_model_profile_cti_insn (SIM_CPU *current_cpu, ARGBUF *abuf, int taken_p) /* Model timing data for `m32r/d'. */ static const INSN_TIMING m32r_d_timing[] = { - { { (UQI) UNIT_NONE } }, /* illegal insn */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* add */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* add3 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* and */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* and3 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* or */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* or3 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* xor */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* xor3 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* addi */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* addv */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* addv3 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* addx */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bc8 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bc24 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* beq */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* beqz */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bgez */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bgtz */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* blez */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bltz */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bnez */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bl8 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bl24 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bnc8 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bnc24 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bne */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bra8 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* bra24 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* cmp */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* cmpi */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* cmpu */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* cmpui */ - { { (UQI) UNIT_M32R_D_U_EXEC, 37, 37 } }, /* div */ - { { (UQI) UNIT_M32R_D_U_EXEC, 37, 37 } }, /* divu */ - { { (UQI) UNIT_M32R_D_U_EXEC, 37, 37 } }, /* rem */ - { { (UQI) UNIT_M32R_D_U_EXEC, 37, 37 } }, /* remu */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* jl */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* jmp */ - { { (UQI) UNIT_M32R_D_U_LOAD, 1, 1 } }, /* ld */ - { { (UQI) UNIT_M32R_D_U_LOAD, 2, 2 } }, /* ld-d */ - { { (UQI) UNIT_M32R_D_U_LOAD, 1, 1 } }, /* ldb */ - { { (UQI) UNIT_M32R_D_U_LOAD, 2, 2 } }, /* ldb-d */ - { { (UQI) UNIT_M32R_D_U_LOAD, 1, 1 } }, /* ldh */ - { { (UQI) UNIT_M32R_D_U_LOAD, 2, 2 } }, /* ldh-d */ - { { (UQI) UNIT_M32R_D_U_LOAD, 1, 1 } }, /* ldub */ - { { (UQI) UNIT_M32R_D_U_LOAD, 2, 2 } }, /* ldub-d */ - { { (UQI) UNIT_M32R_D_U_LOAD, 1, 1 } }, /* lduh */ - { { (UQI) UNIT_M32R_D_U_LOAD, 2, 2 } }, /* lduh-d */ - { { (UQI) UNIT_M32R_D_U_LOAD, 1, 1 } }, /* ld-plus */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* ld24 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* ldi8 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* ldi16 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* lock */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* machi */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* maclo */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* macwhi */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* macwlo */ - { { (UQI) UNIT_M32R_D_U_EXEC, 4, 4 } }, /* mul */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* mulhi */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* mullo */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* mulwhi */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* mulwlo */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* mv */ - { { (UQI) UNIT_M32R_D_U_EXEC, 2, 2 } }, /* mvfachi */ - { { (UQI) UNIT_M32R_D_U_EXEC, 2, 2 } }, /* mvfaclo */ - { { (UQI) UNIT_M32R_D_U_EXEC, 2, 2 } }, /* mvfacmi */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* mvfc */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* mvtachi */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* mvtaclo */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* mvtc */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* neg */ - { { (UQI) UNIT_M32R_D_U_EXEC, 0, 0 } }, /* nop */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* not */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* rac */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* rach */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* rte */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* seth */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* sll */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* sll3 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* slli */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* sra */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* sra3 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* srai */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* srl */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* srl3 */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* srli */ - { { (UQI) UNIT_M32R_D_U_STORE, 1, 1 } }, /* st */ - { { (UQI) UNIT_M32R_D_U_STORE, 2, 2 } }, /* st-d */ - { { (UQI) UNIT_M32R_D_U_STORE, 1, 1 } }, /* stb */ - { { (UQI) UNIT_M32R_D_U_STORE, 2, 2 } }, /* stb-d */ - { { (UQI) UNIT_M32R_D_U_STORE, 1, 1 } }, /* sth */ - { { (UQI) UNIT_M32R_D_U_STORE, 2, 2 } }, /* sth-d */ - { { (UQI) UNIT_M32R_D_U_STORE, 1, 1 } }, /* st-plus */ - { { (UQI) UNIT_M32R_D_U_STORE, 1, 1 } }, /* st-minus */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* sub */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* subv */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* subx */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* trap */ - { { (UQI) UNIT_M32R_D_U_EXEC, 1, 1 } }, /* unlock */ + { M32RBF_INSN_X_INVALID, model_m32r_d_x_invalid, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_X_AFTER, model_m32r_d_x_after, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_X_BEFORE, model_m32r_d_x_before, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_X_CTI_CHAIN, model_m32r_d_x_cti_chain, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_X_CHAIN, model_m32r_d_x_chain, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_X_BEGIN, model_m32r_d_x_begin, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADD, model_m32r_d_add, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADD3, model_m32r_d_add3, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_AND, model_m32r_d_and, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_AND3, model_m32r_d_and3, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_OR, model_m32r_d_or, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_OR3, model_m32r_d_or3, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_XOR, model_m32r_d_xor, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_XOR3, model_m32r_d_xor3, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADDI, model_m32r_d_addi, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADDV, model_m32r_d_addv, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADDV3, model_m32r_d_addv3, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADDX, model_m32r_d_addx, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BC8, model_m32r_d_bc8, { { (int) UNIT_M32R_D_U_CTI, 1, 1 } } }, + { M32RBF_INSN_BC24, model_m32r_d_bc24, { { (int) UNIT_M32R_D_U_CTI, 1, 1 } } }, + { M32RBF_INSN_BEQ, model_m32r_d_beq, { { (int) UNIT_M32R_D_U_CTI, 1, 1 }, { (int) UNIT_M32R_D_U_CMP, 1, 0 } } }, + { M32RBF_INSN_BEQZ, model_m32r_d_beqz, { { (int) UNIT_M32R_D_U_CTI, 1, 1 }, { (int) UNIT_M32R_D_U_CMP, 1, 0 } } }, + { M32RBF_INSN_BGEZ, model_m32r_d_bgez, { { (int) UNIT_M32R_D_U_CTI, 1, 1 }, { (int) UNIT_M32R_D_U_CMP, 1, 0 } } }, + { M32RBF_INSN_BGTZ, model_m32r_d_bgtz, { { (int) UNIT_M32R_D_U_CTI, 1, 1 }, { (int) UNIT_M32R_D_U_CMP, 1, 0 } } }, + { M32RBF_INSN_BLEZ, model_m32r_d_blez, { { (int) UNIT_M32R_D_U_CTI, 1, 1 }, { (int) UNIT_M32R_D_U_CMP, 1, 0 } } }, + { M32RBF_INSN_BLTZ, model_m32r_d_bltz, { { (int) UNIT_M32R_D_U_CTI, 1, 1 }, { (int) UNIT_M32R_D_U_CMP, 1, 0 } } }, + { M32RBF_INSN_BNEZ, model_m32r_d_bnez, { { (int) UNIT_M32R_D_U_CTI, 1, 1 }, { (int) UNIT_M32R_D_U_CMP, 1, 0 } } }, + { M32RBF_INSN_BL8, model_m32r_d_bl8, { { (int) UNIT_M32R_D_U_CTI, 1, 1 } } }, + { M32RBF_INSN_BL24, model_m32r_d_bl24, { { (int) UNIT_M32R_D_U_CTI, 1, 1 } } }, + { M32RBF_INSN_BNC8, model_m32r_d_bnc8, { { (int) UNIT_M32R_D_U_CTI, 1, 1 } } }, + { M32RBF_INSN_BNC24, model_m32r_d_bnc24, { { (int) UNIT_M32R_D_U_CTI, 1, 1 } } }, + { M32RBF_INSN_BNE, model_m32r_d_bne, { { (int) UNIT_M32R_D_U_CTI, 1, 1 }, { (int) UNIT_M32R_D_U_CMP, 1, 0 } } }, + { M32RBF_INSN_BRA8, model_m32r_d_bra8, { { (int) UNIT_M32R_D_U_CTI, 1, 1 } } }, + { M32RBF_INSN_BRA24, model_m32r_d_bra24, { { (int) UNIT_M32R_D_U_CTI, 1, 1 } } }, + { M32RBF_INSN_CMP, model_m32r_d_cmp, { { (int) UNIT_M32R_D_U_CMP, 1, 1 } } }, + { M32RBF_INSN_CMPI, model_m32r_d_cmpi, { { (int) UNIT_M32R_D_U_CMP, 1, 1 } } }, + { M32RBF_INSN_CMPU, model_m32r_d_cmpu, { { (int) UNIT_M32R_D_U_CMP, 1, 1 } } }, + { M32RBF_INSN_CMPUI, model_m32r_d_cmpui, { { (int) UNIT_M32R_D_U_CMP, 1, 1 } } }, + { M32RBF_INSN_DIV, model_m32r_d_div, { { (int) UNIT_M32R_D_U_EXEC, 1, 37 } } }, + { M32RBF_INSN_DIVU, model_m32r_d_divu, { { (int) UNIT_M32R_D_U_EXEC, 1, 37 } } }, + { M32RBF_INSN_REM, model_m32r_d_rem, { { (int) UNIT_M32R_D_U_EXEC, 1, 37 } } }, + { M32RBF_INSN_REMU, model_m32r_d_remu, { { (int) UNIT_M32R_D_U_EXEC, 1, 37 } } }, + { M32RBF_INSN_JL, model_m32r_d_jl, { { (int) UNIT_M32R_D_U_CTI, 1, 1 } } }, + { M32RBF_INSN_JMP, model_m32r_d_jmp, { { (int) UNIT_M32R_D_U_CTI, 1, 1 } } }, + { M32RBF_INSN_LD, model_m32r_d_ld, { { (int) UNIT_M32R_D_U_LOAD, 1, 1 } } }, + { M32RBF_INSN_LD_D, model_m32r_d_ld_d, { { (int) UNIT_M32R_D_U_LOAD, 1, 2 } } }, + { M32RBF_INSN_LDB, model_m32r_d_ldb, { { (int) UNIT_M32R_D_U_LOAD, 1, 1 } } }, + { M32RBF_INSN_LDB_D, model_m32r_d_ldb_d, { { (int) UNIT_M32R_D_U_LOAD, 1, 2 } } }, + { M32RBF_INSN_LDH, model_m32r_d_ldh, { { (int) UNIT_M32R_D_U_LOAD, 1, 1 } } }, + { M32RBF_INSN_LDH_D, model_m32r_d_ldh_d, { { (int) UNIT_M32R_D_U_LOAD, 1, 2 } } }, + { M32RBF_INSN_LDUB, model_m32r_d_ldub, { { (int) UNIT_M32R_D_U_LOAD, 1, 1 } } }, + { M32RBF_INSN_LDUB_D, model_m32r_d_ldub_d, { { (int) UNIT_M32R_D_U_LOAD, 1, 2 } } }, + { M32RBF_INSN_LDUH, model_m32r_d_lduh, { { (int) UNIT_M32R_D_U_LOAD, 1, 1 } } }, + { M32RBF_INSN_LDUH_D, model_m32r_d_lduh_d, { { (int) UNIT_M32R_D_U_LOAD, 1, 2 } } }, + { M32RBF_INSN_LD_PLUS, model_m32r_d_ld_plus, { { (int) UNIT_M32R_D_U_LOAD, 1, 1 }, { (int) UNIT_M32R_D_U_EXEC, 1, 0 } } }, + { M32RBF_INSN_LD24, model_m32r_d_ld24, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDI8, model_m32r_d_ldi8, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDI16, model_m32r_d_ldi16, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LOCK, model_m32r_d_lock, { { (int) UNIT_M32R_D_U_LOAD, 1, 1 } } }, + { M32RBF_INSN_MACHI, model_m32r_d_machi, { { (int) UNIT_M32R_D_U_MAC, 1, 1 } } }, + { M32RBF_INSN_MACLO, model_m32r_d_maclo, { { (int) UNIT_M32R_D_U_MAC, 1, 1 } } }, + { M32RBF_INSN_MACWHI, model_m32r_d_macwhi, { { (int) UNIT_M32R_D_U_MAC, 1, 1 } } }, + { M32RBF_INSN_MACWLO, model_m32r_d_macwlo, { { (int) UNIT_M32R_D_U_MAC, 1, 1 } } }, + { M32RBF_INSN_MUL, model_m32r_d_mul, { { (int) UNIT_M32R_D_U_EXEC, 1, 4 } } }, + { M32RBF_INSN_MULHI, model_m32r_d_mulhi, { { (int) UNIT_M32R_D_U_MAC, 1, 1 } } }, + { M32RBF_INSN_MULLO, model_m32r_d_mullo, { { (int) UNIT_M32R_D_U_MAC, 1, 1 } } }, + { M32RBF_INSN_MULWHI, model_m32r_d_mulwhi, { { (int) UNIT_M32R_D_U_MAC, 1, 1 } } }, + { M32RBF_INSN_MULWLO, model_m32r_d_mulwlo, { { (int) UNIT_M32R_D_U_MAC, 1, 1 } } }, + { M32RBF_INSN_MV, model_m32r_d_mv, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MVFACHI, model_m32r_d_mvfachi, { { (int) UNIT_M32R_D_U_EXEC, 1, 2 } } }, + { M32RBF_INSN_MVFACLO, model_m32r_d_mvfaclo, { { (int) UNIT_M32R_D_U_EXEC, 1, 2 } } }, + { M32RBF_INSN_MVFACMI, model_m32r_d_mvfacmi, { { (int) UNIT_M32R_D_U_EXEC, 1, 2 } } }, + { M32RBF_INSN_MVFC, model_m32r_d_mvfc, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MVTACHI, model_m32r_d_mvtachi, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MVTACLO, model_m32r_d_mvtaclo, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MVTC, model_m32r_d_mvtc, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_NEG, model_m32r_d_neg, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_NOP, model_m32r_d_nop, { { (int) UNIT_M32R_D_U_EXEC, 1, 0 } } }, + { M32RBF_INSN_NOT, model_m32r_d_not, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_RAC, model_m32r_d_rac, { { (int) UNIT_M32R_D_U_MAC, 1, 1 } } }, + { M32RBF_INSN_RACH, model_m32r_d_rach, { { (int) UNIT_M32R_D_U_MAC, 1, 1 } } }, + { M32RBF_INSN_RTE, model_m32r_d_rte, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SETH, model_m32r_d_seth, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SLL, model_m32r_d_sll, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SLL3, model_m32r_d_sll3, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SLLI, model_m32r_d_slli, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRA, model_m32r_d_sra, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRA3, model_m32r_d_sra3, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRAI, model_m32r_d_srai, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRL, model_m32r_d_srl, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRL3, model_m32r_d_srl3, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRLI, model_m32r_d_srli, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ST, model_m32r_d_st, { { (int) UNIT_M32R_D_U_STORE, 1, 1 } } }, + { M32RBF_INSN_ST_D, model_m32r_d_st_d, { { (int) UNIT_M32R_D_U_STORE, 1, 2 } } }, + { M32RBF_INSN_STB, model_m32r_d_stb, { { (int) UNIT_M32R_D_U_STORE, 1, 1 } } }, + { M32RBF_INSN_STB_D, model_m32r_d_stb_d, { { (int) UNIT_M32R_D_U_STORE, 1, 2 } } }, + { M32RBF_INSN_STH, model_m32r_d_sth, { { (int) UNIT_M32R_D_U_STORE, 1, 1 } } }, + { M32RBF_INSN_STH_D, model_m32r_d_sth_d, { { (int) UNIT_M32R_D_U_STORE, 1, 2 } } }, + { M32RBF_INSN_ST_PLUS, model_m32r_d_st_plus, { { (int) UNIT_M32R_D_U_STORE, 1, 1 }, { (int) UNIT_M32R_D_U_EXEC, 1, 0 } } }, + { M32RBF_INSN_ST_MINUS, model_m32r_d_st_minus, { { (int) UNIT_M32R_D_U_STORE, 1, 1 }, { (int) UNIT_M32R_D_U_EXEC, 1, 0 } } }, + { M32RBF_INSN_SUB, model_m32r_d_sub, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SUBV, model_m32r_d_subv, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SUBX, model_m32r_d_subx, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_TRAP, model_m32r_d_trap, { { (int) UNIT_M32R_D_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_UNLOCK, model_m32r_d_unlock, { { (int) UNIT_M32R_D_U_LOAD, 1, 1 } } }, }; /* Model timing data for `test'. */ static const INSN_TIMING test_timing[] = { - { { (UQI) UNIT_NONE } }, /* illegal insn */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* add */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* add3 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* and */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* and3 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* or */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* or3 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* xor */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* xor3 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* addi */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* addv */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* addv3 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* addx */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bc8 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bc24 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* beq */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* beqz */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bgez */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bgtz */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* blez */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bltz */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bnez */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bl8 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bl24 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bnc8 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bnc24 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bne */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bra8 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* bra24 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* cmp */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* cmpi */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* cmpu */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* cmpui */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* div */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* divu */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* rem */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* remu */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* jl */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* jmp */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ld */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ld-d */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ldb */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ldb-d */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ldh */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ldh-d */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ldub */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ldub-d */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* lduh */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* lduh-d */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ld-plus */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ld24 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ldi8 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* ldi16 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* lock */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* machi */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* maclo */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* macwhi */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* macwlo */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mul */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mulhi */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mullo */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mulwhi */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mulwlo */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mv */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mvfachi */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mvfaclo */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mvfacmi */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mvfc */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mvtachi */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mvtaclo */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* mvtc */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* neg */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* nop */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* not */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* rac */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* rach */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* rte */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* seth */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* sll */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* sll3 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* slli */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* sra */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* sra3 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* srai */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* srl */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* srl3 */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* srli */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* st */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* st-d */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* stb */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* stb-d */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* sth */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* sth-d */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* st-plus */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* st-minus */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* sub */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* subv */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* subx */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* trap */ - { { (UQI) UNIT_TEST_U_EXEC, 1, 1 } }, /* unlock */ + { M32RBF_INSN_X_INVALID, model_test_x_invalid, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_X_AFTER, model_test_x_after, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_X_BEFORE, model_test_x_before, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_X_CTI_CHAIN, model_test_x_cti_chain, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_X_CHAIN, model_test_x_chain, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_X_BEGIN, model_test_x_begin, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADD, model_test_add, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADD3, model_test_add3, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_AND, model_test_and, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_AND3, model_test_and3, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_OR, model_test_or, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_OR3, model_test_or3, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_XOR, model_test_xor, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_XOR3, model_test_xor3, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADDI, model_test_addi, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADDV, model_test_addv, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADDV3, model_test_addv3, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ADDX, model_test_addx, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BC8, model_test_bc8, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BC24, model_test_bc24, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BEQ, model_test_beq, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BEQZ, model_test_beqz, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BGEZ, model_test_bgez, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BGTZ, model_test_bgtz, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BLEZ, model_test_blez, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BLTZ, model_test_bltz, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BNEZ, model_test_bnez, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BL8, model_test_bl8, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BL24, model_test_bl24, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BNC8, model_test_bnc8, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BNC24, model_test_bnc24, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BNE, model_test_bne, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BRA8, model_test_bra8, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_BRA24, model_test_bra24, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_CMP, model_test_cmp, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_CMPI, model_test_cmpi, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_CMPU, model_test_cmpu, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_CMPUI, model_test_cmpui, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_DIV, model_test_div, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_DIVU, model_test_divu, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_REM, model_test_rem, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_REMU, model_test_remu, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_JL, model_test_jl, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_JMP, model_test_jmp, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LD, model_test_ld, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LD_D, model_test_ld_d, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDB, model_test_ldb, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDB_D, model_test_ldb_d, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDH, model_test_ldh, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDH_D, model_test_ldh_d, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDUB, model_test_ldub, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDUB_D, model_test_ldub_d, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDUH, model_test_lduh, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDUH_D, model_test_lduh_d, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LD_PLUS, model_test_ld_plus, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LD24, model_test_ld24, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDI8, model_test_ldi8, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LDI16, model_test_ldi16, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_LOCK, model_test_lock, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MACHI, model_test_machi, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MACLO, model_test_maclo, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MACWHI, model_test_macwhi, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MACWLO, model_test_macwlo, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MUL, model_test_mul, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MULHI, model_test_mulhi, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MULLO, model_test_mullo, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MULWHI, model_test_mulwhi, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MULWLO, model_test_mulwlo, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MV, model_test_mv, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MVFACHI, model_test_mvfachi, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MVFACLO, model_test_mvfaclo, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MVFACMI, model_test_mvfacmi, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MVFC, model_test_mvfc, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MVTACHI, model_test_mvtachi, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MVTACLO, model_test_mvtaclo, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_MVTC, model_test_mvtc, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_NEG, model_test_neg, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_NOP, model_test_nop, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_NOT, model_test_not, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_RAC, model_test_rac, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_RACH, model_test_rach, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_RTE, model_test_rte, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SETH, model_test_seth, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SLL, model_test_sll, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SLL3, model_test_sll3, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SLLI, model_test_slli, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRA, model_test_sra, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRA3, model_test_sra3, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRAI, model_test_srai, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRL, model_test_srl, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRL3, model_test_srl3, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SRLI, model_test_srli, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ST, model_test_st, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ST_D, model_test_st_d, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_STB, model_test_stb, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_STB_D, model_test_stb_d, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_STH, model_test_sth, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_STH_D, model_test_sth_d, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ST_PLUS, model_test_st_plus, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_ST_MINUS, model_test_st_minus, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SUB, model_test_sub, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SUBV, model_test_subv, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_SUBX, model_test_subx, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_TRAP, model_test_trap, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, + { M32RBF_INSN_UNLOCK, model_test_unlock, { { (int) UNIT_TEST_U_EXEC, 1, 1 } } }, }; #endif /* WITH_PROFILE_MODEL_P */ +static void +m32r_d_model_init (SIM_CPU *cpu) +{ + CPU_MODEL_DATA (cpu) = (void *) zalloc (sizeof (MODEL_M32R_D_DATA)); +} + +static void +test_model_init (SIM_CPU *cpu) +{ + CPU_MODEL_DATA (cpu) = (void *) zalloc (sizeof (MODEL_TEST_DATA)); +} + #if WITH_PROFILE_MODEL_P #define TIMING_DATA(td) td #else #define TIMING_DATA(td) 0 #endif -const MODEL m32r_models[] = { - { "m32r/d", &machs[MACH_M32R], TIMING_DATA (& m32r_d_timing[0]) }, - { "test", &machs[MACH_M32R], TIMING_DATA (& test_timing[0]) }, +static const MODEL m32r_models[] = +{ + { "m32r/d", & m32r_mach, MODEL_M32R_D, TIMING_DATA (& m32r_d_timing[0]), m32r_d_model_init }, + { "test", & m32r_mach, MODEL_TEST, TIMING_DATA (& test_timing[0]), test_model_init }, { 0 } }; /* The properties of this cpu's implementation. */ -const IMP_PROPERTIES m32r_imp_properties = { - sizeof (SIM_CPU) +static const MACH_IMP_PROPERTIES m32rbf_imp_properties = +{ + sizeof (SIM_CPU), #if WITH_SCACHE - , sizeof (SCACHE) + sizeof (SCACHE) +#else + 0 +#endif +}; + +static const CGEN_INSN * +m32rbf_opcode (SIM_CPU *cpu, int inum) +{ + return CPU_IDESC (cpu) [inum].opcode; +} + +static void +m32r_init_cpu (SIM_CPU *cpu) +{ + CPU_REG_FETCH (cpu) = m32rbf_fetch_register; + CPU_REG_STORE (cpu) = m32rbf_store_register; + CPU_PC_FETCH (cpu) = m32rbf_h_pc_get; + CPU_PC_STORE (cpu) = m32rbf_h_pc_set; + CPU_OPCODE (cpu) = m32rbf_opcode; + CPU_MAX_INSNS (cpu) = M32RBF_INSN_MAX; + CPU_INSN_NAME (cpu) = cgen_insn_name; + CPU_FULL_ENGINE_FN (cpu) = m32rbf_engine_run_full; +#if WITH_FAST + CPU_FAST_ENGINE_FN (cpu) = m32rbf_engine_run_fast; +#else + CPU_FAST_ENGINE_FN (cpu) = m32rbf_engine_run_full; #endif + m32rbf_init_idesc_table (cpu); +} + +const MACH m32r_mach = +{ + "m32r", "m32r", + 32, 32, & m32r_models[0], & m32rbf_imp_properties, + m32r_init_cpu }; |