#define WANT_CPU sh64
#define WANT_CPU_SH64
#include "sim-main.h"
#include "cgen-mem.h"
#include "cgen-ops.h"
#undef GET_ATTR
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
#else
#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_attr)
#endif
#if FAST_P
#define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_semf_,fn)
#undef TRACE_RESULT
#define TRACE_RESULT(cpu, abuf, name, type, val)
#else
#define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_sem_,fn)
#endif
static SEM_PC
SEM_FN_NAME (sh64_compact,x_invalid) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
SET_H_PC (pc);
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,x_after) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
#if WITH_SCACHE_PBB_SH64_COMPACT
sh64_compact_pbb_after (current_cpu, sem_arg);
#endif
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,x_before) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
#if WITH_SCACHE_PBB_SH64_COMPACT
sh64_compact_pbb_before (current_cpu, sem_arg);
#endif
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,x_cti_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
#if WITH_SCACHE_PBB_SH64_COMPACT
#ifdef DEFINE_SWITCH
vpc = sh64_compact_pbb_cti_chain (current_cpu, sem_arg,
pbb_br_type, pbb_br_npc);
BREAK (sem);
#else
vpc = sh64_compact_pbb_cti_chain (current_cpu, sem_arg,
CPU_PBB_BR_TYPE (current_cpu),
CPU_PBB_BR_NPC (current_cpu));
#endif
#endif
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,x_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
#if WITH_SCACHE_PBB_SH64_COMPACT
vpc = sh64_compact_pbb_chain (current_cpu, sem_arg);
#ifdef DEFINE_SWITCH
BREAK (sem);
#endif
#endif
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,x_begin) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
#if WITH_SCACHE_PBB_SH64_COMPACT
#if defined DEFINE_SWITCH || defined FAST_P
vpc = sh64_compact_pbb_begin (current_cpu, FAST_P);
#else
#if 0
vpc = sh64_compact_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
#else
vpc = sh64_compact_pbb_begin (current_cpu, 0);
#endif
#endif
#endif
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,add_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,addi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), EXTQISI (ANDQI (FLD (f_imm8), 255)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,addc_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_flag;
tmp_flag = ADDCFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
{
SI opval = ADDCSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = tmp_flag;
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,addv_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_t;
tmp_t = ADDOFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), 0);
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = tmp_t;
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,and_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI opval = ANDDI (GET_H_GR (FLD (f_rm)), GET_H_GR (FLD (f_rn)));
SET_H_GR (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,andi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = ANDSI (GET_H_GRC (((UINT) 0)), ZEXTSIDI (FLD (f_imm8)));
SET_H_GRC (((UINT) 0), opval);
TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,andb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
UQI tmp_data;
tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
tmp_data = ANDQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8));
{
UQI opval = tmp_data;
SETMEMUQI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,bf_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_bf_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (NOTBI (GET_H_TBIT ())) {
{
UDI opval = FLD (i_disp8);
SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
written |= (1 << 2);
TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
}
}
abuf->written = written;
SEM_BRANCH_FINI (vpc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,bfs_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_bf_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (NOTBI (GET_H_TBIT ())) {
{
{
UDI opval = FLD (i_disp8);
SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
written |= (1 << 2);
TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
}
}
}
abuf->written = written;
SEM_BRANCH_FINI (vpc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,bra_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_bra_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
UDI opval = FLD (i_disp12);
SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
}
}
SEM_BRANCH_FINI (vpc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,braf_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
UDI opval = ADDDI (EXTSIDI (GET_H_GRC (FLD (f_rn))), ADDDI (pc, 4));
SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
}
}
SEM_BRANCH_FINI (vpc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,brk_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
sh64_break (current_cpu, pc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,bsr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_bra_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
{
SI opval = ADDDI (pc, 4);
SET_H_PR (opval);
TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
}
{
UDI opval = FLD (i_disp12);
SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
}
}
}
SEM_BRANCH_FINI (vpc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,bsrf_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
{
SI opval = ADDDI (pc, 4);
SET_H_PR (opval);
TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
}
{
UDI opval = ADDDI (EXTSIDI (GET_H_GRC (FLD (f_rn))), ADDDI (pc, 4));
SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
}
}
}
SEM_BRANCH_FINI (vpc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,bt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_bf_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_TBIT ()) {
{
UDI opval = FLD (i_disp8);
SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
written |= (1 << 2);
TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
}
}
abuf->written = written;
SEM_BRANCH_FINI (vpc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,bts_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_bf_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_TBIT ()) {
{
{
UDI opval = FLD (i_disp8);
SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
written |= (1 << 2);
TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
}
}
}
abuf->written = written;
SEM_BRANCH_FINI (vpc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,clrmac_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
SI opval = 0;
SET_H_MACL (opval);
TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
}
{
SI opval = 0;
SET_H_MACH (opval);
TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,clrs_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = 0;
SET_H_SBIT (opval);
TRACE_RESULT (current_cpu, abuf, "sbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,clrt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = 0;
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,cmpeq_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = EQSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,cmpeqi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = EQSI (GET_H_GRC (((UINT) 0)), EXTQISI (ANDQI (FLD (f_imm8), 255)));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,cmpge_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = GESI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,cmpgt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = GTSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,cmphi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = GTUSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,cmphs_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = GEUSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,cmppl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = GTSI (GET_H_GRC (FLD (f_rn)), 0);
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,cmppz_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = GESI (GET_H_GRC (FLD (f_rn)), 0);
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,cmpstr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_t;
SI tmp_temp;
tmp_temp = XORSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
tmp_t = EQSI (ANDSI (tmp_temp, 0xff000000), 0);
tmp_t = ORBI (EQSI (ANDSI (tmp_temp, 16711680), 0), tmp_t);
tmp_t = ORBI (EQSI (ANDSI (tmp_temp, 65280), 0), tmp_t);
tmp_t = ORBI (EQSI (ANDSI (tmp_temp, 255), 0), tmp_t);
{
BI opval = ((GTUBI (tmp_t, 0)) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,div0s_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
BI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
SET_H_QBIT (opval);
TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
}
{
BI opval = SRLSI (GET_H_GRC (FLD (f_rm)), 31);
SET_H_MBIT (opval);
TRACE_RESULT (current_cpu, abuf, "mbit", 'x', opval);
}
{
BI opval = ((EQSI (SRLSI (GET_H_GRC (FLD (f_rm)), 31), SRLSI (GET_H_GRC (FLD (f_rn)), 31))) ? (0) : (1));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,div0u_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
BI opval = 0;
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
{
BI opval = 0;
SET_H_QBIT (opval);
TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
}
{
BI opval = 0;
SET_H_MBIT (opval);
TRACE_RESULT (current_cpu, abuf, "mbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,div1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_oldq;
SI tmp_tmp0;
UQI tmp_tmp1;
tmp_oldq = GET_H_QBIT ();
{
BI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
SET_H_QBIT (opval);
TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
}
{
SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rn)), 1), ZEXTBISI (GET_H_TBIT ()));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
if (NOTBI (tmp_oldq)) {
if (NOTBI (GET_H_MBIT ())) {
{
tmp_tmp0 = GET_H_GRC (FLD (f_rn));
{
SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
tmp_tmp1 = GTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
if (NOTBI (GET_H_QBIT ())) {
{
BI opval = ((tmp_tmp1) ? (1) : (0));
SET_H_QBIT (opval);
TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
}
} else {
{
BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
SET_H_QBIT (opval);
TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
}
}
}
} else {
{
tmp_tmp0 = GET_H_GRC (FLD (f_rn));
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
tmp_tmp1 = LTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
if (NOTBI (GET_H_QBIT ())) {
{
BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
SET_H_QBIT (opval);
TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
}
} else {
{
BI opval = ((tmp_tmp1) ? (1) : (0));
SET_H_QBIT (opval);
TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
}
}
}
}
} else {
if (NOTBI (GET_H_MBIT ())) {
{
tmp_tmp0 = GET_H_GRC (FLD (f_rn));
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
tmp_tmp1 = LTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
if (NOTBI (GET_H_QBIT ())) {
{
BI opval = ((tmp_tmp1) ? (1) : (0));
SET_H_QBIT (opval);
TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
}
} else {
{
BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
SET_H_QBIT (opval);
TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
}
}
}
} else {
{
tmp_tmp0 = GET_H_GRC (FLD (f_rn));
{
SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
tmp_tmp1 = GTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
if (NOTBI (GET_H_QBIT ())) {
{
BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
SET_H_QBIT (opval);
TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
}
} else {
{
BI opval = ((tmp_tmp1) ? (1) : (0));
SET_H_QBIT (opval);
TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
}
}
}
}
}
{
BI opval = ((EQBI (GET_H_QBIT (), GET_H_MBIT ())) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,dmulsl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_result;
tmp_result = MULDI (EXTSIDI (GET_H_GRC (FLD (f_rm))), EXTSIDI (GET_H_GRC (FLD (f_rn))));
{
SI opval = SUBWORDDISI (tmp_result, 0);
SET_H_MACH (opval);
TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
}
{
SI opval = SUBWORDDISI (tmp_result, 1);
SET_H_MACL (opval);
TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,dmulul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_result;
tmp_result = MULDI (ZEXTSIDI (GET_H_GRC (FLD (f_rm))), ZEXTSIDI (GET_H_GRC (FLD (f_rn))));
{
SI opval = SUBWORDDISI (tmp_result, 0);
SET_H_MACH (opval);
TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
}
{
SI opval = SUBWORDDISI (tmp_result, 1);
SET_H_MACL (opval);
TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,dt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), 1);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = EQSI (GET_H_GRC (FLD (f_rn)), 0);
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,extsb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTQISI (SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 3));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,extsw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,extub_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = ZEXTQISI (SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 3));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,extuw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fabs_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_PRBIT ()) {
{
DF opval = sh64_fabsd (current_cpu, GET_H_DR (FLD (f_rn)));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 5);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
}
} else {
{
SF opval = sh64_fabss (current_cpu, GET_H_FRC (FLD (f_rn)));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 4);
TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fadd_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_PRBIT ()) {
{
DF opval = sh64_faddd (current_cpu, GET_H_DR (FLD (f_rm)), GET_H_DR (FLD (f_rn)));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
}
} else {
{
SF opval = sh64_fadds (current_cpu, GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fcmpeq_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_PRBIT ()) {
{
BI opval = sh64_fcmpeqd (current_cpu, GET_H_DR (FLD (f_rm)), GET_H_DR (FLD (f_rn)));
SET_H_TBIT (opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
} else {
{
BI opval = sh64_fcmpeqs (current_cpu, GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
SET_H_TBIT (opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fcmpgt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_PRBIT ()) {
{
BI opval = sh64_fcmpgtd (current_cpu, GET_H_DR (FLD (f_rn)), GET_H_DR (FLD (f_rm)));
SET_H_TBIT (opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
} else {
{
BI opval = sh64_fcmpgts (current_cpu, GET_H_FRC (FLD (f_rn)), GET_H_FRC (FLD (f_rm)));
SET_H_TBIT (opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fcnvds_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_fcnvds_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SF opval = sh64_fcnvds (current_cpu, GET_H_DRC (FLD (f_dn)));
CPU (h_fr[((UINT) 32)]) = opval;
TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fcnvsd_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_fcnvds_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DF opval = sh64_fcnvsd (current_cpu, CPU (h_fr[((UINT) 32)]));
SET_H_DRC (FLD (f_dn), opval);
TRACE_RESULT (current_cpu, abuf, "drn", 'f', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fdiv_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_PRBIT ()) {
{
DF opval = sh64_fdivd (current_cpu, GET_H_DR (FLD (f_rn)), GET_H_DR (FLD (f_rm)));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
}
} else {
{
SF opval = sh64_fdivs (current_cpu, GET_H_FRC (FLD (f_rn)), GET_H_FRC (FLD (f_rm)));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fipr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_fipr_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
QI tmp_m;
QI tmp_n;
SF tmp_res;
tmp_m = FLD (f_vm);
tmp_n = FLD (f_vn);
tmp_res = sh64_fmuls (current_cpu, GET_H_FVC (FLD (f_vm)), GET_H_FVC (FLD (f_vn)));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_FRC (ADDQI (tmp_m, 1)), GET_H_FRC (ADDQI (tmp_n, 1))));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_FRC (ADDQI (tmp_m, 2)), GET_H_FRC (ADDQI (tmp_n, 2))));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_FRC (ADDQI (tmp_m, 3)), GET_H_FRC (ADDQI (tmp_n, 3))));
{
SF opval = tmp_res;
SET_H_FRC (ADDQI (tmp_n, 3), opval);
TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-3", 'f', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,flds_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SF opval = GET_H_FRC (FLD (f_rn));
CPU (h_fr[((UINT) 32)]) = opval;
TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fldi0_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SF opval = sh64_fldi0 (current_cpu);
SET_H_FRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fldi1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SF opval = sh64_fldi1 (current_cpu);
SET_H_FRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,float_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_PRBIT ()) {
{
DF opval = sh64_floatld (current_cpu, CPU (h_fr[((UINT) 32)]));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 4);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
}
} else {
{
SF opval = sh64_floatls (current_cpu, CPU (h_fr[((UINT) 32)]));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 3);
TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fmac_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SF opval = sh64_fmacs (current_cpu, GET_H_FRC (((UINT) 0)), GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
SET_H_FRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fmov1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (NOTBI (GET_H_SZBIT ())) {
{
SF opval = GET_H_FRC (FLD (f_rm));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 6);
TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
}
} else {
if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
{
DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
}
} else {
{
DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
}
}
} else {
if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
{
DF opval = GET_H_DR (FLD (f_rm));
SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
}
} else {
{
DF opval = GET_H_DR (FLD (f_rm));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
}
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fmov2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (NOTBI (GET_H_SZBIT ())) {
{
SF opval = GETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 5);
TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
}
} else {
if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
{
DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
}
} else {
{
DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 6);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fmov3_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (NOTBI (GET_H_SZBIT ())) {
{
{
SF opval = GETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 5);
TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
}
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
}
} else {
{
if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
{
DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
}
} else {
{
DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 6);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
}
}
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 8);
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fmov4_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (NOTBI (GET_H_SZBIT ())) {
{
SF opval = GETMEMSF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 6);
TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
}
} else {
if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
{
DF opval = GETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
}
} else {
{
DF opval = GETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fmov5_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (NOTBI (GET_H_SZBIT ())) {
{
SF opval = GET_H_FRC (FLD (f_rm));
SETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
written |= (1 << 6);
TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
}
} else {
if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
{
DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
}
} else {
{
DF opval = GET_H_DR (FLD (f_rm));
SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fmov6_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (NOTBI (GET_H_SZBIT ())) {
{
{
SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
SET_H_GRC (FLD (f_rn), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
SF opval = GET_H_FRC (FLD (f_rm));
SETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
written |= (1 << 6);
TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
}
}
} else {
{
{
SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), 8);
SET_H_GRC (FLD (f_rn), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
{
DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
}
} else {
{
DF opval = GET_H_DR (FLD (f_rm));
SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
}
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fmov7_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (NOTBI (GET_H_SZBIT ())) {
{
SF opval = GET_H_FRC (FLD (f_rm));
SETMEMSF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
}
} else {
if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
{
DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
SETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
}
} else {
{
DF opval = GET_H_DR (FLD (f_rm));
SETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fmul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_PRBIT ()) {
{
DF opval = sh64_fmuld (current_cpu, GET_H_DR (FLD (f_rm)), GET_H_DR (FLD (f_rn)));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
}
} else {
{
SF opval = sh64_fmuls (current_cpu, GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fneg_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_PRBIT ()) {
{
DF opval = sh64_fnegd (current_cpu, GET_H_DR (FLD (f_rn)));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 5);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
}
} else {
{
SF opval = sh64_fnegs (current_cpu, GET_H_FRC (FLD (f_rn)));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 4);
TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,frchg_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = NOTBI (GET_H_FRBIT ());
SET_H_FRBIT (opval);
TRACE_RESULT (current_cpu, abuf, "frbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fschg_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = NOTBI (GET_H_SZBIT ());
SET_H_SZBIT (opval);
TRACE_RESULT (current_cpu, abuf, "szbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fsqrt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_PRBIT ()) {
{
DF opval = sh64_fsqrtd (current_cpu, GET_H_DR (FLD (f_rn)));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 5);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
}
} else {
{
SF opval = sh64_fsqrts (current_cpu, GET_H_FRC (FLD (f_rn)));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 4);
TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fsts_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SF opval = CPU (h_fr[((UINT) 32)]);
SET_H_FRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,fsub_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
if (GET_H_PRBIT ()) {
{
DF opval = sh64_fsubd (current_cpu, GET_H_DR (FLD (f_rn)), GET_H_DR (FLD (f_rm)));
SET_H_DR (FLD (f_rn), opval);
written |= (1 << 8);
TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
}
} else {
{
SF opval = sh64_fsubs (current_cpu, GET_H_FRC (FLD (f_rn)), GET_H_FRC (FLD (f_rm)));
SET_H_FRC (FLD (f_rn), opval);
written |= (1 << 7);
TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ftrc_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SF opval = ((GET_H_PRBIT ()) ? (sh64_ftrcdl (current_cpu, GET_H_DR (FLD (f_rn)))) : (sh64_ftrcsl (current_cpu, GET_H_FRC (FLD (f_rn)))));
CPU (h_fr[((UINT) 32)]) = opval;
TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ftrv_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_fipr_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
QI tmp_n;
SF tmp_res;
tmp_n = FLD (f_vn);
tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 0)), GET_H_FRC (tmp_n));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 4)), GET_H_FRC (ADDQI (tmp_n, 1))));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 8)), GET_H_FRC (ADDQI (tmp_n, 2))));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 12)), GET_H_FRC (ADDQI (tmp_n, 3))));
{
SF opval = tmp_res;
SET_H_FRC (tmp_n, opval);
TRACE_RESULT (current_cpu, abuf, "frc-n", 'f', opval);
}
tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 1)), GET_H_FRC (tmp_n));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 5)), GET_H_FRC (ADDQI (tmp_n, 1))));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 9)), GET_H_FRC (ADDQI (tmp_n, 2))));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 13)), GET_H_FRC (ADDQI (tmp_n, 3))));
{
SF opval = tmp_res;
SET_H_FRC (ADDQI (tmp_n, 1), opval);
TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-1", 'f', opval);
}
tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 2)), GET_H_FRC (tmp_n));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 6)), GET_H_FRC (ADDQI (tmp_n, 1))));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 10)), GET_H_FRC (ADDQI (tmp_n, 2))));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 14)), GET_H_FRC (ADDQI (tmp_n, 3))));
{
SF opval = tmp_res;
SET_H_FRC (ADDQI (tmp_n, 2), opval);
TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-2", 'f', opval);
}
tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 3)), GET_H_FRC (tmp_n));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 7)), GET_H_FRC (ADDQI (tmp_n, 1))));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 11)), GET_H_FRC (ADDQI (tmp_n, 2))));
tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 15)), GET_H_FRC (ADDQI (tmp_n, 3))));
{
SF opval = tmp_res;
SET_H_FRC (ADDQI (tmp_n, 3), opval);
TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-3", 'f', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,jmp_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
UDI opval = GET_H_GRC (FLD (f_rn));
SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
}
}
SEM_BRANCH_FINI (vpc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,jsr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
{
SI opval = ADDDI (pc, 4);
SET_H_PR (opval);
TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
}
{
UDI opval = GET_H_GRC (FLD (f_rn));
SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
}
}
}
SEM_BRANCH_FINI (vpc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ldc_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_GRC (FLD (f_rn));
SET_H_GBR (opval);
TRACE_RESULT (current_cpu, abuf, "gbr", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ldcl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
SET_H_GBR (opval);
TRACE_RESULT (current_cpu, abuf, "gbr", 'x', opval);
}
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,lds_fpscr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_GRC (FLD (f_rn));
SET_H_FPCCR (opval);
TRACE_RESULT (current_cpu, abuf, "fpscr", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ldsl_fpscr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
SET_H_FPCCR (opval);
TRACE_RESULT (current_cpu, abuf, "fpscr", 'x', opval);
}
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,lds_fpul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SF opval = SUBWORDSISF (GET_H_GRC (FLD (f_rn)));
CPU (h_fr[((UINT) 32)]) = opval;
TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ldsl_fpul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
SF opval = GETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
CPU (h_fr[((UINT) 32)]) = opval;
TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
}
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,lds_mach_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_GRC (FLD (f_rn));
SET_H_MACH (opval);
TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ldsl_mach_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
SET_H_MACH (opval);
TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
}
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,lds_macl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_GRC (FLD (f_rn));
SET_H_MACL (opval);
TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ldsl_macl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
SET_H_MACL (opval);
TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
}
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,lds_pr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_GRC (FLD (f_rn));
SET_H_PR (opval);
TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ldsl_pr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
SET_H_PR (opval);
TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
}
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,macl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_tmpry;
DI tmp_mac;
DI tmp_result;
SI tmp_x;
SI tmp_y;
tmp_x = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
if (EQSI (FLD (f_rn), FLD (f_rm))) {
{
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 11);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
}
}
tmp_y = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 11);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
tmp_tmpry = MULDI (ZEXTSIDI (tmp_x), ZEXTSIDI (tmp_y));
tmp_mac = ORDI (SLLDI (ZEXTSIDI (GET_H_MACH ()), 32), ZEXTSIDI (GET_H_MACL ()));
tmp_result = ADDDI (tmp_mac, tmp_tmpry);
{
if (GET_H_SBIT ()) {
{
SI tmp_min;
SI tmp_max;
tmp_max = SRLDI (INVDI (0), 16);
tmp_min = SRLDI (INVDI (0), 15);
if (GTDI (tmp_result, tmp_max)) {
tmp_result = tmp_max;
} else {
if (LTDI (tmp_result, tmp_min)) {
tmp_result = tmp_min;
}
}
}
}
{
SI opval = SUBWORDDISI (tmp_result, 0);
SET_H_MACH (opval);
TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
}
{
SI opval = SUBWORDDISI (tmp_result, 1);
SET_H_MACL (opval);
TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,macw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_tmpry;
DI tmp_mac;
DI tmp_result;
HI tmp_x;
HI tmp_y;
tmp_x = GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 2);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
if (EQSI (FLD (f_rn), FLD (f_rm))) {
{
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 2);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 2);
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 11);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
}
}
tmp_y = GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 2);
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 11);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
tmp_tmpry = MULSI (ZEXTHISI (tmp_x), ZEXTHISI (tmp_y));
if (GET_H_SBIT ()) {
{
if (ADDOFSI (tmp_tmpry, GET_H_MACL (), 0)) {
{
SI opval = 1;
SET_H_MACH (opval);
written |= (1 << 9);
TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
}
}
{
SI opval = ADDSI (tmp_tmpry, GET_H_MACL ());
SET_H_MACL (opval);
written |= (1 << 10);
TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
}
}
} else {
{
tmp_mac = ORDI (SLLDI (ZEXTSIDI (GET_H_MACH ()), 32), ZEXTSIDI (GET_H_MACL ()));
tmp_result = ADDDI (tmp_mac, EXTSIDI (tmp_tmpry));
{
SI opval = SUBWORDDISI (tmp_result, 0);
SET_H_MACH (opval);
written |= (1 << 9);
TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
}
{
SI opval = SUBWORDDISI (tmp_result, 1);
SET_H_MACL (opval);
written |= (1 << 10);
TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
}
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,mov_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI opval = GET_H_GR (FLD (f_rm));
SET_H_GR (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTQIDI (ANDQI (FLD (f_imm8), 255));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movb1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
UQI opval = SUBWORDSIUQI (GET_H_GRC (FLD (f_rm)), 3);
SETMEMUQI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movb2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 1);
{
UQI opval = SUBWORDSIUQI (GET_H_GRC (FLD (f_rm)), 3);
SETMEMUQI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
{
SI opval = tmp_addr;
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movb3_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
UQI opval = SUBWORDSIUQI (GET_H_GRC (FLD (f_rm)), 3);
SETMEMUQI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movb4_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
tmp_addr = ADDSI (GET_H_GBR (), FLD (f_imm8));
{
UQI opval = SUBWORDSIUQI (GET_H_GRC (((UINT) 0)), 3);
SETMEMUQI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movb5_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movb5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
tmp_addr = ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4));
{
UQI opval = SUBWORDSIUQI (GET_H_GRC (((UINT) 0)), 3);
SETMEMUQI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movb6_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTQISI (GETMEMQI (current_cpu, pc, GET_H_GRC (FLD (f_rm))));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movb7_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
QI tmp_data;
tmp_data = GETMEMQI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
if (EQSI (FLD (f_rm), FLD (f_rn))) {
{
SI opval = EXTQISI (tmp_data);
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 4);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
} else {
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 1);
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 4);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
}
{
SI opval = EXTQISI (tmp_data);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movb8_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm)))));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movb9_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8))));
SET_H_GRC (((UINT) 0), opval);
TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movb10_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movb5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4))));
SET_H_GRC (((UINT) 0), opval);
TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movl1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_GRC (FLD (f_rm));
SETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movl2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI tmp_addr;
tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
{
SI opval = GET_H_GRC (FLD (f_rm));
SETMEMSI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
{
SI opval = tmp_addr;
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movl3_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_GRC (FLD (f_rm));
SETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movl4_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_GRC (((UINT) 0));
SETMEMSI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x4)), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movl5_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_GRC (FLD (f_rm));
SETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rn)), FLD (f_imm4x4)), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movl6_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movl7_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
if (EQSI (FLD (f_rm), FLD (f_rn))) {
{
SI opval = GET_H_GRC (FLD (f_rn));
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 5);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
} else {
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 5);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movl8_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movl9_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GETMEMSI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x4)));
SET_H_GRC (((UINT) 0), opval);
TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movl10_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_imm8x4), ANDDI (ADDDI (pc, 4), INVSI (3))));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movl11_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4x4)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movw1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
HI opval = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1);
SETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movw2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 2);
{
HI opval = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1);
SETMEMHI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
{
SI opval = tmp_addr;
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movw3_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
HI opval = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1);
SETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movw4_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
HI opval = SUBWORDSIHI (GET_H_GRC (((UINT) 0)), 1);
SETMEMHI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x2)), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movw5_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
HI opval = SUBWORDSIHI (GET_H_GRC (((UINT) 0)), 1);
SETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rn)), FLD (f_imm4x2)), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movw6_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTHISI (GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rm))));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movw7_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
HI tmp_data;
tmp_data = GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
if (EQSI (FLD (f_rm), FLD (f_rn))) {
{
SI opval = EXTHISI (tmp_data);
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 4);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
} else {
{
SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 2);
SET_H_GRC (FLD (f_rm), opval);
written |= (1 << 4);
TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
}
}
{
SI opval = EXTHISI (tmp_data);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movw8_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm)))));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movw9_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x2))));
SET_H_GRC (((UINT) 0), opval);
TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movw10_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDDI (ADDDI (pc, 4), FLD (f_imm8x2))));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movw11_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw11_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4x2))));
SET_H_GRC (((UINT) 0), opval);
TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,mova_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = ADDDI (ANDDI (ADDDI (pc, 4), INVSI (3)), FLD (f_imm8x4));
SET_H_GRC (((UINT) 0), opval);
TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movcal_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_GRC (((UINT) 0));
SETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,movt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = ZEXTBISI (GET_H_TBIT ());
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,mull_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = MULSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
SET_H_MACL (opval);
TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,mulsw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = MULSI (EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1)), EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rn)), 1)));
SET_H_MACL (opval);
TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,muluw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = MULSI (ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1)), ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rn)), 1)));
SET_H_MACL (opval);
TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,neg_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = NEGSI (GET_H_GRC (FLD (f_rm)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,negc_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_flag;
tmp_flag = SUBCFSI (0, GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
{
SI opval = SUBCSI (0, GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = tmp_flag;
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,nop_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
((void) 0);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,not_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI opval = INVDI (GET_H_GR (FLD (f_rm)));
SET_H_GR (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ocbi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
((void) 0);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ocbp_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
((void) 0);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ocbwb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
((void) 0);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,or_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI opval = ORDI (GET_H_GR (FLD (f_rm)), GET_H_GR (FLD (f_rn)));
SET_H_GR (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,ori_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = ORSI (GET_H_GRC (((UINT) 0)), ZEXTSIDI (FLD (f_imm8)));
SET_H_GRC (((UINT) 0), opval);
TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,orb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
UQI tmp_data;
tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
tmp_data = ORQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8));
{
UQI opval = tmp_data;
SETMEMUQI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,pref_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
((void) 0);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,rotcl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_temp;
tmp_temp = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
{
SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rn)), 1), GET_H_TBIT ());
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = ((tmp_temp) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,rotcr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_lsbit;
SI tmp_temp;
tmp_lsbit = ((EQSI (ANDSI (GET_H_GRC (FLD (f_rn)), 1), 0)) ? (0) : (1));
tmp_temp = GET_H_TBIT ();
{
SI opval = ORSI (SRLSI (GET_H_GRC (FLD (f_rn)), 1), SLLSI (tmp_temp, 31));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = ((tmp_lsbit) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,rotl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_temp;
tmp_temp = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
{
SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rn)), 1), tmp_temp);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = ((tmp_temp) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,rotr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_lsbit;
SI tmp_temp;
tmp_lsbit = ((EQSI (ANDSI (GET_H_GRC (FLD (f_rn)), 1), 0)) ? (0) : (1));
tmp_temp = tmp_lsbit;
{
SI opval = ORSI (SRLSI (GET_H_GRC (FLD (f_rn)), 1), SLLSI (tmp_temp, 31));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = ((tmp_lsbit) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,rts_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
{
UDI opval = GET_H_PR ();
SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
}
}
SEM_BRANCH_FINI (vpc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,sets_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = 1;
SET_H_SBIT (opval);
TRACE_RESULT (current_cpu, abuf, "sbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,sett_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.fmt_empty.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = 1;
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shad_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
QI tmp_shamt;
tmp_shamt = ANDQI (GET_H_GRC (FLD (f_rm)), 31);
if (GESI (GET_H_GRC (FLD (f_rm)), 0)) {
{
SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), tmp_shamt);
SET_H_GRC (FLD (f_rn), opval);
written |= (1 << 3);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
} else {
if (NEQI (tmp_shamt, 0)) {
{
SI opval = SRASI (GET_H_GRC (FLD (f_rn)), SUBSI (32, tmp_shamt));
SET_H_GRC (FLD (f_rn), opval);
written |= (1 << 3);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
} else {
if (LTSI (GET_H_GRC (FLD (f_rn)), 0)) {
{
SI opval = NEGSI (1);
SET_H_GRC (FLD (f_rn), opval);
written |= (1 << 3);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
} else {
{
SI opval = 0;
SET_H_GRC (FLD (f_rn), opval);
written |= (1 << 3);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shal_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_t;
tmp_t = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
{
SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 1);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = ((tmp_t) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shar_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_t;
tmp_t = ANDSI (GET_H_GRC (FLD (f_rn)), 1);
{
SI opval = SRASI (GET_H_GRC (FLD (f_rn)), 1);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = ((tmp_t) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shld_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
QI tmp_shamt;
tmp_shamt = ANDQI (GET_H_GRC (FLD (f_rm)), 31);
if (GESI (GET_H_GRC (FLD (f_rm)), 0)) {
{
SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), tmp_shamt);
SET_H_GRC (FLD (f_rn), opval);
written |= (1 << 3);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
} else {
if (NEQI (tmp_shamt, 0)) {
{
SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), SUBSI (32, tmp_shamt));
SET_H_GRC (FLD (f_rn), opval);
written |= (1 << 3);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
} else {
{
SI opval = 0;
SET_H_GRC (FLD (f_rn), opval);
written |= (1 << 3);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
}
}
abuf->written = written;
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shll_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_t;
tmp_t = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
{
SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 1);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = ((tmp_t) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shll2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 2);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shll8_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 8);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shll16_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 16);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shlr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_t;
tmp_t = ANDSI (GET_H_GRC (FLD (f_rn)), 1);
{
SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 1);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = ((tmp_t) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shlr2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 2);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shlr8_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 8);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,shlr16_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 16);
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,stc_gbr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_GBR ();
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,stcl_gbr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
{
SI opval = GET_H_GBR ();
SETMEMSI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
{
SI opval = tmp_addr;
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,sts_fpscr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_FPCCR ();
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,stsl_fpscr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
{
SI opval = GET_H_FPCCR ();
SETMEMSI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
{
SI opval = tmp_addr;
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,sts_fpul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = SUBWORDSFSI (CPU (h_fr[((UINT) 32)]));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,stsl_fpul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
{
SF opval = CPU (h_fr[((UINT) 32)]);
SETMEMSF (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
}
{
SI opval = tmp_addr;
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,sts_mach_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_MACH ();
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,stsl_mach_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
{
SI opval = GET_H_MACH ();
SETMEMSI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
{
SI opval = tmp_addr;
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,sts_macl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_MACL ();
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,stsl_macl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
{
SI opval = GET_H_MACL ();
SETMEMSI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
{
SI opval = tmp_addr;
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,sts_pr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = GET_H_PR ();
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,stsl_pr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
{
SI opval = GET_H_PR ();
SETMEMSI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
{
SI opval = tmp_addr;
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,sub_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,subc_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_flag;
tmp_flag = SUBCFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
{
SI opval = SUBCSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = tmp_flag;
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,subv_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI tmp_t;
tmp_t = SUBOFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), 0);
{
SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
{
BI opval = ((tmp_t) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,swapb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
UHI tmp_top_half;
UQI tmp_byte1;
UQI tmp_byte0;
tmp_top_half = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 0);
tmp_byte1 = SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 2);
tmp_byte0 = SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 3);
{
SI opval = ORSI (SLLSI (tmp_top_half, 16), ORSI (SLLSI (tmp_byte0, 8), tmp_byte1));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,swapw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = ORSI (SRLSI (GET_H_GRC (FLD (f_rm)), 16), SLLSI (GET_H_GRC (FLD (f_rm)), 16));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,tasb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movw10_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
UQI tmp_byte;
tmp_byte = GETMEMUQI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
{
BI opval = ((EQQI (tmp_byte, 0)) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
tmp_byte = ORQI (tmp_byte, 128);
{
UQI opval = tmp_byte;
SETMEMUQI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,trapa_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
sh64_compact_trapa (current_cpu, FLD (f_imm8), pc);
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,tst_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = ((EQSI (ANDSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn))), 0)) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,tsti_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
BI opval = ((EQSI (ANDSI (GET_H_GRC (((UINT) 0)), ZEXTSISI (FLD (f_imm8))), 0)) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,tstb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
{
BI opval = ((EQQI (ANDQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8)), 0)) ? (1) : (0));
SET_H_TBIT (opval);
TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,xor_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI opval = XORDI (GET_H_GR (FLD (f_rn)), GET_H_GR (FLD (f_rm)));
SET_H_GR (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,xori_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI opval = XORDI (GET_H_GR (((UINT) 0)), ZEXTSIDI (FLD (f_imm8)));
SET_H_GR (((UINT) 0), opval);
TRACE_RESULT (current_cpu, abuf, "gr-0", 'D', opval);
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,xorb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_addi_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
DI tmp_addr;
UQI tmp_data;
tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
tmp_data = XORQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8));
{
UQI opval = tmp_data;
SETMEMUQI (current_cpu, pc, tmp_addr, opval);
TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
}
}
return vpc;
#undef FLD
}
static SEM_PC
SEM_FN_NAME (sh64_compact,xtrct_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
#define FLD(f) abuf->fields.sfmt_movl5_compact.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rm)), 16), SRLSI (GET_H_GRC (FLD (f_rn)), 16));
SET_H_GRC (FLD (f_rn), opval);
TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
}
return vpc;
#undef FLD
}
static const struct sem_fn_desc sem_fns[] = {
{ SH64_COMPACT_INSN_X_INVALID, SEM_FN_NAME (sh64_compact,x_invalid) },
{ SH64_COMPACT_INSN_X_AFTER, SEM_FN_NAME (sh64_compact,x_after) },
{ SH64_COMPACT_INSN_X_BEFORE, SEM_FN_NAME (sh64_compact,x_before) },
{ SH64_COMPACT_INSN_X_CTI_CHAIN, SEM_FN_NAME (sh64_compact,x_cti_chain) },
{ SH64_COMPACT_INSN_X_CHAIN, SEM_FN_NAME (sh64_compact,x_chain) },
{ SH64_COMPACT_INSN_X_BEGIN, SEM_FN_NAME (sh64_compact,x_begin) },
{ SH64_COMPACT_INSN_ADD_COMPACT, SEM_FN_NAME (sh64_compact,add_compact) },
{ SH64_COMPACT_INSN_ADDI_COMPACT, SEM_FN_NAME (sh64_compact,addi_compact) },
{ SH64_COMPACT_INSN_ADDC_COMPACT, SEM_FN_NAME (sh64_compact,addc_compact) },
{ SH64_COMPACT_INSN_ADDV_COMPACT, SEM_FN_NAME (sh64_compact,addv_compact) },
{ SH64_COMPACT_INSN_AND_COMPACT, SEM_FN_NAME (sh64_compact,and_compact) },
{ SH64_COMPACT_INSN_ANDI_COMPACT, SEM_FN_NAME (sh64_compact,andi_compact) },
{ SH64_COMPACT_INSN_ANDB_COMPACT, SEM_FN_NAME (sh64_compact,andb_compact) },
{ SH64_COMPACT_INSN_BF_COMPACT, SEM_FN_NAME (sh64_compact,bf_compact) },
{ SH64_COMPACT_INSN_BFS_COMPACT, SEM_FN_NAME (sh64_compact,bfs_compact) },
{ SH64_COMPACT_INSN_BRA_COMPACT, SEM_FN_NAME (sh64_compact,bra_compact) },
{ SH64_COMPACT_INSN_BRAF_COMPACT, SEM_FN_NAME (sh64_compact,braf_compact) },
{ SH64_COMPACT_INSN_BRK_COMPACT, SEM_FN_NAME (sh64_compact,brk_compact) },
{ SH64_COMPACT_INSN_BSR_COMPACT, SEM_FN_NAME (sh64_compact,bsr_compact) },
{ SH64_COMPACT_INSN_BSRF_COMPACT, SEM_FN_NAME (sh64_compact,bsrf_compact) },
{ SH64_COMPACT_INSN_BT_COMPACT, SEM_FN_NAME (sh64_compact,bt_compact) },
{ SH64_COMPACT_INSN_BTS_COMPACT, SEM_FN_NAME (sh64_compact,bts_compact) },
{ SH64_COMPACT_INSN_CLRMAC_COMPACT, SEM_FN_NAME (sh64_compact,clrmac_compact) },
{ SH64_COMPACT_INSN_CLRS_COMPACT, SEM_FN_NAME (sh64_compact,clrs_compact) },
{ SH64_COMPACT_INSN_CLRT_COMPACT, SEM_FN_NAME (sh64_compact,clrt_compact) },
{ SH64_COMPACT_INSN_CMPEQ_COMPACT, SEM_FN_NAME (sh64_compact,cmpeq_compact) },
{ SH64_COMPACT_INSN_CMPEQI_COMPACT, SEM_FN_NAME (sh64_compact,cmpeqi_compact) },
{ SH64_COMPACT_INSN_CMPGE_COMPACT, SEM_FN_NAME (sh64_compact,cmpge_compact) },
{ SH64_COMPACT_INSN_CMPGT_COMPACT, SEM_FN_NAME (sh64_compact,cmpgt_compact) },
{ SH64_COMPACT_INSN_CMPHI_COMPACT, SEM_FN_NAME (sh64_compact,cmphi_compact) },
{ SH64_COMPACT_INSN_CMPHS_COMPACT, SEM_FN_NAME (sh64_compact,cmphs_compact) },
{ SH64_COMPACT_INSN_CMPPL_COMPACT, SEM_FN_NAME (sh64_compact,cmppl_compact) },
{ SH64_COMPACT_INSN_CMPPZ_COMPACT, SEM_FN_NAME (sh64_compact,cmppz_compact) },
{ SH64_COMPACT_INSN_CMPSTR_COMPACT, SEM_FN_NAME (sh64_compact,cmpstr_compact) },
{ SH64_COMPACT_INSN_DIV0S_COMPACT, SEM_FN_NAME (sh64_compact,div0s_compact) },
{ SH64_COMPACT_INSN_DIV0U_COMPACT, SEM_FN_NAME (sh64_compact,div0u_compact) },
{ SH64_COMPACT_INSN_DIV1_COMPACT, SEM_FN_NAME (sh64_compact,div1_compact) },
{ SH64_COMPACT_INSN_DMULSL_COMPACT, SEM_FN_NAME (sh64_compact,dmulsl_compact) },
{ SH64_COMPACT_INSN_DMULUL_COMPACT, SEM_FN_NAME (sh64_compact,dmulul_compact) },
{ SH64_COMPACT_INSN_DT_COMPACT, SEM_FN_NAME (sh64_compact,dt_compact) },
{ SH64_COMPACT_INSN_EXTSB_COMPACT, SEM_FN_NAME (sh64_compact,extsb_compact) },
{ SH64_COMPACT_INSN_EXTSW_COMPACT, SEM_FN_NAME (sh64_compact,extsw_compact) },
{ SH64_COMPACT_INSN_EXTUB_COMPACT, SEM_FN_NAME (sh64_compact,extub_compact) },
{ SH64_COMPACT_INSN_EXTUW_COMPACT, SEM_FN_NAME (sh64_compact,extuw_compact) },
{ SH64_COMPACT_INSN_FABS_COMPACT, SEM_FN_NAME (sh64_compact,fabs_compact) },
{ SH64_COMPACT_INSN_FADD_COMPACT, SEM_FN_NAME (sh64_compact,fadd_compact) },
{ SH64_COMPACT_INSN_FCMPEQ_COMPACT, SEM_FN_NAME (sh64_compact,fcmpeq_compact) },
{ SH64_COMPACT_INSN_FCMPGT_COMPACT, SEM_FN_NAME (sh64_compact,fcmpgt_compact) },
{ SH64_COMPACT_INSN_FCNVDS_COMPACT, SEM_FN_NAME (sh64_compact,fcnvds_compact) },
{ SH64_COMPACT_INSN_FCNVSD_COMPACT, SEM_FN_NAME (sh64_compact,fcnvsd_compact) },
{ SH64_COMPACT_INSN_FDIV_COMPACT, SEM_FN_NAME (sh64_compact,fdiv_compact) },
{ SH64_COMPACT_INSN_FIPR_COMPACT, SEM_FN_NAME (sh64_compact,fipr_compact) },
{ SH64_COMPACT_INSN_FLDS_COMPACT, SEM_FN_NAME (sh64_compact,flds_compact) },
{ SH64_COMPACT_INSN_FLDI0_COMPACT, SEM_FN_NAME (sh64_compact,fldi0_compact) },
{ SH64_COMPACT_INSN_FLDI1_COMPACT, SEM_FN_NAME (sh64_compact,fldi1_compact) },
{ SH64_COMPACT_INSN_FLOAT_COMPACT, SEM_FN_NAME (sh64_compact,float_compact) },
{ SH64_COMPACT_INSN_FMAC_COMPACT, SEM_FN_NAME (sh64_compact,fmac_compact) },
{ SH64_COMPACT_INSN_FMOV1_COMPACT, SEM_FN_NAME (sh64_compact,fmov1_compact) },
{ SH64_COMPACT_INSN_FMOV2_COMPACT, SEM_FN_NAME (sh64_compact,fmov2_compact) },
{ SH64_COMPACT_INSN_FMOV3_COMPACT, SEM_FN_NAME (sh64_compact,fmov3_compact) },
{ SH64_COMPACT_INSN_FMOV4_COMPACT, SEM_FN_NAME (sh64_compact,fmov4_compact) },
{ SH64_COMPACT_INSN_FMOV5_COMPACT, SEM_FN_NAME (sh64_compact,fmov5_compact) },
{ SH64_COMPACT_INSN_FMOV6_COMPACT, SEM_FN_NAME (sh64_compact,fmov6_compact) },
{ SH64_COMPACT_INSN_FMOV7_COMPACT, SEM_FN_NAME (sh64_compact,fmov7_compact) },
{ SH64_COMPACT_INSN_FMUL_COMPACT, SEM_FN_NAME (sh64_compact,fmul_compact) },
{ SH64_COMPACT_INSN_FNEG_COMPACT, SEM_FN_NAME (sh64_compact,fneg_compact) },
{ SH64_COMPACT_INSN_FRCHG_COMPACT, SEM_FN_NAME (sh64_compact,frchg_compact) },
{ SH64_COMPACT_INSN_FSCHG_COMPACT, SEM_FN_NAME (sh64_compact,fschg_compact) },
{ SH64_COMPACT_INSN_FSQRT_COMPACT, SEM_FN_NAME (sh64_compact,fsqrt_compact) },
{ SH64_COMPACT_INSN_FSTS_COMPACT, SEM_FN_NAME (sh64_compact,fsts_compact) },
{ SH64_COMPACT_INSN_FSUB_COMPACT, SEM_FN_NAME (sh64_compact,fsub_compact) },
{ SH64_COMPACT_INSN_FTRC_COMPACT, SEM_FN_NAME (sh64_compact,ftrc_compact) },
{ SH64_COMPACT_INSN_FTRV_COMPACT, SEM_FN_NAME (sh64_compact,ftrv_compact) },
{ SH64_COMPACT_INSN_JMP_COMPACT, SEM_FN_NAME (sh64_compact,jmp_compact) },
{ SH64_COMPACT_INSN_JSR_COMPACT, SEM_FN_NAME (sh64_compact,jsr_compact) },
{ SH64_COMPACT_INSN_LDC_COMPACT, SEM_FN_NAME (sh64_compact,ldc_compact) },
{ SH64_COMPACT_INSN_LDCL_COMPACT, SEM_FN_NAME (sh64_compact,ldcl_compact) },
{ SH64_COMPACT_INSN_LDS_FPSCR_COMPACT, SEM_FN_NAME (sh64_compact,lds_fpscr_compact) },
{ SH64_COMPACT_INSN_LDSL_FPSCR_COMPACT, SEM_FN_NAME (sh64_compact,ldsl_fpscr_compact) },
{ SH64_COMPACT_INSN_LDS_FPUL_COMPACT, SEM_FN_NAME (sh64_compact,lds_fpul_compact) },
{ SH64_COMPACT_INSN_LDSL_FPUL_COMPACT, SEM_FN_NAME (sh64_compact,ldsl_fpul_compact) },
{ SH64_COMPACT_INSN_LDS_MACH_COMPACT, SEM_FN_NAME (sh64_compact,lds_mach_compact) },
{ SH64_COMPACT_INSN_LDSL_MACH_COMPACT, SEM_FN_NAME (sh64_compact,ldsl_mach_compact) },
{ SH64_COMPACT_INSN_LDS_MACL_COMPACT, SEM_FN_NAME (sh64_compact,lds_macl_compact) },
{ SH64_COMPACT_INSN_LDSL_MACL_COMPACT, SEM_FN_NAME (sh64_compact,ldsl_macl_compact) },
{ SH64_COMPACT_INSN_LDS_PR_COMPACT, SEM_FN_NAME (sh64_compact,lds_pr_compact) },
{ SH64_COMPACT_INSN_LDSL_PR_COMPACT, SEM_FN_NAME (sh64_compact,ldsl_pr_compact) },
{ SH64_COMPACT_INSN_MACL_COMPACT, SEM_FN_NAME (sh64_compact,macl_compact) },
{ SH64_COMPACT_INSN_MACW_COMPACT, SEM_FN_NAME (sh64_compact,macw_compact) },
{ SH64_COMPACT_INSN_MOV_COMPACT, SEM_FN_NAME (sh64_compact,mov_compact) },
{ SH64_COMPACT_INSN_MOVI_COMPACT, SEM_FN_NAME (sh64_compact,movi_compact) },
{ SH64_COMPACT_INSN_MOVB1_COMPACT, SEM_FN_NAME (sh64_compact,movb1_compact) },
{ SH64_COMPACT_INSN_MOVB2_COMPACT, SEM_FN_NAME (sh64_compact,movb2_compact) },
{ SH64_COMPACT_INSN_MOVB3_COMPACT, SEM_FN_NAME (sh64_compact,movb3_compact) },
{ SH64_COMPACT_INSN_MOVB4_COMPACT, SEM_FN_NAME (sh64_compact,movb4_compact) },
{ SH64_COMPACT_INSN_MOVB5_COMPACT, SEM_FN_NAME (sh64_compact,movb5_compact) },
{ SH64_COMPACT_INSN_MOVB6_COMPACT, SEM_FN_NAME (sh64_compact,movb6_compact) },
{ SH64_COMPACT_INSN_MOVB7_COMPACT, SEM_FN_NAME (sh64_compact,movb7_compact) },
{ SH64_COMPACT_INSN_MOVB8_COMPACT, SEM_FN_NAME (sh64_compact,movb8_compact) },
{ SH64_COMPACT_INSN_MOVB9_COMPACT, SEM_FN_NAME (sh64_compact,movb9_compact) },
{ SH64_COMPACT_INSN_MOVB10_COMPACT, SEM_FN_NAME (sh64_compact,movb10_compact) },
{ SH64_COMPACT_INSN_MOVL1_COMPACT, SEM_FN_NAME (sh64_compact,movl1_compact) },
{ SH64_COMPACT_INSN_MOVL2_COMPACT, SEM_FN_NAME (sh64_compact,movl2_compact) },
{ SH64_COMPACT_INSN_MOVL3_COMPACT, SEM_FN_NAME (sh64_compact,movl3_compact) },
{ SH64_COMPACT_INSN_MOVL4_COMPACT, SEM_FN_NAME (sh64_compact,movl4_compact) },
{ SH64_COMPACT_INSN_MOVL5_COMPACT, SEM_FN_NAME (sh64_compact,movl5_compact) },
{ SH64_COMPACT_INSN_MOVL6_COMPACT, SEM_FN_NAME (sh64_compact,movl6_compact) },
{ SH64_COMPACT_INSN_MOVL7_COMPACT, SEM_FN_NAME (sh64_compact,movl7_compact) },
{ SH64_COMPACT_INSN_MOVL8_COMPACT, SEM_FN_NAME (sh64_compact,movl8_compact) },
{ SH64_COMPACT_INSN_MOVL9_COMPACT, SEM_FN_NAME (sh64_compact,movl9_compact) },
{ SH64_COMPACT_INSN_MOVL10_COMPACT, SEM_FN_NAME (sh64_compact,movl10_compact) },
{ SH64_COMPACT_INSN_MOVL11_COMPACT, SEM_FN_NAME (sh64_compact,movl11_compact) },
{ SH64_COMPACT_INSN_MOVW1_COMPACT, SEM_FN_NAME (sh64_compact,movw1_compact) },
{ SH64_COMPACT_INSN_MOVW2_COMPACT, SEM_FN_NAME (sh64_compact,movw2_compact) },
{ SH64_COMPACT_INSN_MOVW3_COMPACT, SEM_FN_NAME (sh64_compact,movw3_compact) },
{ SH64_COMPACT_INSN_MOVW4_COMPACT, SEM_FN_NAME (sh64_compact,movw4_compact) },
{ SH64_COMPACT_INSN_MOVW5_COMPACT, SEM_FN_NAME (sh64_compact,movw5_compact) },
{ SH64_COMPACT_INSN_MOVW6_COMPACT, SEM_FN_NAME (sh64_compact,movw6_compact) },
{ SH64_COMPACT_INSN_MOVW7_COMPACT, SEM_FN_NAME (sh64_compact,movw7_compact) },
{ SH64_COMPACT_INSN_MOVW8_COMPACT, SEM_FN_NAME (sh64_compact,movw8_compact) },
{ SH64_COMPACT_INSN_MOVW9_COMPACT, SEM_FN_NAME (sh64_compact,movw9_compact) },
{ SH64_COMPACT_INSN_MOVW10_COMPACT, SEM_FN_NAME (sh64_compact,movw10_compact) },
{ SH64_COMPACT_INSN_MOVW11_COMPACT, SEM_FN_NAME (sh64_compact,movw11_compact) },
{ SH64_COMPACT_INSN_MOVA_COMPACT, SEM_FN_NAME (sh64_compact,mova_compact) },
{ SH64_COMPACT_INSN_MOVCAL_COMPACT, SEM_FN_NAME (sh64_compact,movcal_compact) },
{ SH64_COMPACT_INSN_MOVT_COMPACT, SEM_FN_NAME (sh64_compact,movt_compact) },
{ SH64_COMPACT_INSN_MULL_COMPACT, SEM_FN_NAME (sh64_compact,mull_compact) },
{ SH64_COMPACT_INSN_MULSW_COMPACT, SEM_FN_NAME (sh64_compact,mulsw_compact) },
{ SH64_COMPACT_INSN_MULUW_COMPACT, SEM_FN_NAME (sh64_compact,muluw_compact) },
{ SH64_COMPACT_INSN_NEG_COMPACT, SEM_FN_NAME (sh64_compact,neg_compact) },
{ SH64_COMPACT_INSN_NEGC_COMPACT, SEM_FN_NAME (sh64_compact,negc_compact) },
{ SH64_COMPACT_INSN_NOP_COMPACT, SEM_FN_NAME (sh64_compact,nop_compact) },
{ SH64_COMPACT_INSN_NOT_COMPACT, SEM_FN_NAME (sh64_compact,not_compact) },
{ SH64_COMPACT_INSN_OCBI_COMPACT, SEM_FN_NAME (sh64_compact,ocbi_compact) },
{ SH64_COMPACT_INSN_OCBP_COMPACT, SEM_FN_NAME (sh64_compact,ocbp_compact) },
{ SH64_COMPACT_INSN_OCBWB_COMPACT, SEM_FN_NAME (sh64_compact,ocbwb_compact) },
{ SH64_COMPACT_INSN_OR_COMPACT, SEM_FN_NAME (sh64_compact,or_compact) },
{ SH64_COMPACT_INSN_ORI_COMPACT, SEM_FN_NAME (sh64_compact,ori_compact) },
{ SH64_COMPACT_INSN_ORB_COMPACT, SEM_FN_NAME (sh64_compact,orb_compact) },
{ SH64_COMPACT_INSN_PREF_COMPACT, SEM_FN_NAME (sh64_compact,pref_compact) },
{ SH64_COMPACT_INSN_ROTCL_COMPACT, SEM_FN_NAME (sh64_compact,rotcl_compact) },
{ SH64_COMPACT_INSN_ROTCR_COMPACT, SEM_FN_NAME (sh64_compact,rotcr_compact) },
{ SH64_COMPACT_INSN_ROTL_COMPACT, SEM_FN_NAME (sh64_compact,rotl_compact) },
{ SH64_COMPACT_INSN_ROTR_COMPACT, SEM_FN_NAME (sh64_compact,rotr_compact) },
{ SH64_COMPACT_INSN_RTS_COMPACT, SEM_FN_NAME (sh64_compact,rts_compact) },
{ SH64_COMPACT_INSN_SETS_COMPACT, SEM_FN_NAME (sh64_compact,sets_compact) },
{ SH64_COMPACT_INSN_SETT_COMPACT, SEM_FN_NAME (sh64_compact,sett_compact) },
{ SH64_COMPACT_INSN_SHAD_COMPACT, SEM_FN_NAME (sh64_compact,shad_compact) },
{ SH64_COMPACT_INSN_SHAL_COMPACT, SEM_FN_NAME (sh64_compact,shal_compact) },
{ SH64_COMPACT_INSN_SHAR_COMPACT, SEM_FN_NAME (sh64_compact,shar_compact) },
{ SH64_COMPACT_INSN_SHLD_COMPACT, SEM_FN_NAME (sh64_compact,shld_compact) },
{ SH64_COMPACT_INSN_SHLL_COMPACT, SEM_FN_NAME (sh64_compact,shll_compact) },
{ SH64_COMPACT_INSN_SHLL2_COMPACT, SEM_FN_NAME (sh64_compact,shll2_compact) },
{ SH64_COMPACT_INSN_SHLL8_COMPACT, SEM_FN_NAME (sh64_compact,shll8_compact) },
{ SH64_COMPACT_INSN_SHLL16_COMPACT, SEM_FN_NAME (sh64_compact,shll16_compact) },
{ SH64_COMPACT_INSN_SHLR_COMPACT, SEM_FN_NAME (sh64_compact,shlr_compact) },
{ SH64_COMPACT_INSN_SHLR2_COMPACT, SEM_FN_NAME (sh64_compact,shlr2_compact) },
{ SH64_COMPACT_INSN_SHLR8_COMPACT, SEM_FN_NAME (sh64_compact,shlr8_compact) },
{ SH64_COMPACT_INSN_SHLR16_COMPACT, SEM_FN_NAME (sh64_compact,shlr16_compact) },
{ SH64_COMPACT_INSN_STC_GBR_COMPACT, SEM_FN_NAME (sh64_compact,stc_gbr_compact) },
{ SH64_COMPACT_INSN_STCL_GBR_COMPACT, SEM_FN_NAME (sh64_compact,stcl_gbr_compact) },
{ SH64_COMPACT_INSN_STS_FPSCR_COMPACT, SEM_FN_NAME (sh64_compact,sts_fpscr_compact) },
{ SH64_COMPACT_INSN_STSL_FPSCR_COMPACT, SEM_FN_NAME (sh64_compact,stsl_fpscr_compact) },
{ SH64_COMPACT_INSN_STS_FPUL_COMPACT, SEM_FN_NAME (sh64_compact,sts_fpul_compact) },
{ SH64_COMPACT_INSN_STSL_FPUL_COMPACT, SEM_FN_NAME (sh64_compact,stsl_fpul_compact) },
{ SH64_COMPACT_INSN_STS_MACH_COMPACT, SEM_FN_NAME (sh64_compact,sts_mach_compact) },
{ SH64_COMPACT_INSN_STSL_MACH_COMPACT, SEM_FN_NAME (sh64_compact,stsl_mach_compact) },
{ SH64_COMPACT_INSN_STS_MACL_COMPACT, SEM_FN_NAME (sh64_compact,sts_macl_compact) },
{ SH64_COMPACT_INSN_STSL_MACL_COMPACT, SEM_FN_NAME (sh64_compact,stsl_macl_compact) },
{ SH64_COMPACT_INSN_STS_PR_COMPACT, SEM_FN_NAME (sh64_compact,sts_pr_compact) },
{ SH64_COMPACT_INSN_STSL_PR_COMPACT, SEM_FN_NAME (sh64_compact,stsl_pr_compact) },
{ SH64_COMPACT_INSN_SUB_COMPACT, SEM_FN_NAME (sh64_compact,sub_compact) },
{ SH64_COMPACT_INSN_SUBC_COMPACT, SEM_FN_NAME (sh64_compact,subc_compact) },
{ SH64_COMPACT_INSN_SUBV_COMPACT, SEM_FN_NAME (sh64_compact,subv_compact) },
{ SH64_COMPACT_INSN_SWAPB_COMPACT, SEM_FN_NAME (sh64_compact,swapb_compact) },
{ SH64_COMPACT_INSN_SWAPW_COMPACT, SEM_FN_NAME (sh64_compact,swapw_compact) },
{ SH64_COMPACT_INSN_TASB_COMPACT, SEM_FN_NAME (sh64_compact,tasb_compact) },
{ SH64_COMPACT_INSN_TRAPA_COMPACT, SEM_FN_NAME (sh64_compact,trapa_compact) },
{ SH64_COMPACT_INSN_TST_COMPACT, SEM_FN_NAME (sh64_compact,tst_compact) },
{ SH64_COMPACT_INSN_TSTI_COMPACT, SEM_FN_NAME (sh64_compact,tsti_compact) },
{ SH64_COMPACT_INSN_TSTB_COMPACT, SEM_FN_NAME (sh64_compact,tstb_compact) },
{ SH64_COMPACT_INSN_XOR_COMPACT, SEM_FN_NAME (sh64_compact,xor_compact) },
{ SH64_COMPACT_INSN_XORI_COMPACT, SEM_FN_NAME (sh64_compact,xori_compact) },
{ SH64_COMPACT_INSN_XORB_COMPACT, SEM_FN_NAME (sh64_compact,xorb_compact) },
{ SH64_COMPACT_INSN_XTRCT_COMPACT, SEM_FN_NAME (sh64_compact,xtrct_compact) },
{ 0, 0 }
};
void
SEM_FN_NAME (sh64_compact,init_idesc_table) (SIM_CPU *current_cpu)
{
IDESC *idesc_table = CPU_IDESC (current_cpu);
const struct sem_fn_desc *sf;
int mach_num = MACH_NUM (CPU_MACH (current_cpu));
for (sf = &sem_fns[0]; sf->fn != 0; ++sf)
{
const CGEN_INSN *insn = idesc_table[sf->index].idata;
int valid_p = (CGEN_INSN_VIRTUAL_P (insn)
|| CGEN_INSN_MACH_HAS_P (insn, mach_num));
#if FAST_P
if (valid_p)
idesc_table[sf->index].sem_fast = sf->fn;
else
idesc_table[sf->index].sem_fast = SEM_FN_NAME (sh64_compact,x_invalid);
#else
if (valid_p)
idesc_table[sf->index].sem_full = sf->fn;
else
idesc_table[sf->index].sem_full = SEM_FN_NAME (sh64_compact,x_invalid);
#endif
}
}