diff options
author | Doug Evans <dje@google.com> | 1998-02-23 21:36:15 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1998-02-23 21:36:15 +0000 |
commit | 02310b01ca7f89c761ede50557c4ac3db9bebffb (patch) | |
tree | d940fc72d405dab53a8cc0211520f35485b99576 /sim/m32r/sem-switch.c | |
parent | 93f34464a36ecdbd03ac639b9053638198e86b32 (diff) | |
download | binutils-gdb-02310b01ca7f89c761ede50557c4ac3db9bebffb.tar.gz |
* sim-main.h: #include symcat.h.
* m32r-sim.h (BRANCH_NEW_PC): Delete current_cpu arg.
(NEW_PC_{BASE,SKIP,2,4,BRANCH_P}): New macros.
* cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
* sem.c,sem-switch.c: Regenerate.
* m32r-sim.h (SEM_NEXT_PC): Modify to handle parallel exec.
* mloopx.in: Rewrite.
* cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
Diffstat (limited to 'sim/m32r/sem-switch.c')
-rw-r--r-- | sim/m32r/sem-switch.c | 252 |
1 files changed, 128 insertions, 124 deletions
diff --git a/sim/m32r/sem-switch.c b/sim/m32r/sem-switch.c index 1b338f94a1c..d0ec7db466a 100644 --- a/sim/m32r/sem-switch.c +++ b/sim/m32r/sem-switch.c @@ -176,7 +176,7 @@ with this program; if not, write to the Free Software Foundation, Inc., CASE (sem, INSN_ADD) : /* add $dr,$sr */ { #define FLD(f) abuf->fields.fmt_0_add.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = ADDSI (* FLD (f_r1), * FLD (f_r2)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -188,7 +188,7 @@ with this program; if not, write to the Free Software Foundation, Inc., CASE (sem, INSN_ADD3) : /* add3 $dr,$sr,#$slo16 */ { #define FLD(f) abuf->fields.fmt_1_add3.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = ADDSI (* FLD (f_r2), FLD (f_simm16)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -200,7 +200,7 @@ with this program; if not, write to the Free Software Foundation, Inc., CASE (sem, INSN_AND) : /* and $dr,$sr */ { #define FLD(f) abuf->fields.fmt_0_add.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = ANDSI (* FLD (f_r1), * FLD (f_r2)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -212,7 +212,7 @@ with this program; if not, write to the Free Software Foundation, Inc., CASE (sem, INSN_AND3) : /* and3 $dr,$sr,#$uimm16 */ { #define FLD(f) abuf->fields.fmt_2_and3.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = ANDSI (* FLD (f_r2), FLD (f_uimm16)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -224,7 +224,7 @@ with this program; if not, write to the Free Software Foundation, Inc., CASE (sem, INSN_OR) : /* or $dr,$sr */ { #define FLD(f) abuf->fields.fmt_0_add.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = ORSI (* FLD (f_r1), * FLD (f_r2)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -236,7 +236,7 @@ with this program; if not, write to the Free Software Foundation, Inc., CASE (sem, INSN_OR3) : /* or3 $dr,$sr,#$ulo16 */ { #define FLD(f) abuf->fields.fmt_3_or3.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = ORSI (* FLD (f_r2), FLD (f_uimm16)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -248,7 +248,7 @@ with this program; if not, write to the Free Software Foundation, Inc., CASE (sem, INSN_XOR) : /* xor $dr,$sr */ { #define FLD(f) abuf->fields.fmt_0_add.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = XORSI (* FLD (f_r1), * FLD (f_r2)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -260,7 +260,7 @@ with this program; if not, write to the Free Software Foundation, Inc., CASE (sem, INSN_XOR3) : /* xor3 $dr,$sr,#$uimm16 */ { #define FLD(f) abuf->fields.fmt_2_and3.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = XORSI (* FLD (f_r2), FLD (f_uimm16)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -272,7 +272,7 @@ with this program; if not, write to the Free Software Foundation, Inc., CASE (sem, INSN_ADDI) : /* addi $dr,#$simm8 */ { #define FLD(f) abuf->fields.fmt_4_addi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = ADDSI (* FLD (f_r1), FLD (f_simm8)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -284,7 +284,7 @@ with this program; if not, write to the Free Software Foundation, Inc., CASE (sem, INSN_ADDV) : /* addv $dr,$sr */ { #define FLD(f) abuf->fields.fmt_5_addv.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { BI temp1;SI temp0; @@ -303,7 +303,7 @@ do { CASE (sem, INSN_ADDV3) : /* addv3 $dr,$sr,#$simm16 */ { #define FLD(f) abuf->fields.fmt_6_addv3.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); do { BI temp1;SI temp0; @@ -322,7 +322,7 @@ do { CASE (sem, INSN_ADDX) : /* addx $dr,$sr */ { #define FLD(f) abuf->fields.fmt_7_addx.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { BI temp1;SI temp0; @@ -341,10 +341,10 @@ do { CASE (sem, INSN_BC8) : /* bc $disp8 */ { #define FLD(f) abuf->fields.fmt_8_bc8.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); if (CPU (h_cond)) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -355,10 +355,10 @@ if (CPU (h_cond)) { CASE (sem, INSN_BC24) : /* bc $disp24 */ { #define FLD(f) abuf->fields.fmt_9_bc24.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (CPU (h_cond)) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -369,10 +369,10 @@ if (CPU (h_cond)) { CASE (sem, INSN_BEQ) : /* beq $src1,$src2,$disp16 */ { #define FLD(f) abuf->fields.fmt_10_beq.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (EQSI (* FLD (f_r1), * FLD (f_r2))) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -383,10 +383,10 @@ if (EQSI (* FLD (f_r1), * FLD (f_r2))) { CASE (sem, INSN_BEQZ) : /* beqz $src2,$disp16 */ { #define FLD(f) abuf->fields.fmt_11_beqz.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (EQSI (* FLD (f_r2), 0)) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -397,10 +397,10 @@ if (EQSI (* FLD (f_r2), 0)) { CASE (sem, INSN_BGEZ) : /* bgez $src2,$disp16 */ { #define FLD(f) abuf->fields.fmt_11_beqz.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (GESI (* FLD (f_r2), 0)) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -411,10 +411,10 @@ if (GESI (* FLD (f_r2), 0)) { CASE (sem, INSN_BGTZ) : /* bgtz $src2,$disp16 */ { #define FLD(f) abuf->fields.fmt_11_beqz.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (GTSI (* FLD (f_r2), 0)) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -425,10 +425,10 @@ if (GTSI (* FLD (f_r2), 0)) { CASE (sem, INSN_BLEZ) : /* blez $src2,$disp16 */ { #define FLD(f) abuf->fields.fmt_11_beqz.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (LESI (* FLD (f_r2), 0)) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -439,10 +439,10 @@ if (LESI (* FLD (f_r2), 0)) { CASE (sem, INSN_BLTZ) : /* bltz $src2,$disp16 */ { #define FLD(f) abuf->fields.fmt_11_beqz.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (LTSI (* FLD (f_r2), 0)) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -453,10 +453,10 @@ if (LTSI (* FLD (f_r2), 0)) { CASE (sem, INSN_BNEZ) : /* bnez $src2,$disp16 */ { #define FLD(f) abuf->fields.fmt_11_beqz.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (NESI (* FLD (f_r2), 0)) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -467,12 +467,12 @@ if (NESI (* FLD (f_r2), 0)) { CASE (sem, INSN_BL8) : /* bl $disp8 */ { #define FLD(f) abuf->fields.fmt_12_bl8.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { CPU (h_gr[14]) = ADDSI (ANDSI (CPU (h_pc), -4), 4); TRACE_RESULT (current_cpu, "h-gr-14", 'x', CPU (h_gr[14])); - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } while (0); @@ -483,12 +483,12 @@ do { CASE (sem, INSN_BL24) : /* bl $disp24 */ { #define FLD(f) abuf->fields.fmt_13_bl24.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); do { CPU (h_gr[14]) = ADDSI (CPU (h_pc), 4); TRACE_RESULT (current_cpu, "h-gr-14", 'x', CPU (h_gr[14])); - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } while (0); @@ -499,10 +499,10 @@ do { CASE (sem, INSN_BNC8) : /* bnc $disp8 */ { #define FLD(f) abuf->fields.fmt_8_bc8.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); if (NOTBI (CPU (h_cond))) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -513,10 +513,10 @@ if (NOTBI (CPU (h_cond))) { CASE (sem, INSN_BNC24) : /* bnc $disp24 */ { #define FLD(f) abuf->fields.fmt_9_bc24.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (NOTBI (CPU (h_cond))) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -527,10 +527,10 @@ if (NOTBI (CPU (h_cond))) { CASE (sem, INSN_BNE) : /* bne $src1,$src2,$disp16 */ { #define FLD(f) abuf->fields.fmt_10_beq.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (NESI (* FLD (f_r1), * FLD (f_r2))) { - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } @@ -541,9 +541,9 @@ if (NESI (* FLD (f_r1), * FLD (f_r2))) { CASE (sem, INSN_BRA8) : /* bra $disp8 */ { #define FLD(f) abuf->fields.fmt_14_bra8.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); #undef FLD @@ -553,9 +553,9 @@ if (NESI (* FLD (f_r1), * FLD (f_r2))) { CASE (sem, INSN_BRA24) : /* bra $disp24 */ { #define FLD(f) abuf->fields.fmt_15_bra24.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); #undef FLD @@ -565,7 +565,7 @@ if (NESI (* FLD (f_r1), * FLD (f_r2))) { CASE (sem, INSN_CMP) : /* cmp $src1,$src2 */ { #define FLD(f) abuf->fields.fmt_16_cmp.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_cond) = LTSI (* FLD (f_r1), * FLD (f_r2)); TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond)); @@ -577,7 +577,7 @@ if (NESI (* FLD (f_r1), * FLD (f_r2))) { CASE (sem, INSN_CMPI) : /* cmpi $src2,#$simm16 */ { #define FLD(f) abuf->fields.fmt_17_cmpi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); CPU (h_cond) = LTSI (* FLD (f_r2), FLD (f_simm16)); TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond)); @@ -589,7 +589,7 @@ if (NESI (* FLD (f_r1), * FLD (f_r2))) { CASE (sem, INSN_CMPU) : /* cmpu $src1,$src2 */ { #define FLD(f) abuf->fields.fmt_16_cmp.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_cond) = LTUSI (* FLD (f_r1), * FLD (f_r2)); TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond)); @@ -601,7 +601,7 @@ if (NESI (* FLD (f_r1), * FLD (f_r2))) { CASE (sem, INSN_CMPUI) : /* cmpui $src2,#$uimm16 */ { #define FLD(f) abuf->fields.fmt_18_cmpui.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); CPU (h_cond) = LTUSI (* FLD (f_r2), FLD (f_uimm16)); TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond)); @@ -613,7 +613,7 @@ if (NESI (* FLD (f_r1), * FLD (f_r2))) { CASE (sem, INSN_DIV) : /* div $dr,$sr */ { #define FLD(f) abuf->fields.fmt_19_div.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (NESI (* FLD (f_r2), 0)) { * FLD (f_r1) = DIVSI (* FLD (f_r1), * FLD (f_r2)); @@ -627,7 +627,7 @@ if (NESI (* FLD (f_r2), 0)) { CASE (sem, INSN_DIVU) : /* divu $dr,$sr */ { #define FLD(f) abuf->fields.fmt_19_div.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (NESI (* FLD (f_r2), 0)) { * FLD (f_r1) = UDIVSI (* FLD (f_r1), * FLD (f_r2)); @@ -641,7 +641,7 @@ if (NESI (* FLD (f_r2), 0)) { CASE (sem, INSN_REM) : /* rem $dr,$sr */ { #define FLD(f) abuf->fields.fmt_19_div.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (NESI (* FLD (f_r2), 0)) { * FLD (f_r1) = MODSI (* FLD (f_r1), * FLD (f_r2)); @@ -655,7 +655,7 @@ if (NESI (* FLD (f_r2), 0)) { CASE (sem, INSN_REMU) : /* remu $dr,$sr */ { #define FLD(f) abuf->fields.fmt_19_div.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); if (NESI (* FLD (f_r2), 0)) { * FLD (f_r1) = UMODSI (* FLD (f_r1), * FLD (f_r2)); @@ -669,7 +669,7 @@ if (NESI (* FLD (f_r2), 0)) { CASE (sem, INSN_JL) : /* jl $sr */ { #define FLD(f) abuf->fields.fmt_20_jl.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { SI temp1;SI temp0; @@ -677,7 +677,7 @@ do { temp1 = * FLD (f_r2); CPU (h_gr[14]) = temp0; TRACE_RESULT (current_cpu, "h-gr-14", 'x', CPU (h_gr[14])); - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, temp1)); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, temp1)); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } while (0); @@ -688,9 +688,9 @@ do { CASE (sem, INSN_JMP) : /* jmp $sr */ { #define FLD(f) abuf->fields.fmt_21_jmp.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, * FLD (f_r2))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, * FLD (f_r2))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); #undef FLD @@ -700,7 +700,7 @@ do { CASE (sem, INSN_LD) : /* ld $dr,@$sr */ { #define FLD(f) abuf->fields.fmt_22_ld.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = GETMEMSI (current_cpu, * FLD (f_r2)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -712,7 +712,7 @@ do { CASE (sem, INSN_LD_D) : /* ld $dr,@($slo16,$sr) */ { #define FLD(f) abuf->fields.fmt_23_ld_d.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = GETMEMSI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16))); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -724,7 +724,7 @@ do { CASE (sem, INSN_LDB) : /* ldb $dr,@$sr */ { #define FLD(f) abuf->fields.fmt_24_ldb.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = EXTQISI (GETMEMQI (current_cpu, * FLD (f_r2))); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -736,7 +736,7 @@ do { CASE (sem, INSN_LDB_D) : /* ldb $dr,@($slo16,$sr) */ { #define FLD(f) abuf->fields.fmt_25_ldb_d.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = EXTQISI (GETMEMQI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)))); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -748,7 +748,7 @@ do { CASE (sem, INSN_LDH) : /* ldh $dr,@$sr */ { #define FLD(f) abuf->fields.fmt_26_ldh.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = EXTHISI (GETMEMHI (current_cpu, * FLD (f_r2))); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -760,7 +760,7 @@ do { CASE (sem, INSN_LDH_D) : /* ldh $dr,@($slo16,$sr) */ { #define FLD(f) abuf->fields.fmt_27_ldh_d.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = EXTHISI (GETMEMHI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)))); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -772,7 +772,7 @@ do { CASE (sem, INSN_LDUB) : /* ldub $dr,@$sr */ { #define FLD(f) abuf->fields.fmt_24_ldb.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = ZEXTQISI (GETMEMQI (current_cpu, * FLD (f_r2))); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -784,7 +784,7 @@ do { CASE (sem, INSN_LDUB_D) : /* ldub $dr,@($slo16,$sr) */ { #define FLD(f) abuf->fields.fmt_25_ldb_d.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = ZEXTQISI (GETMEMQI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)))); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -796,7 +796,7 @@ do { CASE (sem, INSN_LDUH) : /* lduh $dr,@$sr */ { #define FLD(f) abuf->fields.fmt_26_ldh.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = ZEXTHISI (GETMEMHI (current_cpu, * FLD (f_r2))); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -808,7 +808,7 @@ do { CASE (sem, INSN_LDUH_D) : /* lduh $dr,@($slo16,$sr) */ { #define FLD(f) abuf->fields.fmt_27_ldh_d.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = ZEXTHISI (GETMEMHI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)))); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -820,7 +820,7 @@ do { CASE (sem, INSN_LD_PLUS) : /* ld $dr,@$sr+ */ { #define FLD(f) abuf->fields.fmt_28_ld_plus.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { SI temp1;SI temp0; @@ -839,7 +839,7 @@ do { CASE (sem, INSN_LD24) : /* ld24 $dr,#$uimm24 */ { #define FLD(f) abuf->fields.fmt_29_ld24.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = FLD (f_uimm24); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -851,7 +851,7 @@ do { CASE (sem, INSN_LDI8) : /* ldi $dr,#$simm8 */ { #define FLD(f) abuf->fields.fmt_30_ldi8.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = FLD (f_simm8); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -863,7 +863,7 @@ do { CASE (sem, INSN_LDI16) : /* ldi $dr,$slo16 */ { #define FLD(f) abuf->fields.fmt_31_ldi16.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = FLD (f_simm16); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -875,7 +875,7 @@ do { CASE (sem, INSN_LOCK) : /* lock $dr,@$sr */ { #define FLD(f) abuf->fields.fmt_32_lock.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { CPU (h_lock) = 1; @@ -891,7 +891,7 @@ do { CASE (sem, INSN_MACHI) : /* machi $src1,$src2 */ { #define FLD(f) abuf->fields.fmt_33_machi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (ANDSI (* FLD (f_r1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16))))), 8), 8); TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum)); @@ -903,7 +903,7 @@ do { CASE (sem, INSN_MACLO) : /* maclo $src1,$src2 */ { #define FLD(f) abuf->fields.fmt_33_machi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (SLLSI (* FLD (f_r1), 16)), EXTHIDI (TRUNCSIHI (* FLD (f_r2))))), 8), 8); TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum)); @@ -915,7 +915,7 @@ do { CASE (sem, INSN_MACWHI) : /* macwhi $src1,$src2 */ { #define FLD(f) abuf->fields.fmt_33_machi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16))))), 8), 8); TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum)); @@ -927,7 +927,7 @@ do { CASE (sem, INSN_MACWLO) : /* macwlo $src1,$src2 */ { #define FLD(f) abuf->fields.fmt_33_machi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (* FLD (f_r2))))), 8), 8); TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum)); @@ -939,7 +939,7 @@ do { CASE (sem, INSN_MUL) : /* mul $dr,$sr */ { #define FLD(f) abuf->fields.fmt_0_add.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = MULSI (* FLD (f_r1), * FLD (f_r2)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -951,7 +951,7 @@ do { CASE (sem, INSN_MULHI) : /* mulhi $src1,$src2 */ { #define FLD(f) abuf->fields.fmt_34_mulhi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (* FLD (f_r1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16)))), 16), 16); TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum)); @@ -963,7 +963,7 @@ do { CASE (sem, INSN_MULLO) : /* mullo $src1,$src2 */ { #define FLD(f) abuf->fields.fmt_34_mulhi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (* FLD (f_r1), 16)), EXTHIDI (TRUNCSIHI (* FLD (f_r2)))), 16), 16); TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum)); @@ -975,7 +975,7 @@ do { CASE (sem, INSN_MULWHI) : /* mulwhi $src1,$src2 */ { #define FLD(f) abuf->fields.fmt_34_mulhi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16)))), 8), 8); TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum)); @@ -987,7 +987,7 @@ do { CASE (sem, INSN_MULWLO) : /* mulwlo $src1,$src2 */ { #define FLD(f) abuf->fields.fmt_34_mulhi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (* FLD (f_r2)))), 8), 8); TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum)); @@ -999,7 +999,7 @@ do { CASE (sem, INSN_MV) : /* mv $dr,$sr */ { #define FLD(f) abuf->fields.fmt_35_mv.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = * FLD (f_r2); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1011,7 +1011,7 @@ do { CASE (sem, INSN_MVFACHI) : /* mvfachi $dr */ { #define FLD(f) abuf->fields.fmt_36_mvfachi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = TRUNCDISI (SRADI (CPU (h_accum), 32)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1023,7 +1023,7 @@ do { CASE (sem, INSN_MVFACLO) : /* mvfaclo $dr */ { #define FLD(f) abuf->fields.fmt_36_mvfachi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = TRUNCDISI (CPU (h_accum)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1035,7 +1035,7 @@ do { CASE (sem, INSN_MVFACMI) : /* mvfacmi $dr */ { #define FLD(f) abuf->fields.fmt_36_mvfachi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = TRUNCDISI (SRADI (CPU (h_accum), 16)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1047,7 +1047,7 @@ do { CASE (sem, INSN_MVFC) : /* mvfc $dr,$scr */ { #define FLD(f) abuf->fields.fmt_37_mvfc.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = m32r_h_cr_get (current_cpu, FLD (f_r2)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1059,7 +1059,7 @@ do { CASE (sem, INSN_MVTACHI) : /* mvtachi $src1 */ { #define FLD(f) abuf->fields.fmt_38_mvtachi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_accum) = ORDI (ANDDI (CPU (h_accum), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (* FLD (f_r1)), 32)); TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum)); @@ -1071,7 +1071,7 @@ do { CASE (sem, INSN_MVTACLO) : /* mvtaclo $src1 */ { #define FLD(f) abuf->fields.fmt_38_mvtachi.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); CPU (h_accum) = ORDI (ANDDI (CPU (h_accum), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (f_r1))); TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum)); @@ -1083,7 +1083,7 @@ do { CASE (sem, INSN_MVTC) : /* mvtc $sr,$dcr */ { #define FLD(f) abuf->fields.fmt_39_mvtc.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); m32r_h_cr_set (current_cpu, FLD (f_r1), * FLD (f_r2)); TRACE_RESULT (current_cpu, "dcr", 'x', m32r_h_cr_get (current_cpu, FLD (f_r1))); @@ -1095,7 +1095,7 @@ m32r_h_cr_set (current_cpu, FLD (f_r1), * FLD (f_r2)); CASE (sem, INSN_NEG) : /* neg $dr,$sr */ { #define FLD(f) abuf->fields.fmt_35_mv.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = NEGSI (* FLD (f_r2)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1107,7 +1107,7 @@ m32r_h_cr_set (current_cpu, FLD (f_r1), * FLD (f_r2)); CASE (sem, INSN_NOP) : /* nop */ { #define FLD(f) abuf->fields.fmt_40_nop.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); PROFILE_COUNT_FILLNOPS (current_cpu, abuf->addr); @@ -1118,7 +1118,7 @@ PROFILE_COUNT_FILLNOPS (current_cpu, abuf->addr); CASE (sem, INSN_NOT) : /* not $dr,$sr */ { #define FLD(f) abuf->fields.fmt_35_mv.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = INVSI (* FLD (f_r2)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1130,7 +1130,7 @@ PROFILE_COUNT_FILLNOPS (current_cpu, abuf->addr); CASE (sem, INSN_RAC) : /* rac */ { #define FLD(f) abuf->fields.fmt_41_rac.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { DI tmp_tmp1; @@ -1147,7 +1147,7 @@ do { CASE (sem, INSN_RACH) : /* rach */ { #define FLD(f) abuf->fields.fmt_41_rac.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { DI tmp_tmp1; @@ -1173,7 +1173,7 @@ if (ANDIFSI (GEDI (tmp_tmp1, MAKEDI (8388608, 0)), LEDI (tmp_tmp1, MAKEDI (16760 CASE (sem, INSN_RTE) : /* rte */ { #define FLD(f) abuf->fields.fmt_42_rte.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { CPU (h_sm) = CPU (h_bsm); @@ -1182,7 +1182,7 @@ do { TRACE_RESULT (current_cpu, "h-ie-0", 'x', CPU (h_ie)); CPU (h_cond) = CPU (h_bcond); TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond)); - BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, CPU (h_bpc))); + BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, CPU (h_bpc))); TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } while (0); @@ -1193,7 +1193,7 @@ do { CASE (sem, INSN_SETH) : /* seth $dr,#$hi16 */ { #define FLD(f) abuf->fields.fmt_43_seth.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = SLLSI (FLD (f_hi16), 16); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1205,7 +1205,7 @@ do { CASE (sem, INSN_SLL) : /* sll $dr,$sr */ { #define FLD(f) abuf->fields.fmt_0_add.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = SLLSI (* FLD (f_r1), ANDSI (* FLD (f_r2), 31)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1217,7 +1217,7 @@ do { CASE (sem, INSN_SLL3) : /* sll3 $dr,$sr,#$simm16 */ { #define FLD(f) abuf->fields.fmt_44_sll3.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = SLLSI (* FLD (f_r2), ANDSI (FLD (f_simm16), 31)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1229,7 +1229,7 @@ do { CASE (sem, INSN_SLLI) : /* slli $dr,#$uimm5 */ { #define FLD(f) abuf->fields.fmt_45_slli.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = SLLSI (* FLD (f_r1), FLD (f_uimm5)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1241,7 +1241,7 @@ do { CASE (sem, INSN_SRA) : /* sra $dr,$sr */ { #define FLD(f) abuf->fields.fmt_0_add.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = SRASI (* FLD (f_r1), ANDSI (* FLD (f_r2), 31)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1253,7 +1253,7 @@ do { CASE (sem, INSN_SRA3) : /* sra3 $dr,$sr,#$simm16 */ { #define FLD(f) abuf->fields.fmt_44_sll3.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = SRASI (* FLD (f_r2), ANDSI (FLD (f_simm16), 31)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1265,7 +1265,7 @@ do { CASE (sem, INSN_SRAI) : /* srai $dr,#$uimm5 */ { #define FLD(f) abuf->fields.fmt_45_slli.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = SRASI (* FLD (f_r1), FLD (f_uimm5)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1277,7 +1277,7 @@ do { CASE (sem, INSN_SRL) : /* srl $dr,$sr */ { #define FLD(f) abuf->fields.fmt_0_add.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = SRLSI (* FLD (f_r1), ANDSI (* FLD (f_r2), 31)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1289,7 +1289,7 @@ do { CASE (sem, INSN_SRL3) : /* srl3 $dr,$sr,#$simm16 */ { #define FLD(f) abuf->fields.fmt_44_sll3.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); * FLD (f_r1) = SRLSI (* FLD (f_r2), ANDSI (FLD (f_simm16), 31)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1301,7 +1301,7 @@ do { CASE (sem, INSN_SRLI) : /* srli $dr,#$uimm5 */ { #define FLD(f) abuf->fields.fmt_45_slli.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = SRLSI (* FLD (f_r1), FLD (f_uimm5)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1313,7 +1313,7 @@ do { CASE (sem, INSN_ST) : /* st $src1,@$src2 */ { #define FLD(f) abuf->fields.fmt_46_st.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); TRACE_RESULT (current_cpu, "h-memory-src2", 'x', GETMEMSI (current_cpu, * FLD (f_r2))); @@ -1325,7 +1325,7 @@ SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); CASE (sem, INSN_ST_D) : /* st $src1,@($slo16,$src2) */ { #define FLD(f) abuf->fields.fmt_47_st_d.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); SETMEMSI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1)); TRACE_RESULT (current_cpu, "h-memory-add-WI-src2-slo16", 'x', GETMEMSI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)))); @@ -1337,7 +1337,7 @@ SETMEMSI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1)); CASE (sem, INSN_STB) : /* stb $src1,@$src2 */ { #define FLD(f) abuf->fields.fmt_48_stb.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); SETMEMQI (current_cpu, * FLD (f_r2), * FLD (f_r1)); TRACE_RESULT (current_cpu, "h-memory-src2", 'x', GETMEMQI (current_cpu, * FLD (f_r2))); @@ -1349,7 +1349,7 @@ SETMEMQI (current_cpu, * FLD (f_r2), * FLD (f_r1)); CASE (sem, INSN_STB_D) : /* stb $src1,@($slo16,$src2) */ { #define FLD(f) abuf->fields.fmt_49_stb_d.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); SETMEMQI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1)); TRACE_RESULT (current_cpu, "h-memory-add-WI-src2-slo16", 'x', GETMEMQI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)))); @@ -1361,7 +1361,7 @@ SETMEMQI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1)); CASE (sem, INSN_STH) : /* sth $src1,@$src2 */ { #define FLD(f) abuf->fields.fmt_50_sth.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); SETMEMHI (current_cpu, * FLD (f_r2), * FLD (f_r1)); TRACE_RESULT (current_cpu, "h-memory-src2", 'x', GETMEMHI (current_cpu, * FLD (f_r2))); @@ -1373,7 +1373,7 @@ SETMEMHI (current_cpu, * FLD (f_r2), * FLD (f_r1)); CASE (sem, INSN_STH_D) : /* sth $src1,@($slo16,$src2) */ { #define FLD(f) abuf->fields.fmt_51_sth_d.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 4); SETMEMHI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1)); TRACE_RESULT (current_cpu, "h-memory-add-WI-src2-slo16", 'x', GETMEMHI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)))); @@ -1385,13 +1385,15 @@ SETMEMHI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1)); CASE (sem, INSN_ST_PLUS) : /* st $src1,@+$src2 */ { #define FLD(f) abuf->fields.fmt_52_st_plus.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { -* FLD (f_r2) = ADDSI (* FLD (f_r2), 4); + SI tmp_new_src2; + tmp_new_src2 = ADDSI (* FLD (f_r2), 4); +SETMEMSI (current_cpu, tmp_new_src2, * FLD (f_r1)); + TRACE_RESULT (current_cpu, "h-memory-new-src2", 'x', GETMEMSI (current_cpu, tmp_new_src2)); +* FLD (f_r2) = tmp_new_src2; TRACE_RESULT (current_cpu, "src2", 'x', * FLD (f_r2)); -SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); - TRACE_RESULT (current_cpu, "h-memory-src2", 'x', GETMEMSI (current_cpu, * FLD (f_r2))); } while (0); #undef FLD @@ -1401,13 +1403,15 @@ SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); CASE (sem, INSN_ST_MINUS) : /* st $src1,@-$src2 */ { #define FLD(f) abuf->fields.fmt_52_st_plus.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { -* FLD (f_r2) = SUBSI (* FLD (f_r2), 4); + SI tmp_new_src2; + tmp_new_src2 = SUBSI (* FLD (f_r2), 4); +SETMEMSI (current_cpu, tmp_new_src2, * FLD (f_r1)); + TRACE_RESULT (current_cpu, "h-memory-new-src2", 'x', GETMEMSI (current_cpu, tmp_new_src2)); +* FLD (f_r2) = tmp_new_src2; TRACE_RESULT (current_cpu, "src2", 'x', * FLD (f_r2)); -SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); - TRACE_RESULT (current_cpu, "h-memory-src2", 'x', GETMEMSI (current_cpu, * FLD (f_r2))); } while (0); #undef FLD @@ -1417,7 +1421,7 @@ SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); CASE (sem, INSN_SUB) : /* sub $dr,$sr */ { #define FLD(f) abuf->fields.fmt_0_add.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); * FLD (f_r1) = SUBSI (* FLD (f_r1), * FLD (f_r2)); TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); @@ -1429,7 +1433,7 @@ SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); CASE (sem, INSN_SUBV) : /* subv $dr,$sr */ { #define FLD(f) abuf->fields.fmt_5_addv.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { BI temp1;SI temp0; @@ -1448,7 +1452,7 @@ do { CASE (sem, INSN_SUBX) : /* subx $dr,$sr */ { #define FLD(f) abuf->fields.fmt_7_addx.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { BI temp1;SI temp0; @@ -1467,7 +1471,7 @@ do { CASE (sem, INSN_TRAP) : /* trap #$uimm4 */ { #define FLD(f) abuf->fields.fmt_53_trap.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { m32r_h_cr_set (current_cpu, 6, ADDSI (CPU (h_pc), 4)); @@ -1485,7 +1489,7 @@ do_trap (current_cpu, FLD (f_uimm4)); CASE (sem, INSN_UNLOCK) : /* unlock $src1,@$src2 */ { #define FLD(f) abuf->fields.fmt_54_unlock.f - new_pc = SEM_NEXT_PC (sem_arg); + new_pc = SEM_NEXT_PC (sem_arg, 2); do { if (CPU (h_lock)) { |