aboutsummaryrefslogtreecommitdiff
path: root/sim/m32r/semx.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>1998-07-02 01:42:38 +0000
committerDoug Evans <dje@google.com>1998-07-02 01:42:38 +0000
commit1148b104ae064a00e292433608eb47820b3ee93a (patch)
treebd96b06a8ddf59330d8f8ebc7ac15c0d0a2cd203 /sim/m32r/semx.c
parent7fc0b65fa20919eaaa1b8dbd8e40eb7a75183966 (diff)
downloadgdb-1148b104ae064a00e292433608eb47820b3ee93a.zip
gdb-1148b104ae064a00e292433608eb47820b3ee93a.tar.gz
gdb-1148b104ae064a00e292433608eb47820b3ee93a.tar.bz2
* Makefile.in: cgen_maint -> CGEN_MAINT.
* configure.in: AC_SUBST cgen,cgendir. No longer look for guile. * configure: Regenerate. * arch.c,arch.h,cpuall.h: Regenerate. * cpu.c,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate. * sem-switch.c,sem.c: Regenerate. * cpux.c,cpux.h,decodex.c,decodex.h,modelx.c,readx.c: Regenerate. * semx.c: Regenerate. * mloopx.in (icount): Moved here from genmloop.sh.
Diffstat (limited to 'sim/m32r/semx.c')
-rw-r--r--sim/m32r/semx.c1022
1 files changed, 718 insertions, 304 deletions
diff --git a/sim/m32r/semx.c b/sim/m32r/semx.c
index 9579a32..e1e621b 100644
--- a/sim/m32r/semx.c
+++ b/sim/m32r/semx.c
@@ -1,6 +1,6 @@
/* Simulator instruction semantics for m32rx.
-This file is machine generated with CGEN.
+THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
@@ -47,8 +47,11 @@ SEM_FN_NAME (m32rx,add) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_ADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_ADD_CODE
- CPU (h_gr[f_r1]) = ADDSI (OPRND (dr), OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ADDSI (OPRND (dr), OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -77,8 +80,11 @@ SEM_FN_NAME (m32rx,add3) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_ADD3_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_ADD3_CODE
- CPU (h_gr[f_r1]) = ADDSI (OPRND (sr), OPRND (slo16));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ADDSI (OPRND (sr), OPRND (slo16));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -107,8 +113,11 @@ SEM_FN_NAME (m32rx,and) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_ADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_ADD_CODE
- CPU (h_gr[f_r1]) = ANDSI (OPRND (dr), OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ANDSI (OPRND (dr), OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -137,8 +146,11 @@ SEM_FN_NAME (m32rx,and3) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_AND3_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
EXTRACT_FMT_AND3_CODE
- CPU (h_gr[f_r1]) = ANDSI (OPRND (sr), OPRND (uimm16));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ANDSI (OPRND (sr), OPRND (uimm16));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -167,8 +179,11 @@ SEM_FN_NAME (m32rx,or) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exec
EXTRACT_FMT_ADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_ADD_CODE
- CPU (h_gr[f_r1]) = ORSI (OPRND (dr), OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ORSI (OPRND (dr), OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -197,8 +212,11 @@ SEM_FN_NAME (m32rx,or3) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_OR3_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
EXTRACT_FMT_OR3_CODE
- CPU (h_gr[f_r1]) = ORSI (OPRND (sr), OPRND (ulo16));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ORSI (OPRND (sr), OPRND (ulo16));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -227,8 +245,11 @@ SEM_FN_NAME (m32rx,xor) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_ADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_ADD_CODE
- CPU (h_gr[f_r1]) = XORSI (OPRND (dr), OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = XORSI (OPRND (dr), OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -257,8 +278,11 @@ SEM_FN_NAME (m32rx,xor3) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_AND3_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
EXTRACT_FMT_AND3_CODE
- CPU (h_gr[f_r1]) = XORSI (OPRND (sr), OPRND (uimm16));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = XORSI (OPRND (sr), OPRND (uimm16));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -287,8 +311,11 @@ SEM_FN_NAME (m32rx,addi) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_ADDI_VARS /* f-op1 f-r1 f-simm8 */
EXTRACT_FMT_ADDI_CODE
- CPU (h_gr[f_r1]) = ADDSI (OPRND (dr), OPRND (simm8));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ADDSI (OPRND (dr), OPRND (simm8));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -321,10 +348,16 @@ do {
UBI temp1;SI temp0;
temp0 = ADDSI (OPRND (dr), OPRND (sr));
temp1 = ADDOFSI (OPRND (dr), OPRND (sr), 0);
- CPU (h_gr[f_r1]) = temp0;
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
- CPU (h_cond) = temp1;
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ SI opval = temp0;
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
+ {
+ UBI opval = temp1;
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -358,10 +391,16 @@ do {
UBI temp1;SI temp0;
temp0 = ADDSI (OPRND (sr), OPRND (simm16));
temp1 = ADDOFSI (OPRND (sr), OPRND (simm16), 0);
- CPU (h_gr[f_r1]) = temp0;
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
- CPU (h_cond) = temp1;
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ SI opval = temp0;
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
+ {
+ UBI opval = temp1;
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -395,10 +434,16 @@ do {
UBI temp1;SI temp0;
temp0 = ADDCSI (OPRND (dr), OPRND (sr), OPRND (condbit));
temp1 = ADDCFSI (OPRND (dr), OPRND (sr), OPRND (condbit));
- CPU (h_gr[f_r1]) = temp0;
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
- CPU (h_cond) = temp1;
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ SI opval = temp0;
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
+ {
+ UBI opval = temp1;
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -430,9 +475,12 @@ SEM_FN_NAME (m32rx,bc8) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_BC8_CODE
if (OPRND (condbit)) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp8)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp8);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -462,9 +510,12 @@ SEM_FN_NAME (m32rx,bc24) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_BC24_CODE
if (OPRND (condbit)) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp24)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp24);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -494,9 +545,12 @@ SEM_FN_NAME (m32rx,beq) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_BEQ_CODE
if (EQSI (OPRND (src1), OPRND (src2))) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp16)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp16);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -527,9 +581,12 @@ SEM_FN_NAME (m32rx,beqz) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_BEQZ_CODE
if (EQSI (OPRND (src2), 0)) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp16)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp16);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -560,9 +617,12 @@ SEM_FN_NAME (m32rx,bgez) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_BEQZ_CODE
if (GESI (OPRND (src2), 0)) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp16)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp16);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -593,9 +653,12 @@ SEM_FN_NAME (m32rx,bgtz) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_BEQZ_CODE
if (GTSI (OPRND (src2), 0)) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp16)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp16);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -626,9 +689,12 @@ SEM_FN_NAME (m32rx,blez) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_BEQZ_CODE
if (LESI (OPRND (src2), 0)) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp16)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp16);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -659,9 +725,12 @@ SEM_FN_NAME (m32rx,bltz) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_BEQZ_CODE
if (LTSI (OPRND (src2), 0)) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp16)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp16);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -692,9 +761,12 @@ SEM_FN_NAME (m32rx,bnez) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_BEQZ_CODE
if (NESI (OPRND (src2), 0)) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp16)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp16);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -725,11 +797,17 @@ SEM_FN_NAME (m32rx,bl8) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_BL8_CODE
do {
- CPU (h_gr[14]) = ADDSI (ANDSI (OPRND (pc), -4), 4);
- TRACE_RESULT (current_cpu, "gr-14", 'x', CPU (h_gr[14]));
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp8)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ SI opval = ADDSI (ANDSI (OPRND (pc), -4), 4);
+ CPU (h_gr[((HOSTUINT) 14)]) = opval;
+ TRACE_RESULT (current_cpu, "gr-14", 'x', opval);
+ }
+ {
+ USI opval = OPRND (disp8);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -760,11 +838,17 @@ SEM_FN_NAME (m32rx,bl24) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_BL24_CODE
do {
- CPU (h_gr[14]) = ADDSI (OPRND (pc), 4);
- TRACE_RESULT (current_cpu, "gr-14", 'x', CPU (h_gr[14]));
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp24)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ SI opval = ADDSI (OPRND (pc), 4);
+ CPU (h_gr[((HOSTUINT) 14)]) = opval;
+ TRACE_RESULT (current_cpu, "gr-14", 'x', opval);
+ }
+ {
+ USI opval = OPRND (disp24);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -796,11 +880,17 @@ SEM_FN_NAME (m32rx,bcl8) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
if (OPRND (condbit)) {
do {
- CPU (h_gr[14]) = ADDSI (ANDSI (OPRND (pc), -4), 4);
- TRACE_RESULT (current_cpu, "gr-14", 'x', CPU (h_gr[14]));
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp8)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ SI opval = ADDSI (ANDSI (OPRND (pc), -4), 4);
+ CPU (h_gr[((HOSTUINT) 14)]) = opval;
+ TRACE_RESULT (current_cpu, "gr-14", 'x', opval);
+ }
+ {
+ USI opval = OPRND (disp8);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
} while (0);
}
@@ -833,11 +923,17 @@ SEM_FN_NAME (m32rx,bcl24) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
if (OPRND (condbit)) {
do {
- CPU (h_gr[14]) = ADDSI (OPRND (pc), 4);
- TRACE_RESULT (current_cpu, "gr-14", 'x', CPU (h_gr[14]));
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp24)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ SI opval = ADDSI (OPRND (pc), 4);
+ CPU (h_gr[((HOSTUINT) 14)]) = opval;
+ TRACE_RESULT (current_cpu, "gr-14", 'x', opval);
+ }
+ {
+ USI opval = OPRND (disp24);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
} while (0);
}
@@ -869,9 +965,12 @@ SEM_FN_NAME (m32rx,bnc8) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_BC8_CODE
if (NOTBI (OPRND (condbit))) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp8)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp8);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -901,9 +1000,12 @@ SEM_FN_NAME (m32rx,bnc24) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
EXTRACT_FMT_BC24_CODE
if (NOTBI (OPRND (condbit))) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp24)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp24);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -933,9 +1035,12 @@ SEM_FN_NAME (m32rx,bne) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_BEQ_CODE
if (NESI (OPRND (src1), OPRND (src2))) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp16)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp16);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -965,9 +1070,12 @@ SEM_FN_NAME (m32rx,bra8) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_BRA8_VARS /* f-op1 f-r1 f-disp8 */
EXTRACT_FMT_BRA8_CODE
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp8)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp8);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -995,9 +1103,12 @@ SEM_FN_NAME (m32rx,bra24) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
EXTRACT_FMT_BRA24_VARS /* f-op1 f-r1 f-disp24 */
EXTRACT_FMT_BRA24_CODE
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp24)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = OPRND (disp24);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1027,11 +1138,17 @@ SEM_FN_NAME (m32rx,bncl8) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
if (NOTBI (OPRND (condbit))) {
do {
- CPU (h_gr[14]) = ADDSI (ANDSI (OPRND (pc), -4), 4);
- TRACE_RESULT (current_cpu, "gr-14", 'x', CPU (h_gr[14]));
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp8)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ SI opval = ADDSI (ANDSI (OPRND (pc), -4), 4);
+ CPU (h_gr[((HOSTUINT) 14)]) = opval;
+ TRACE_RESULT (current_cpu, "gr-14", 'x', opval);
+ }
+ {
+ USI opval = OPRND (disp8);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
} while (0);
}
@@ -1064,11 +1181,17 @@ SEM_FN_NAME (m32rx,bncl24) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
if (NOTBI (OPRND (condbit))) {
do {
- CPU (h_gr[14]) = ADDSI (OPRND (pc), 4);
- TRACE_RESULT (current_cpu, "gr-14", 'x', CPU (h_gr[14]));
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, OPRND (disp24)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ SI opval = ADDSI (OPRND (pc), 4);
+ CPU (h_gr[((HOSTUINT) 14)]) = opval;
+ TRACE_RESULT (current_cpu, "gr-14", 'x', opval);
+ }
+ {
+ USI opval = OPRND (disp24);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
} while (0);
}
@@ -1098,8 +1221,11 @@ SEM_FN_NAME (m32rx,cmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_CMP_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_CMP_CODE
- CPU (h_cond) = LTSI (OPRND (src1), OPRND (src2));
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ UBI opval = LTSI (OPRND (src1), OPRND (src2));
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1127,8 +1253,11 @@ SEM_FN_NAME (m32rx,cmpi) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_CMPI_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_CMPI_CODE
- CPU (h_cond) = LTSI (OPRND (src2), OPRND (simm16));
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ UBI opval = LTSI (OPRND (src2), OPRND (simm16));
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1156,8 +1285,11 @@ SEM_FN_NAME (m32rx,cmpu) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_CMP_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_CMP_CODE
- CPU (h_cond) = LTUSI (OPRND (src1), OPRND (src2));
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ UBI opval = LTUSI (OPRND (src1), OPRND (src2));
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1185,8 +1317,11 @@ SEM_FN_NAME (m32rx,cmpui) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
EXTRACT_FMT_CMPI_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_CMPI_CODE
- CPU (h_cond) = LTUSI (OPRND (src2), OPRND (simm16));
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ UBI opval = LTUSI (OPRND (src2), OPRND (simm16));
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1214,8 +1349,11 @@ SEM_FN_NAME (m32rx,cmpeq) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
EXTRACT_FMT_CMP_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_CMP_CODE
- CPU (h_cond) = EQSI (OPRND (src1), OPRND (src2));
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ UBI opval = EQSI (OPRND (src1), OPRND (src2));
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1243,8 +1381,11 @@ SEM_FN_NAME (m32rx,cmpz) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_CMPZ_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_CMPZ_CODE
- CPU (h_cond) = EQSI (OPRND (src2), 0);
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ UBI opval = EQSI (OPRND (src2), 0);
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1273,8 +1414,11 @@ SEM_FN_NAME (m32rx,div) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_DIV_CODE
if (NESI (OPRND (sr), 0)) {
- CPU (h_gr[f_r1]) = DIVSI (OPRND (dr), OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = DIVSI (OPRND (dr), OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1305,8 +1449,11 @@ SEM_FN_NAME (m32rx,divu) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_DIV_CODE
if (NESI (OPRND (sr), 0)) {
- CPU (h_gr[f_r1]) = UDIVSI (OPRND (dr), OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = UDIVSI (OPRND (dr), OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1337,8 +1484,11 @@ SEM_FN_NAME (m32rx,rem) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_DIV_CODE
if (NESI (OPRND (sr), 0)) {
- CPU (h_gr[f_r1]) = MODSI (OPRND (dr), OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = MODSI (OPRND (dr), OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1369,8 +1519,11 @@ SEM_FN_NAME (m32rx,remu) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_DIV_CODE
if (NESI (OPRND (sr), 0)) {
- CPU (h_gr[f_r1]) = UMODSI (OPRND (dr), OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = UMODSI (OPRND (dr), OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1401,8 +1554,11 @@ SEM_FN_NAME (m32rx,divh) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_DIV_CODE
if (NESI (OPRND (sr), 0)) {
- CPU (h_gr[f_r1]) = DIVSI (EXTHISI (TRUNCSIHI (OPRND (dr))), OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = DIVSI (EXTHISI (TRUNCSIHI (OPRND (dr))), OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1434,9 +1590,12 @@ SEM_FN_NAME (m32rx,jc) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exec
EXTRACT_FMT_JC_CODE
if (OPRND (condbit)) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, ANDSI (OPRND (sr), -4)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = ANDSI (OPRND (sr), -4);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1467,9 +1626,12 @@ SEM_FN_NAME (m32rx,jnc) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_JC_CODE
if (NOTBI (OPRND (condbit))) {
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, ANDSI (OPRND (sr), -4)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = ANDSI (OPRND (sr), -4);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
}
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1503,11 +1665,17 @@ do {
USI temp1;SI temp0;
temp0 = ADDSI (ANDSI (OPRND (pc), -4), 4);
temp1 = ANDSI (OPRND (sr), -4);
- CPU (h_gr[14]) = temp0;
- TRACE_RESULT (current_cpu, "gr-14", 'x', CPU (h_gr[14]));
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, temp1));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ SI opval = temp0;
+ CPU (h_gr[((HOSTUINT) 14)]) = opval;
+ TRACE_RESULT (current_cpu, "gr-14", 'x', opval);
+ }
+ {
+ USI opval = temp1;
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1538,9 +1706,12 @@ SEM_FN_NAME (m32rx,jmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_JMP_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_JMP_CODE
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, ANDSI (OPRND (sr), -4)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = ANDSI (OPRND (sr), -4);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1568,8 +1739,11 @@ SEM_FN_NAME (m32rx,ld) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exec
EXTRACT_FMT_LD_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_LD_CODE
- CPU (h_gr[f_r1]) = OPRND (h_memory_sr);
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = OPRND (h_memory_sr);
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1598,8 +1772,11 @@ SEM_FN_NAME (m32rx,ld_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_LD_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_LD_D_CODE
- CPU (h_gr[f_r1]) = OPRND (h_memory_add__VM_sr_slo16);
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = OPRND (h_memory_add__VM_sr_slo16);
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1628,8 +1805,11 @@ SEM_FN_NAME (m32rx,ldb) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_LDB_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_LDB_CODE
- CPU (h_gr[f_r1]) = EXTQISI (OPRND (h_memory_sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = EXTQISI (OPRND (h_memory_sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1658,8 +1838,11 @@ SEM_FN_NAME (m32rx,ldb_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
EXTRACT_FMT_LDB_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_LDB_D_CODE
- CPU (h_gr[f_r1]) = EXTQISI (OPRND (h_memory_add__VM_sr_slo16));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = EXTQISI (OPRND (h_memory_add__VM_sr_slo16));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1688,8 +1871,11 @@ SEM_FN_NAME (m32rx,ldh) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_LDH_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_LDH_CODE
- CPU (h_gr[f_r1]) = EXTHISI (OPRND (h_memory_sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = EXTHISI (OPRND (h_memory_sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1718,8 +1904,11 @@ SEM_FN_NAME (m32rx,ldh_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
EXTRACT_FMT_LDH_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_LDH_D_CODE
- CPU (h_gr[f_r1]) = EXTHISI (OPRND (h_memory_add__VM_sr_slo16));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = EXTHISI (OPRND (h_memory_add__VM_sr_slo16));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1748,8 +1937,11 @@ SEM_FN_NAME (m32rx,ldub) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_LDB_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_LDB_CODE
- CPU (h_gr[f_r1]) = ZEXTQISI (OPRND (h_memory_sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ZEXTQISI (OPRND (h_memory_sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1778,8 +1970,11 @@ SEM_FN_NAME (m32rx,ldub_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
EXTRACT_FMT_LDB_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_LDB_D_CODE
- CPU (h_gr[f_r1]) = ZEXTQISI (OPRND (h_memory_add__VM_sr_slo16));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ZEXTQISI (OPRND (h_memory_add__VM_sr_slo16));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1808,8 +2003,11 @@ SEM_FN_NAME (m32rx,lduh) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_LDH_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_LDH_CODE
- CPU (h_gr[f_r1]) = ZEXTHISI (OPRND (h_memory_sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ZEXTHISI (OPRND (h_memory_sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1838,8 +2036,11 @@ SEM_FN_NAME (m32rx,lduh_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
EXTRACT_FMT_LDH_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_LDH_D_CODE
- CPU (h_gr[f_r1]) = ZEXTHISI (OPRND (h_memory_add__VM_sr_slo16));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ZEXTHISI (OPRND (h_memory_add__VM_sr_slo16));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1872,10 +2073,16 @@ do {
SI temp1;SI temp0;
temp0 = OPRND (h_memory_sr);
temp1 = ADDSI (OPRND (sr), 4);
- CPU (h_gr[f_r1]) = temp0;
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
- CPU (h_gr[f_r2]) = temp1;
- TRACE_RESULT (current_cpu, "sr", 'x', CPU (h_gr[f_r2]));
+ {
+ SI opval = temp0;
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
+ {
+ SI opval = temp1;
+ CPU (h_gr[f_r2]) = opval;
+ TRACE_RESULT (current_cpu, "sr", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1905,8 +2112,11 @@ SEM_FN_NAME (m32rx,ld24) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_LD24_VARS /* f-op1 f-r1 f-uimm24 */
EXTRACT_FMT_LD24_CODE
- CPU (h_gr[f_r1]) = OPRND (uimm24);
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = OPRND (uimm24);
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1934,8 +2144,11 @@ SEM_FN_NAME (m32rx,ldi8) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_LDI8_VARS /* f-op1 f-r1 f-simm8 */
EXTRACT_FMT_LDI8_CODE
- CPU (h_gr[f_r1]) = OPRND (simm8);
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = OPRND (simm8);
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1963,8 +2176,11 @@ SEM_FN_NAME (m32rx,ldi16) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
EXTRACT_FMT_LDI16_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_LDI16_CODE
- CPU (h_gr[f_r1]) = OPRND (slo16);
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = OPRND (slo16);
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -1993,10 +2209,16 @@ SEM_FN_NAME (m32rx,lock) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_LOCK_CODE
do {
- CPU (h_lock) = 1;
- TRACE_RESULT (current_cpu, "lock-0", 'x', CPU (h_lock));
- CPU (h_gr[f_r1]) = OPRND (h_memory_sr);
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ UBI opval = 1;
+ CPU (h_lock) = opval;
+ TRACE_RESULT (current_cpu, "lock-0", 'x', opval);
+ }
+ {
+ SI opval = OPRND (h_memory_sr);
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2026,8 +2248,11 @@ SEM_FN_NAME (m32rx,machi_a) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par
EXTRACT_FMT_MACHI_A_VARS /* f-op1 f-r1 f-acc f-op23 f-r2 */
EXTRACT_FMT_MACHI_A_CODE
-m32rx_h_accums_set (current_cpu, f_acc, SRADI (SLLDI (ADDDI (OPRND (acc), MULDI (EXTSIDI (ANDSI (OPRND (src1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16))))), 8), 8));
- TRACE_RESULT (current_cpu, "acc", 'D', m32rx_h_accums_get (current_cpu, f_acc));
+ {
+ DI opval = SRADI (SLLDI (ADDDI (OPRND (acc), MULDI (EXTSIDI (ANDSI (OPRND (src1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16))))), 8), 8);
+ m32rx_h_accums_set (current_cpu, f_acc, opval);
+ TRACE_RESULT (current_cpu, "acc", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2055,8 +2280,11 @@ SEM_FN_NAME (m32rx,maclo_a) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par
EXTRACT_FMT_MACHI_A_VARS /* f-op1 f-r1 f-acc f-op23 f-r2 */
EXTRACT_FMT_MACHI_A_CODE
-m32rx_h_accums_set (current_cpu, f_acc, SRADI (SLLDI (ADDDI (OPRND (acc), MULDI (EXTSIDI (SLLSI (OPRND (src1), 16)), EXTHIDI (TRUNCSIHI (OPRND (src2))))), 8), 8));
- TRACE_RESULT (current_cpu, "acc", 'D', m32rx_h_accums_get (current_cpu, f_acc));
+ {
+ DI opval = SRADI (SLLDI (ADDDI (OPRND (acc), MULDI (EXTSIDI (SLLSI (OPRND (src1), 16)), EXTHIDI (TRUNCSIHI (OPRND (src2))))), 8), 8);
+ m32rx_h_accums_set (current_cpu, f_acc, opval);
+ TRACE_RESULT (current_cpu, "acc", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2084,8 +2312,11 @@ SEM_FN_NAME (m32rx,macwhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
EXTRACT_FMT_MACWHI_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MACWHI_CODE
-m32rx_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (OPRND (accum), MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16))))), 8), 8));
- TRACE_RESULT (current_cpu, "accum", 'D', m32rx_h_accum_get (current_cpu));
+ {
+ DI opval = SRADI (SLLDI (ADDDI (OPRND (accum), MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16))))), 8), 8);
+ m32rx_h_accum_set (current_cpu, opval);
+ TRACE_RESULT (current_cpu, "accum", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2113,8 +2344,11 @@ SEM_FN_NAME (m32rx,macwlo) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
EXTRACT_FMT_MACWHI_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MACWHI_CODE
-m32rx_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (OPRND (accum), MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (OPRND (src2))))), 8), 8));
- TRACE_RESULT (current_cpu, "accum", 'D', m32rx_h_accum_get (current_cpu));
+ {
+ DI opval = SRADI (SLLDI (ADDDI (OPRND (accum), MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (OPRND (src2))))), 8), 8);
+ m32rx_h_accum_set (current_cpu, opval);
+ TRACE_RESULT (current_cpu, "accum", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2142,8 +2376,11 @@ SEM_FN_NAME (m32rx,mul) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_ADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_ADD_CODE
- CPU (h_gr[f_r1]) = MULSI (OPRND (dr), OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = MULSI (OPRND (dr), OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2172,8 +2409,11 @@ SEM_FN_NAME (m32rx,mulhi_a) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par
EXTRACT_FMT_MULHI_A_VARS /* f-op1 f-r1 f-acc f-op23 f-r2 */
EXTRACT_FMT_MULHI_A_CODE
-m32rx_h_accums_set (current_cpu, f_acc, SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (OPRND (src1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16)))), 16), 16));
- TRACE_RESULT (current_cpu, "acc", 'D', m32rx_h_accums_get (current_cpu, f_acc));
+ {
+ DI opval = SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (OPRND (src1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16)))), 16), 16);
+ m32rx_h_accums_set (current_cpu, f_acc, opval);
+ TRACE_RESULT (current_cpu, "acc", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2201,8 +2441,11 @@ SEM_FN_NAME (m32rx,mullo_a) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par
EXTRACT_FMT_MULHI_A_VARS /* f-op1 f-r1 f-acc f-op23 f-r2 */
EXTRACT_FMT_MULHI_A_CODE
-m32rx_h_accums_set (current_cpu, f_acc, SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (OPRND (src1), 16)), EXTHIDI (TRUNCSIHI (OPRND (src2)))), 16), 16));
- TRACE_RESULT (current_cpu, "acc", 'D', m32rx_h_accums_get (current_cpu, f_acc));
+ {
+ DI opval = SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (OPRND (src1), 16)), EXTHIDI (TRUNCSIHI (OPRND (src2)))), 16), 16);
+ m32rx_h_accums_set (current_cpu, f_acc, opval);
+ TRACE_RESULT (current_cpu, "acc", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2230,8 +2473,11 @@ SEM_FN_NAME (m32rx,mulwhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
EXTRACT_FMT_MULWHI_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MULWHI_CODE
-m32rx_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16)))), 8), 8));
- TRACE_RESULT (current_cpu, "accum", 'D', m32rx_h_accum_get (current_cpu));
+ {
+ DI opval = SRADI (SLLDI (MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16)))), 8), 8);
+ m32rx_h_accum_set (current_cpu, opval);
+ TRACE_RESULT (current_cpu, "accum", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2259,8 +2505,11 @@ SEM_FN_NAME (m32rx,mulwlo) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
EXTRACT_FMT_MULWHI_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MULWHI_CODE
-m32rx_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (OPRND (src2)))), 8), 8));
- TRACE_RESULT (current_cpu, "accum", 'D', m32rx_h_accum_get (current_cpu));
+ {
+ DI opval = SRADI (SLLDI (MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (OPRND (src2)))), 8), 8);
+ m32rx_h_accum_set (current_cpu, opval);
+ TRACE_RESULT (current_cpu, "accum", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2288,8 +2537,11 @@ SEM_FN_NAME (m32rx,mv) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exec
EXTRACT_FMT_MV_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MV_CODE
- CPU (h_gr[f_r1]) = OPRND (sr);
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = OPRND (sr);
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2318,8 +2570,11 @@ SEM_FN_NAME (m32rx,mvfachi_a) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *p
EXTRACT_FMT_MVFACHI_A_VARS /* f-op1 f-r1 f-op2 f-accs f-op3 */
EXTRACT_FMT_MVFACHI_A_CODE
- CPU (h_gr[f_r1]) = TRUNCDISI (SRADI (OPRND (accs), 32));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = TRUNCDISI (SRADI (OPRND (accs), 32));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2347,8 +2602,11 @@ SEM_FN_NAME (m32rx,mvfaclo_a) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *p
EXTRACT_FMT_MVFACHI_A_VARS /* f-op1 f-r1 f-op2 f-accs f-op3 */
EXTRACT_FMT_MVFACHI_A_CODE
- CPU (h_gr[f_r1]) = TRUNCDISI (OPRND (accs));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = TRUNCDISI (OPRND (accs));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2376,8 +2634,11 @@ SEM_FN_NAME (m32rx,mvfacmi_a) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *p
EXTRACT_FMT_MVFACHI_A_VARS /* f-op1 f-r1 f-op2 f-accs f-op3 */
EXTRACT_FMT_MVFACHI_A_CODE
- CPU (h_gr[f_r1]) = TRUNCDISI (SRADI (OPRND (accs), 16));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = TRUNCDISI (SRADI (OPRND (accs), 16));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2405,8 +2666,11 @@ SEM_FN_NAME (m32rx,mvfc) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_MVFC_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MVFC_CODE
- CPU (h_gr[f_r1]) = OPRND (scr);
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = OPRND (scr);
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2434,8 +2698,11 @@ SEM_FN_NAME (m32rx,mvtachi_a) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *p
EXTRACT_FMT_MVTACHI_A_VARS /* f-op1 f-r1 f-op2 f-accs f-op3 */
EXTRACT_FMT_MVTACHI_A_CODE
-m32rx_h_accums_set (current_cpu, f_accs, ORDI (ANDDI (OPRND (accs), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (OPRND (src1)), 32)));
- TRACE_RESULT (current_cpu, "accs", 'D', m32rx_h_accums_get (current_cpu, f_accs));
+ {
+ DI opval = ORDI (ANDDI (OPRND (accs), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (OPRND (src1)), 32));
+ m32rx_h_accums_set (current_cpu, f_accs, opval);
+ TRACE_RESULT (current_cpu, "accs", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2463,8 +2730,11 @@ SEM_FN_NAME (m32rx,mvtaclo_a) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *p
EXTRACT_FMT_MVTACHI_A_VARS /* f-op1 f-r1 f-op2 f-accs f-op3 */
EXTRACT_FMT_MVTACHI_A_CODE
-m32rx_h_accums_set (current_cpu, f_accs, ORDI (ANDDI (OPRND (accs), MAKEDI (0xffffffff, 0)), ZEXTSIDI (OPRND (src1))));
- TRACE_RESULT (current_cpu, "accs", 'D', m32rx_h_accums_get (current_cpu, f_accs));
+ {
+ DI opval = ORDI (ANDDI (OPRND (accs), MAKEDI (0xffffffff, 0)), ZEXTSIDI (OPRND (src1)));
+ m32rx_h_accums_set (current_cpu, f_accs, opval);
+ TRACE_RESULT (current_cpu, "accs", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2492,8 +2762,11 @@ SEM_FN_NAME (m32rx,mvtc) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_MVTC_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MVTC_CODE
-m32rx_h_cr_set (current_cpu, f_r1, OPRND (sr));
- TRACE_RESULT (current_cpu, "dcr", 'x', m32rx_h_cr_get (current_cpu, f_r1));
+ {
+ USI opval = OPRND (sr);
+ m32rx_h_cr_set (current_cpu, f_r1, opval);
+ TRACE_RESULT (current_cpu, "dcr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2521,8 +2794,11 @@ SEM_FN_NAME (m32rx,neg) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_MV_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MV_CODE
- CPU (h_gr[f_r1]) = NEGSI (OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = NEGSI (OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2578,8 +2854,11 @@ SEM_FN_NAME (m32rx,not) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_MV_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MV_CODE
- CPU (h_gr[f_r1]) = INVSI (OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = INVSI (OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2612,8 +2891,11 @@ do {
DI tmp_tmp1;
tmp_tmp1 = SLLDI (OPRND (accs), OPRND (imm1));
tmp_tmp1 = ADDDI (tmp_tmp1, MAKEDI (0, 32768));
-m32rx_h_accums_set (current_cpu, f_accd, (GTDI (tmp_tmp1, MAKEDI (32767, 0xffff0000))) ? (MAKEDI (32767, 0xffff0000)) : (LTDI (tmp_tmp1, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1, MAKEDI (0xffffffff, 0xffff0000))));
- TRACE_RESULT (current_cpu, "accd", 'D', m32rx_h_accums_get (current_cpu, f_accd));
+ {
+ DI opval = (GTDI (tmp_tmp1, MAKEDI (32767, 0xffff0000))) ? (MAKEDI (32767, 0xffff0000)) : (LTDI (tmp_tmp1, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1, MAKEDI (0xffffffff, 0xffff0000)));
+ m32rx_h_accums_set (current_cpu, f_accd, opval);
+ TRACE_RESULT (current_cpu, "accd", 'D', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2645,8 +2927,11 @@ do {
DI tmp_tmp1;
tmp_tmp1 = SLLDI (OPRND (accs), OPRND (imm1));
tmp_tmp1 = ADDDI (tmp_tmp1, MAKEDI (0, 0x80000000));
-m32rx_h_accums_set (current_cpu, f_accd, (GTDI (tmp_tmp1, MAKEDI (32767, 0))) ? (MAKEDI (32767, 0)) : (LTDI (tmp_tmp1, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1, MAKEDI (0xffffffff, 0))));
- TRACE_RESULT (current_cpu, "accd", 'D', m32rx_h_accums_get (current_cpu, f_accd));
+ {
+ DI opval = (GTDI (tmp_tmp1, MAKEDI (32767, 0))) ? (MAKEDI (32767, 0)) : (LTDI (tmp_tmp1, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1, MAKEDI (0xffffffff, 0)));
+ m32rx_h_accums_set (current_cpu, f_accd, opval);
+ TRACE_RESULT (current_cpu, "accd", 'D', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2676,15 +2961,27 @@ SEM_FN_NAME (m32rx,rte) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_RTE_CODE
do {
- CPU (h_sm) = OPRND (h_bsm_0);
- TRACE_RESULT (current_cpu, "sm-0", 'x', CPU (h_sm));
- CPU (h_ie) = OPRND (h_bie_0);
- TRACE_RESULT (current_cpu, "ie-0", 'x', CPU (h_ie));
- CPU (h_cond) = OPRND (h_bcond_0);
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, ANDSI (OPRND (h_bpc_0), -4)));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ UBI opval = OPRND (h_bsm_0);
+ CPU (h_sm) = opval;
+ TRACE_RESULT (current_cpu, "sm-0", 'x', opval);
+ }
+ {
+ UBI opval = OPRND (h_bie_0);
+ CPU (h_ie) = opval;
+ TRACE_RESULT (current_cpu, "ie-0", 'x', opval);
+ }
+ {
+ UBI opval = OPRND (h_bcond_0);
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
+ {
+ USI opval = ANDSI (OPRND (h_bpc_0), -4);
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2712,8 +3009,11 @@ SEM_FN_NAME (m32rx,seth) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_SETH_VARS /* f-op1 f-r1 f-op2 f-r2 f-hi16 */
EXTRACT_FMT_SETH_CODE
- CPU (h_gr[f_r1]) = SLLSI (OPRND (hi16), 16);
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = SLLSI (OPRND (hi16), 16);
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2741,8 +3041,11 @@ SEM_FN_NAME (m32rx,sll) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_ADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_ADD_CODE
- CPU (h_gr[f_r1]) = SLLSI (OPRND (dr), ANDSI (OPRND (sr), 31));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = SLLSI (OPRND (dr), ANDSI (OPRND (sr), 31));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2771,8 +3074,11 @@ SEM_FN_NAME (m32rx,sll3) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_SLL3_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_SLL3_CODE
- CPU (h_gr[f_r1]) = SLLSI (OPRND (sr), ANDSI (OPRND (simm16), 31));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = SLLSI (OPRND (sr), ANDSI (OPRND (simm16), 31));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2801,8 +3107,11 @@ SEM_FN_NAME (m32rx,slli) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_SLLI_VARS /* f-op1 f-r1 f-shift-op2 f-uimm5 */
EXTRACT_FMT_SLLI_CODE
- CPU (h_gr[f_r1]) = SLLSI (OPRND (dr), OPRND (uimm5));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = SLLSI (OPRND (dr), OPRND (uimm5));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2831,8 +3140,11 @@ SEM_FN_NAME (m32rx,sra) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_ADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_ADD_CODE
- CPU (h_gr[f_r1]) = SRASI (OPRND (dr), ANDSI (OPRND (sr), 31));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = SRASI (OPRND (dr), ANDSI (OPRND (sr), 31));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2861,8 +3173,11 @@ SEM_FN_NAME (m32rx,sra3) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_SLL3_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_SLL3_CODE
- CPU (h_gr[f_r1]) = SRASI (OPRND (sr), ANDSI (OPRND (simm16), 31));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = SRASI (OPRND (sr), ANDSI (OPRND (simm16), 31));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2891,8 +3206,11 @@ SEM_FN_NAME (m32rx,srai) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_SLLI_VARS /* f-op1 f-r1 f-shift-op2 f-uimm5 */
EXTRACT_FMT_SLLI_CODE
- CPU (h_gr[f_r1]) = SRASI (OPRND (dr), OPRND (uimm5));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = SRASI (OPRND (dr), OPRND (uimm5));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2921,8 +3239,11 @@ SEM_FN_NAME (m32rx,srl) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_ADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_ADD_CODE
- CPU (h_gr[f_r1]) = SRLSI (OPRND (dr), ANDSI (OPRND (sr), 31));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = SRLSI (OPRND (dr), ANDSI (OPRND (sr), 31));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2951,8 +3272,11 @@ SEM_FN_NAME (m32rx,srl3) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_SLL3_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_SLL3_CODE
- CPU (h_gr[f_r1]) = SRLSI (OPRND (sr), ANDSI (OPRND (simm16), 31));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = SRLSI (OPRND (sr), ANDSI (OPRND (simm16), 31));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -2981,8 +3305,11 @@ SEM_FN_NAME (m32rx,srli) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_SLLI_VARS /* f-op1 f-r1 f-shift-op2 f-uimm5 */
EXTRACT_FMT_SLLI_CODE
- CPU (h_gr[f_r1]) = SRLSI (OPRND (dr), OPRND (uimm5));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = SRLSI (OPRND (dr), OPRND (uimm5));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3011,8 +3338,11 @@ SEM_FN_NAME (m32rx,st) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exec
EXTRACT_FMT_ST_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_ST_CODE
-SETMEMSI (current_cpu, OPRND (src2), OPRND (src1));
- TRACE_RESULT (current_cpu, "memory", 'x', GETMEMSI (current_cpu, OPRND (src2)));
+ {
+ SI opval = OPRND (src1);
+ SETMEMSI (current_cpu, OPRND (src2), opval);
+ TRACE_RESULT (current_cpu, "memory", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3040,8 +3370,11 @@ SEM_FN_NAME (m32rx,st_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_ST_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_ST_D_CODE
-SETMEMSI (current_cpu, ADDSI (OPRND (src2), OPRND (slo16)), OPRND (src1));
- TRACE_RESULT (current_cpu, "memory", 'x', GETMEMSI (current_cpu, ADDSI (OPRND (src2), OPRND (slo16))));
+ {
+ SI opval = OPRND (src1);
+ SETMEMSI (current_cpu, ADDSI (OPRND (src2), OPRND (slo16)), opval);
+ TRACE_RESULT (current_cpu, "memory", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3069,8 +3402,11 @@ SEM_FN_NAME (m32rx,stb) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_STB_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_STB_CODE
-SETMEMQI (current_cpu, OPRND (src2), OPRND (src1));
- TRACE_RESULT (current_cpu, "memory", 'x', GETMEMQI (current_cpu, OPRND (src2)));
+ {
+ QI opval = OPRND (src1);
+ SETMEMQI (current_cpu, OPRND (src2), opval);
+ TRACE_RESULT (current_cpu, "memory", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3098,8 +3434,11 @@ SEM_FN_NAME (m32rx,stb_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
EXTRACT_FMT_STB_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_STB_D_CODE
-SETMEMQI (current_cpu, ADDSI (OPRND (src2), OPRND (slo16)), OPRND (src1));
- TRACE_RESULT (current_cpu, "memory", 'x', GETMEMQI (current_cpu, ADDSI (OPRND (src2), OPRND (slo16))));
+ {
+ QI opval = OPRND (src1);
+ SETMEMQI (current_cpu, ADDSI (OPRND (src2), OPRND (slo16)), opval);
+ TRACE_RESULT (current_cpu, "memory", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3127,8 +3466,11 @@ SEM_FN_NAME (m32rx,sth) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_STH_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_STH_CODE
-SETMEMHI (current_cpu, OPRND (src2), OPRND (src1));
- TRACE_RESULT (current_cpu, "memory", 'x', GETMEMHI (current_cpu, OPRND (src2)));
+ {
+ HI opval = OPRND (src1);
+ SETMEMHI (current_cpu, OPRND (src2), opval);
+ TRACE_RESULT (current_cpu, "memory", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3156,8 +3498,11 @@ SEM_FN_NAME (m32rx,sth_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
EXTRACT_FMT_STH_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
EXTRACT_FMT_STH_D_CODE
-SETMEMHI (current_cpu, ADDSI (OPRND (src2), OPRND (slo16)), OPRND (src1));
- TRACE_RESULT (current_cpu, "memory", 'x', GETMEMHI (current_cpu, ADDSI (OPRND (src2), OPRND (slo16))));
+ {
+ HI opval = OPRND (src1);
+ SETMEMHI (current_cpu, ADDSI (OPRND (src2), OPRND (slo16)), opval);
+ TRACE_RESULT (current_cpu, "memory", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3188,10 +3533,16 @@ SEM_FN_NAME (m32rx,st_plus) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par
do {
SI tmp_new_src2;
tmp_new_src2 = ADDSI (OPRND (src2), 4);
-SETMEMSI (current_cpu, tmp_new_src2, OPRND (src1));
- TRACE_RESULT (current_cpu, "memory", 'x', GETMEMSI (current_cpu, tmp_new_src2));
- CPU (h_gr[f_r2]) = tmp_new_src2;
- TRACE_RESULT (current_cpu, "src2", 'x', CPU (h_gr[f_r2]));
+ {
+ SI opval = OPRND (src1);
+ SETMEMSI (current_cpu, tmp_new_src2, opval);
+ TRACE_RESULT (current_cpu, "memory", 'x', opval);
+ }
+ {
+ SI opval = tmp_new_src2;
+ CPU (h_gr[f_r2]) = opval;
+ TRACE_RESULT (current_cpu, "src2", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3224,10 +3575,16 @@ SEM_FN_NAME (m32rx,st_minus) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *pa
do {
SI tmp_new_src2;
tmp_new_src2 = SUBSI (OPRND (src2), 4);
-SETMEMSI (current_cpu, tmp_new_src2, OPRND (src1));
- TRACE_RESULT (current_cpu, "memory", 'x', GETMEMSI (current_cpu, tmp_new_src2));
- CPU (h_gr[f_r2]) = tmp_new_src2;
- TRACE_RESULT (current_cpu, "src2", 'x', CPU (h_gr[f_r2]));
+ {
+ SI opval = OPRND (src1);
+ SETMEMSI (current_cpu, tmp_new_src2, opval);
+ TRACE_RESULT (current_cpu, "memory", 'x', opval);
+ }
+ {
+ SI opval = tmp_new_src2;
+ CPU (h_gr[f_r2]) = opval;
+ TRACE_RESULT (current_cpu, "src2", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3257,8 +3614,11 @@ SEM_FN_NAME (m32rx,sub) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_ADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_ADD_CODE
- CPU (h_gr[f_r1]) = SUBSI (OPRND (dr), OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = SUBSI (OPRND (dr), OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3291,10 +3651,16 @@ do {
UBI temp1;SI temp0;
temp0 = SUBSI (OPRND (dr), OPRND (sr));
temp1 = SUBOFSI (OPRND (dr), OPRND (sr), 0);
- CPU (h_gr[f_r1]) = temp0;
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
- CPU (h_cond) = temp1;
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ SI opval = temp0;
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
+ {
+ UBI opval = temp1;
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3328,10 +3694,16 @@ do {
UBI temp1;SI temp0;
temp0 = SUBCSI (OPRND (dr), OPRND (sr), OPRND (condbit));
temp1 = SUBCFSI (OPRND (dr), OPRND (sr), OPRND (condbit));
- CPU (h_gr[f_r1]) = temp0;
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
- CPU (h_cond) = temp1;
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ SI opval = temp0;
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
+ {
+ UBI opval = temp1;
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3363,13 +3735,22 @@ SEM_FN_NAME (m32rx,trap) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_TRAP_CODE
do {
-m32rx_h_cr_set (current_cpu, 6, ADDSI (OPRND (pc), 4));
- TRACE_RESULT (current_cpu, "cr-6", 'x', m32rx_h_cr_get (current_cpu, 6));
-m32rx_h_cr_set (current_cpu, 0, ANDSI (SLLSI (OPRND (h_cr_0), 8), 65408));
- TRACE_RESULT (current_cpu, "cr-0", 'x', m32rx_h_cr_get (current_cpu, 0));
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, m32r_trap (current_cpu, OPRND (uimm4))));
- taken_p = 1;
- TRACE_RESULT (current_cpu, "pc", 'x', new_pc);
+ {
+ USI opval = ADDSI (OPRND (pc), 4);
+ m32rx_h_cr_set (current_cpu, ((HOSTUINT) 6), opval);
+ TRACE_RESULT (current_cpu, "cr-6", 'x', opval);
+ }
+ {
+ USI opval = ANDSI (SLLSI (OPRND (h_cr_0), 8), 65408);
+ m32rx_h_cr_set (current_cpu, ((HOSTUINT) 0), opval);
+ TRACE_RESULT (current_cpu, "cr-0", 'x', opval);
+ }
+ {
+ SI opval = m32r_trap (current_cpu, OPRND (uimm4));
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, opval));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3399,11 +3780,17 @@ SEM_FN_NAME (m32rx,unlock) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
do {
if (OPRND (h_lock_0)) {
-SETMEMSI (current_cpu, OPRND (src2), OPRND (src1));
- TRACE_RESULT (current_cpu, "memory", 'x', GETMEMSI (current_cpu, OPRND (src2)));
-}
- CPU (h_lock) = 0;
- TRACE_RESULT (current_cpu, "lock-0", 'x', CPU (h_lock));
+ {
+ SI opval = OPRND (src1);
+ SETMEMSI (current_cpu, OPRND (src2), opval);
+ TRACE_RESULT (current_cpu, "memory", 'x', opval);
+ }
+}
+ {
+ UBI opval = 0;
+ CPU (h_lock) = opval;
+ TRACE_RESULT (current_cpu, "lock-0", 'x', opval);
+ }
} while (0);
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3432,8 +3819,11 @@ SEM_FN_NAME (m32rx,satb) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_SATB_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
EXTRACT_FMT_SATB_CODE
- CPU (h_gr[f_r1]) = (GESI (OPRND (sr), 127)) ? (127) : (LESI (OPRND (sr), -128)) ? (-128) : (OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = (GESI (OPRND (sr), 127)) ? (127) : (LESI (OPRND (sr), -128)) ? (-128) : (OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3462,8 +3852,11 @@ SEM_FN_NAME (m32rx,sath) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_SATB_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
EXTRACT_FMT_SATB_CODE
- CPU (h_gr[f_r1]) = (GESI (OPRND (sr), 32767)) ? (32767) : (LESI (OPRND (sr), -32768)) ? (-32768) : (OPRND (sr));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = (GESI (OPRND (sr), 32767)) ? (32767) : (LESI (OPRND (sr), -32768)) ? (-32768) : (OPRND (sr));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3492,8 +3885,11 @@ SEM_FN_NAME (m32rx,sat) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_exe
EXTRACT_FMT_SAT_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
EXTRACT_FMT_SAT_CODE
- CPU (h_gr[f_r1]) = ((OPRND (condbit)) ? (((LTSI (OPRND (sr), 0)) ? (2147483647) : (0x80000000))) : (OPRND (sr)));
- TRACE_RESULT (current_cpu, "dr", 'x', CPU (h_gr[f_r1]));
+ {
+ SI opval = ((OPRND (condbit)) ? (((LTSI (OPRND (sr), 0)) ? (2147483647) : (0x80000000))) : (OPRND (sr)));
+ CPU (h_gr[f_r1]) = opval;
+ TRACE_RESULT (current_cpu, "dr", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3522,8 +3918,11 @@ SEM_FN_NAME (m32rx,pcmpbz) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
EXTRACT_FMT_CMPZ_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_CMPZ_CODE
- CPU (h_cond) = (EQSI (ANDSI (OPRND (src2), 255), 0)) ? (1) : (EQSI (ANDSI (OPRND (src2), 65280), 0)) ? (1) : (EQSI (ANDSI (OPRND (src2), 16711680), 0)) ? (1) : (EQSI (ANDSI (OPRND (src2), 0xff000000), 0)) ? (1) : (0);
- TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
+ {
+ UBI opval = (EQSI (ANDSI (OPRND (src2), 255), 0)) ? (1) : (EQSI (ANDSI (OPRND (src2), 65280), 0)) ? (1) : (EQSI (ANDSI (OPRND (src2), 16711680), 0)) ? (1) : (EQSI (ANDSI (OPRND (src2), 0xff000000), 0)) ? (1) : (0);
+ CPU (h_cond) = opval;
+ TRACE_RESULT (current_cpu, "condbit", 'x', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3551,8 +3950,11 @@ SEM_FN_NAME (m32rx,sadd) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
EXTRACT_FMT_SADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_SADD_CODE
-m32rx_h_accums_set (current_cpu, 0, ADDDI (SRADI (OPRND (h_accums_1), 16), OPRND (h_accums_0)));
- TRACE_RESULT (current_cpu, "accums-0", 'D', m32rx_h_accums_get (current_cpu, 0));
+ {
+ DI opval = ADDDI (SRADI (OPRND (h_accums_1), 16), OPRND (h_accums_0));
+ m32rx_h_accums_set (current_cpu, ((HOSTUINT) 0), opval);
+ TRACE_RESULT (current_cpu, "accums-0", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3579,8 +3981,11 @@ SEM_FN_NAME (m32rx,macwu1) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
EXTRACT_FMT_MACWU1_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MACWU1_CODE
-m32rx_h_accums_set (current_cpu, 1, SRADI (SLLDI (ADDDI (OPRND (h_accums_1), MULDI (EXTSIDI (OPRND (src1)), EXTSIDI (ANDSI (OPRND (src2), 65535)))), 8), 8));
- TRACE_RESULT (current_cpu, "accums-1", 'D', m32rx_h_accums_get (current_cpu, 1));
+ {
+ DI opval = SRADI (SLLDI (ADDDI (OPRND (h_accums_1), MULDI (EXTSIDI (OPRND (src1)), EXTSIDI (ANDSI (OPRND (src2), 65535)))), 8), 8);
+ m32rx_h_accums_set (current_cpu, ((HOSTUINT) 1), opval);
+ TRACE_RESULT (current_cpu, "accums-1", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3608,8 +4013,11 @@ SEM_FN_NAME (m32rx,msblo) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_e
EXTRACT_FMT_MACWHI_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MACWHI_CODE
-m32rx_h_accum_set (current_cpu, SRADI (SLLDI (SUBDI (OPRND (accum), SRADI (SLLDI (MULDI (EXTHIDI (TRUNCSIHI (OPRND (src1))), EXTHIDI (TRUNCSIHI (OPRND (src2)))), 32), 16)), 8), 8));
- TRACE_RESULT (current_cpu, "accum", 'D', m32rx_h_accum_get (current_cpu));
+ {
+ DI opval = SRADI (SLLDI (SUBDI (OPRND (accum), SRADI (SLLDI (MULDI (EXTHIDI (TRUNCSIHI (OPRND (src1))), EXTHIDI (TRUNCSIHI (OPRND (src2)))), 32), 16)), 8), 8);
+ m32rx_h_accum_set (current_cpu, opval);
+ TRACE_RESULT (current_cpu, "accum", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3637,8 +4045,11 @@ SEM_FN_NAME (m32rx,mulwu1) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
EXTRACT_FMT_MULWU1_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MULWU1_CODE
-m32rx_h_accums_set (current_cpu, 1, SRADI (SLLDI (MULDI (EXTSIDI (OPRND (src1)), EXTSIDI (ANDSI (OPRND (src2), 65535))), 16), 16));
- TRACE_RESULT (current_cpu, "accums-1", 'D', m32rx_h_accums_get (current_cpu, 1));
+ {
+ DI opval = SRADI (SLLDI (MULDI (EXTSIDI (OPRND (src1)), EXTSIDI (ANDSI (OPRND (src2), 65535))), 16), 16);
+ m32rx_h_accums_set (current_cpu, ((HOSTUINT) 1), opval);
+ TRACE_RESULT (current_cpu, "accums-1", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);
@@ -3666,8 +4077,11 @@ SEM_FN_NAME (m32rx,maclh1) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_
EXTRACT_FMT_MACWU1_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MACWU1_CODE
-m32rx_h_accums_set (current_cpu, 1, SRADI (SLLDI (ADDDI (OPRND (h_accums_1), SLLDI (EXTSIDI (MULSI (EXTHISI (TRUNCSIHI (OPRND (src1))), SRASI (OPRND (src2), 16))), 16)), 8), 8));
- TRACE_RESULT (current_cpu, "accums-1", 'D', m32rx_h_accums_get (current_cpu, 1));
+ {
+ DI opval = SRADI (SLLDI (ADDDI (OPRND (h_accums_1), SLLDI (EXTSIDI (MULSI (EXTHISI (TRUNCSIHI (OPRND (src1))), SRASI (OPRND (src2), 16))), 16)), 8), 8);
+ m32rx_h_accums_set (current_cpu, ((HOSTUINT) 1), opval);
+ TRACE_RESULT (current_cpu, "accums-1", 'D', opval);
+ }
PROFILE_COUNT_INSN (current_cpu, 0, abuf->idesc->num);