| /* Simulator model support for crisv32f. |
| |
| THIS FILE IS MACHINE GENERATED WITH CGEN. |
| |
| Copyright 1996-2021 Free Software Foundation, Inc. |
| |
| This file is part of the GNU simulators. |
| |
| This file is free software; you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
| the Free Software Foundation; either version 3, or (at your option) |
| any later version. |
| |
| It is distributed in the hope that it will be useful, but WITHOUT |
| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
| License for more details. |
| |
| You should have received a copy of the GNU General Public License along |
| with this program; if not, see <http://www.gnu.org/licenses/>. |
| |
| */ |
| |
| #define WANT_CPU crisv32f |
| #define WANT_CPU_CRISV32F |
| |
| #include "sim-main.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 |
| |
| /* Model handlers for each insn. */ |
| |
| static int |
| model_crisv32_move_b_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_w_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_d_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_moveq (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_moveq.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| out_Rd = FLD (out_Rd); |
| referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movs_b_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_muls_b.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| out_Rd = FLD (out_Rd); |
| referenced |= 1 << 1; |
| referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movs_w_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_muls_b.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| out_Rd = FLD (out_Rd); |
| referenced |= 1 << 1; |
| referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movu_b_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_muls_b.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| out_Rd = FLD (out_Rd); |
| referenced |= 1 << 1; |
| referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movu_w_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_muls_b.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| out_Rd = FLD (out_Rd); |
| referenced |= 1 << 1; |
| referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movecbr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcbr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movecwr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcwr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movecdr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cd.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| out_Rd = FLD (out_Rd); |
| referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movscbr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cb.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| out_Rd = FLD (out_Rd); |
| referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movscwr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cw.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| out_Rd = FLD (out_Rd); |
| referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movucbr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cb.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| out_Rd = FLD (out_Rd); |
| referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movucwr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cw.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| out_Rd = FLD (out_Rd); |
| referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_addq (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addq.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_subq (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addq.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmp_r_b_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_muls_b.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmp_r_w_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_muls_b.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmp_r_d_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_muls_b.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmp_m_b_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmp_m_w_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmp_m_d_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmpcbr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cb.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmpcwr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cw.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmpcdr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cd.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmpq (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_andq.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmps_m_b_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmps_m_w_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmpscbr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cb.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmpscwr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cw.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmpu_m_b_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmpu_m_w_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmpucbr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cb.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_cmpucwr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_bound_cw.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_m_b_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_m_w_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_m_d_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movs_m_b_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| out_Rd = FLD (out_Rd); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 1; |
| if (insn_referenced & (1 << 7)) referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movs_m_w_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| out_Rd = FLD (out_Rd); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 1; |
| if (insn_referenced & (1 << 7)) referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movu_m_b_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| out_Rd = FLD (out_Rd); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 1; |
| if (insn_referenced & (1 << 7)) referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movu_m_w_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| out_Rd = FLD (out_Rd); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 1; |
| if (insn_referenced & (1 << 7)) referenced |= 1 << 2; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_r_sprv32 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| in_Rs = FLD (in_Rs); |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 2)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 0, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_spr_rv32 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_mcp.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_m_sprv32 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| in_Rs = FLD (in_Rs); |
| out_Pd = FLD (out_Pd); |
| if (insn_referenced & (1 << 0)) referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 2, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p2 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p3 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p5 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p6 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p7 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p9 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p10 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p11 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p12 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p13 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p14 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_c_sprv32_p15 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Pd = -1; |
| out_Pd = FLD (out_Pd); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_spr_mv32 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_w (current_cpu, idesc, 2, referenced); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_ss_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_move_r_ss (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_mcp.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movem_r_m_v32 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_movem_r_m_v32.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT in_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_movem_rtom (current_cpu, idesc, 1, referenced, in_Rs, in_Rd); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec_movem (current_cpu, idesc, 2, referenced, in_Rs, out_Rd); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_w (current_cpu, idesc, 3, referenced); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_movem_m_r_v32 (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_movem_m_r_v32.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT in_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_movem_mtor (current_cpu, idesc, 2, referenced, in_Rs, in_Rd); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec_movem (current_cpu, idesc, 3, referenced, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_add_b_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_add_w_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_add_d_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_add_m_b_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_add_m_w_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_add_m_d_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_addcbr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcbr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_addcwr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcwr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_addcdr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcdr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_adds_b_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_adds_w_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_adds_m_b_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_adds_m_w_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_addscbr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcbr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_addscwr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcwr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_addu_b_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_addu_w_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_addu_m_b_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_addu_m_w_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_adducbr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcbr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_adducwr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcwr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_sub_b_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_sub_w_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_sub_d_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_sub_m_b_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_sub_m_w_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_sub_m_d_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_subcbr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcbr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_subcwr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcwr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_subcdr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcdr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_subs_b_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_subs_w_r (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addc_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_subs_m_b_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_subs_m_w_m (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_add_m_b_m.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rs = -1; |
| in_Rs = FLD (in_Rs); |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 0; |
| cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); |
| } |
| { |
| int referenced = 0; |
| int UNUSED insn_referenced = abuf->written; |
| INT in_Rd = -1; |
| INT in_Rs = -1; |
| INT out_Rd = -1; |
| in_Rd = FLD (in_Rd); |
| in_Rs = FLD (in_Rs); |
| referenced |= 1 << 0; |
| if (insn_referenced & (1 << 1)) referenced |= 1 << 1; |
| cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); |
| } |
| return cycles; |
| #undef FLD |
| } |
| |
| static int |
| model_crisv32_subscbr (SIM_CPU *current_cpu, void *sem_arg) |
| { |
| #define FLD(f) abuf->fields.sfmt_addcbr.f |
| const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); |
| const IDESC * UNUSED idesc = abuf->idesc; |
| int cycles = 0; |
| |