diff options
author | Doug Evans <dje@google.com> | 1998-02-20 00:45:47 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1998-02-20 00:45:47 +0000 |
commit | cab581557e08db9079cff43cda6f312ea404fc0c (patch) | |
tree | ebe678cf7a0db147378806e36284602de85229b6 /sim/m32r/sem.c | |
parent | a94cefa164a3f0984fd9991e94e0815bfb954eb9 (diff) | |
download | gdb-cab581557e08db9079cff43cda6f312ea404fc0c.zip gdb-cab581557e08db9079cff43cda6f312ea404fc0c.tar.gz gdb-cab581557e08db9079cff43cda6f312ea404fc0c.tar.bz2 |
* m32r.c (do_lock,do_unlock): Delete.
* cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
* sem.c,sem-switch.c: Regenerate.
* cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
Diffstat (limited to 'sim/m32r/sem.c')
-rw-r--r-- | sim/m32r/sem.c | 241 |
1 files changed, 127 insertions, 114 deletions
diff --git a/sim/m32r/sem.c b/sim/m32r/sem.c index 7ba6f3c..8c83912 100644 --- a/sim/m32r/sem.c +++ b/sim/m32r/sem.c @@ -255,7 +255,7 @@ SEM_FN_NAME (m32r,addi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,addv) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_0_add.f +#define FLD(f) abuf->fields.fmt_5_addv.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -286,7 +286,7 @@ do { CIA SEM_FN_NAME (m32r,addv3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_5_addv3.f +#define FLD(f) abuf->fields.fmt_6_addv3.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -317,7 +317,7 @@ do { CIA SEM_FN_NAME (m32r,addx) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_6_addx.f +#define FLD(f) abuf->fields.fmt_7_addx.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -348,7 +348,7 @@ do { CIA SEM_FN_NAME (m32r,bc8) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_7_bc8.f +#define FLD(f) abuf->fields.fmt_8_bc8.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -356,6 +356,7 @@ SEM_FN_NAME (m32r,bc8) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (CPU (h_cond)) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -373,7 +374,7 @@ if (CPU (h_cond)) { CIA SEM_FN_NAME (m32r,bc24) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_8_bc24.f +#define FLD(f) abuf->fields.fmt_9_bc24.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -381,6 +382,7 @@ SEM_FN_NAME (m32r,bc24) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (CPU (h_cond)) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -398,7 +400,7 @@ if (CPU (h_cond)) { CIA SEM_FN_NAME (m32r,beq) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_9_beq.f +#define FLD(f) abuf->fields.fmt_10_beq.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -406,6 +408,7 @@ SEM_FN_NAME (m32r,beq) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (EQSI (* FLD (f_r1), * FLD (f_r2))) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -424,7 +427,7 @@ if (EQSI (* FLD (f_r1), * FLD (f_r2))) { CIA SEM_FN_NAME (m32r,beqz) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_10_beqz.f +#define FLD(f) abuf->fields.fmt_11_beqz.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -432,6 +435,7 @@ SEM_FN_NAME (m32r,beqz) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (EQSI (* FLD (f_r2), 0)) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -450,7 +454,7 @@ if (EQSI (* FLD (f_r2), 0)) { CIA SEM_FN_NAME (m32r,bgez) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_10_beqz.f +#define FLD(f) abuf->fields.fmt_11_beqz.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -458,6 +462,7 @@ SEM_FN_NAME (m32r,bgez) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (GESI (* FLD (f_r2), 0)) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -476,7 +481,7 @@ if (GESI (* FLD (f_r2), 0)) { CIA SEM_FN_NAME (m32r,bgtz) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_10_beqz.f +#define FLD(f) abuf->fields.fmt_11_beqz.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -484,6 +489,7 @@ SEM_FN_NAME (m32r,bgtz) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (GTSI (* FLD (f_r2), 0)) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -502,7 +508,7 @@ if (GTSI (* FLD (f_r2), 0)) { CIA SEM_FN_NAME (m32r,blez) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_10_beqz.f +#define FLD(f) abuf->fields.fmt_11_beqz.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -510,6 +516,7 @@ SEM_FN_NAME (m32r,blez) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (LESI (* FLD (f_r2), 0)) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -528,7 +535,7 @@ if (LESI (* FLD (f_r2), 0)) { CIA SEM_FN_NAME (m32r,bltz) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_10_beqz.f +#define FLD(f) abuf->fields.fmt_11_beqz.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -536,6 +543,7 @@ SEM_FN_NAME (m32r,bltz) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (LTSI (* FLD (f_r2), 0)) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -554,7 +562,7 @@ if (LTSI (* FLD (f_r2), 0)) { CIA SEM_FN_NAME (m32r,bnez) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_10_beqz.f +#define FLD(f) abuf->fields.fmt_11_beqz.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -562,6 +570,7 @@ SEM_FN_NAME (m32r,bnez) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (NESI (* FLD (f_r2), 0)) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -580,7 +589,7 @@ if (NESI (* FLD (f_r2), 0)) { CIA SEM_FN_NAME (m32r,bl8) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_11_bl8.f +#define FLD(f) abuf->fields.fmt_12_bl8.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -590,6 +599,7 @@ do { 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))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } while (0); #if WITH_PROFILE_MODEL_P @@ -608,7 +618,7 @@ do { CIA SEM_FN_NAME (m32r,bl24) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_12_bl24.f +#define FLD(f) abuf->fields.fmt_13_bl24.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -618,6 +628,7 @@ do { 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))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } while (0); #if WITH_PROFILE_MODEL_P @@ -636,7 +647,7 @@ do { CIA SEM_FN_NAME (m32r,bnc8) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_7_bc8.f +#define FLD(f) abuf->fields.fmt_8_bc8.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -644,6 +655,7 @@ SEM_FN_NAME (m32r,bnc8) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (NOTBI (CPU (h_cond))) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -661,7 +673,7 @@ if (NOTBI (CPU (h_cond))) { CIA SEM_FN_NAME (m32r,bnc24) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_8_bc24.f +#define FLD(f) abuf->fields.fmt_9_bc24.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -669,6 +681,7 @@ SEM_FN_NAME (m32r,bnc24) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (NOTBI (CPU (h_cond))) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -686,7 +699,7 @@ if (NOTBI (CPU (h_cond))) { CIA SEM_FN_NAME (m32r,bne) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_9_beq.f +#define FLD(f) abuf->fields.fmt_10_beq.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -694,6 +707,7 @@ SEM_FN_NAME (m32r,bne) (SIM_CPU *current_cpu, SEM_ARG sem_arg) if (NESI (* FLD (f_r1), * FLD (f_r2))) { BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp16))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } #if WITH_PROFILE_MODEL_P @@ -712,13 +726,14 @@ if (NESI (* FLD (f_r1), * FLD (f_r2))) { CIA SEM_FN_NAME (m32r,bra8) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_13_bra8.f +#define FLD(f) abuf->fields.fmt_14_bra8.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); #if WITH_PROFILE_MODEL_P if (PROFILE_MODEL_P (current_cpu)) @@ -735,13 +750,14 @@ SEM_FN_NAME (m32r,bra8) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,bra24) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_14_bra24.f +#define FLD(f) abuf->fields.fmt_15_bra24.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); #if WITH_PROFILE_MODEL_P if (PROFILE_MODEL_P (current_cpu)) @@ -758,7 +774,7 @@ SEM_FN_NAME (m32r,bra24) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,cmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_16_cmp.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -781,7 +797,7 @@ SEM_FN_NAME (m32r,cmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,cmpi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_16_cmpi.f +#define FLD(f) abuf->fields.fmt_17_cmpi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -804,7 +820,7 @@ SEM_FN_NAME (m32r,cmpi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,cmpu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_16_cmp.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -827,7 +843,7 @@ SEM_FN_NAME (m32r,cmpu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,cmpui) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_17_cmpui.f +#define FLD(f) abuf->fields.fmt_18_cmpui.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -850,7 +866,7 @@ SEM_FN_NAME (m32r,cmpui) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,div) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_18_div.f +#define FLD(f) abuf->fields.fmt_19_div.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -876,7 +892,7 @@ if (NESI (* FLD (f_r2), 0)) { CIA SEM_FN_NAME (m32r,divu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_18_div.f +#define FLD(f) abuf->fields.fmt_19_div.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -902,7 +918,7 @@ if (NESI (* FLD (f_r2), 0)) { CIA SEM_FN_NAME (m32r,rem) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_18_div.f +#define FLD(f) abuf->fields.fmt_19_div.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -928,7 +944,7 @@ if (NESI (* FLD (f_r2), 0)) { CIA SEM_FN_NAME (m32r,remu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_18_div.f +#define FLD(f) abuf->fields.fmt_19_div.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -950,37 +966,11 @@ if (NESI (* FLD (f_r2), 0)) { #undef FLD } -/* Perform divh: divh $dr,$sr. */ -CIA -SEM_FN_NAME (m32r,divh) (SIM_CPU *current_cpu, SEM_ARG sem_arg) -{ -#define FLD(f) abuf->fields.fmt_18_div.f - ARGBUF *abuf = SEM_ARGBUF (sem_arg); - CIA new_pc = SEM_NEXT_PC (sem_arg); - -if (NESI (* FLD (f_r2), 0)) { -* FLD (f_r1) = DIVSI (EXTHISI (TRUNCSIHI (* FLD (f_r1))), * FLD (f_r2)); - TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); -} - -#if WITH_PROFILE_MODEL_P - if (PROFILE_MODEL_P (current_cpu)) - { - m32r_model_mark_get_h_gr (current_cpu, abuf); - m32r_model_mark_set_h_gr (current_cpu, abuf); - m32r_model_profile_insn (current_cpu, abuf); - } -#endif - - return new_pc; -#undef FLD -} - /* Perform jl: jl $sr. */ CIA SEM_FN_NAME (m32r,jl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_19_jl.f +#define FLD(f) abuf->fields.fmt_20_jl.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -993,6 +983,7 @@ do { 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)); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); } while (0); #if WITH_PROFILE_MODEL_P @@ -1012,13 +1003,14 @@ do { CIA SEM_FN_NAME (m32r,jmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_20_jmp.f +#define FLD(f) abuf->fields.fmt_21_jmp.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; BRANCH_NEW_PC (current_cpu, new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, * FLD (f_r2))); taken_p = 1; + TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc)); #if WITH_PROFILE_MODEL_P if (PROFILE_MODEL_P (current_cpu)) @@ -1036,7 +1028,7 @@ SEM_FN_NAME (m32r,jmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,ld) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_21_ld.f +#define FLD(f) abuf->fields.fmt_22_ld.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1060,7 +1052,7 @@ SEM_FN_NAME (m32r,ld) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,ld_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_22_ld_d.f +#define FLD(f) abuf->fields.fmt_23_ld_d.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1084,7 +1076,7 @@ SEM_FN_NAME (m32r,ld_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,ldb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_23_ldb.f +#define FLD(f) abuf->fields.fmt_24_ldb.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1108,7 +1100,7 @@ SEM_FN_NAME (m32r,ldb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,ldb_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_24_ldb_d.f +#define FLD(f) abuf->fields.fmt_25_ldb_d.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1132,7 +1124,7 @@ SEM_FN_NAME (m32r,ldb_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,ldh) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_25_ldh.f +#define FLD(f) abuf->fields.fmt_26_ldh.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1156,7 +1148,7 @@ SEM_FN_NAME (m32r,ldh) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,ldh_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_26_ldh_d.f +#define FLD(f) abuf->fields.fmt_27_ldh_d.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1180,7 +1172,7 @@ SEM_FN_NAME (m32r,ldh_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,ldub) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_23_ldb.f +#define FLD(f) abuf->fields.fmt_24_ldb.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1204,7 +1196,7 @@ SEM_FN_NAME (m32r,ldub) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,ldub_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_24_ldb_d.f +#define FLD(f) abuf->fields.fmt_25_ldb_d.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1228,7 +1220,7 @@ SEM_FN_NAME (m32r,ldub_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,lduh) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_25_ldh.f +#define FLD(f) abuf->fields.fmt_26_ldh.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1252,7 +1244,7 @@ SEM_FN_NAME (m32r,lduh) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,lduh_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_26_ldh_d.f +#define FLD(f) abuf->fields.fmt_27_ldh_d.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1276,7 +1268,7 @@ SEM_FN_NAME (m32r,lduh_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,ld_plus) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_21_ld.f +#define FLD(f) abuf->fields.fmt_28_ld_plus.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1307,7 +1299,7 @@ do { CIA SEM_FN_NAME (m32r,ld24) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_27_ld24.f +#define FLD(f) abuf->fields.fmt_29_ld24.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1330,7 +1322,7 @@ SEM_FN_NAME (m32r,ld24) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,ldi8) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_28_ldi8.f +#define FLD(f) abuf->fields.fmt_30_ldi8.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1353,7 +1345,7 @@ SEM_FN_NAME (m32r,ldi8) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,ldi16) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_29_ldi16.f +#define FLD(f) abuf->fields.fmt_31_ldi16.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1376,11 +1368,16 @@ SEM_FN_NAME (m32r,ldi16) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,lock) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_0_add.f +#define FLD(f) abuf->fields.fmt_32_lock.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); -do_lock (current_cpu, * FLD (f_r1), * FLD (f_r2)); +do { + CPU (h_lock) = 1; + TRACE_RESULT (current_cpu, "h-lock-0", 'x', CPU (h_lock)); +* FLD (f_r1) = GETMEMSI (current_cpu, * FLD (f_r2)); + TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1)); +} while (0); #if WITH_PROFILE_MODEL_P if (PROFILE_MODEL_P (current_cpu)) @@ -1399,7 +1396,7 @@ do_lock (current_cpu, * FLD (f_r1), * FLD (f_r2)); CIA SEM_FN_NAME (m32r,machi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_30_machi.f +#define FLD(f) abuf->fields.fmt_33_machi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1422,7 +1419,7 @@ SEM_FN_NAME (m32r,machi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,maclo) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_30_machi.f +#define FLD(f) abuf->fields.fmt_33_machi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1445,7 +1442,7 @@ SEM_FN_NAME (m32r,maclo) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,macwhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_30_machi.f +#define FLD(f) abuf->fields.fmt_33_machi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1468,7 +1465,7 @@ SEM_FN_NAME (m32r,macwhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,macwlo) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_30_machi.f +#define FLD(f) abuf->fields.fmt_33_machi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1515,7 +1512,7 @@ SEM_FN_NAME (m32r,mul) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mulhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_34_mulhi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1538,7 +1535,7 @@ SEM_FN_NAME (m32r,mulhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mullo) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_34_mulhi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1561,7 +1558,7 @@ SEM_FN_NAME (m32r,mullo) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mulwhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_34_mulhi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1584,7 +1581,7 @@ SEM_FN_NAME (m32r,mulwhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mulwlo) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_34_mulhi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1607,7 +1604,7 @@ SEM_FN_NAME (m32r,mulwlo) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mv) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_31_mv.f +#define FLD(f) abuf->fields.fmt_35_mv.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1631,7 +1628,7 @@ SEM_FN_NAME (m32r,mv) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mvfachi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_32_mvfachi.f +#define FLD(f) abuf->fields.fmt_36_mvfachi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1654,7 +1651,7 @@ SEM_FN_NAME (m32r,mvfachi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mvfaclo) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_32_mvfachi.f +#define FLD(f) abuf->fields.fmt_36_mvfachi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1677,7 +1674,7 @@ SEM_FN_NAME (m32r,mvfaclo) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mvfacmi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_32_mvfachi.f +#define FLD(f) abuf->fields.fmt_36_mvfachi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1700,7 +1697,7 @@ SEM_FN_NAME (m32r,mvfacmi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mvfc) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_33_mvfc.f +#define FLD(f) abuf->fields.fmt_37_mvfc.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1723,7 +1720,7 @@ SEM_FN_NAME (m32r,mvfc) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mvtachi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_34_mvtachi.f +#define FLD(f) abuf->fields.fmt_38_mvtachi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1746,11 +1743,11 @@ SEM_FN_NAME (m32r,mvtachi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mvtaclo) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_34_mvtachi.f +#define FLD(f) abuf->fields.fmt_38_mvtachi.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); - CPU (h_accum) = ORDI (ANDDI (CPU (h_accum), MAKEDI (0xffffffff, 0)), EXTSIDI (* FLD (f_r1))); + CPU (h_accum) = ORDI (ANDDI (CPU (h_accum), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (f_r1))); TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum)); #if WITH_PROFILE_MODEL_P @@ -1769,7 +1766,7 @@ SEM_FN_NAME (m32r,mvtaclo) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,mvtc) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_35_mvtc.f +#define FLD(f) abuf->fields.fmt_39_mvtc.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1792,7 +1789,7 @@ m32r_h_cr_set (current_cpu, FLD (f_r1), * FLD (f_r2)); CIA SEM_FN_NAME (m32r,neg) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_31_mv.f +#define FLD(f) abuf->fields.fmt_35_mv.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1816,7 +1813,7 @@ SEM_FN_NAME (m32r,neg) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,nop) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_36_nop.f +#define FLD(f) abuf->fields.fmt_40_nop.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1837,7 +1834,7 @@ PROFILE_COUNT_FILLNOPS (current_cpu, abuf->addr); CIA SEM_FN_NAME (m32r,not) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_31_mv.f +#define FLD(f) abuf->fields.fmt_35_mv.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1861,7 +1858,7 @@ SEM_FN_NAME (m32r,not) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,rac) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_37_rac.f +#define FLD(f) abuf->fields.fmt_41_rac.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1888,7 +1885,7 @@ do { CIA SEM_FN_NAME (m32r,rach) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_37_rac.f +#define FLD(f) abuf->fields.fmt_41_rac.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -1924,7 +1921,7 @@ if (ANDIFSI (GEDI (tmp_tmp1, MAKEDI (8388608, 0)), LEDI (tmp_tmp1, MAKEDI (16760 CIA SEM_FN_NAME (m32r,rte) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_38_rte.f +#define FLD(f) abuf->fields.fmt_42_rte.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; @@ -1956,7 +1953,7 @@ do { CIA SEM_FN_NAME (m32r,seth) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_39_seth.f +#define FLD(f) abuf->fields.fmt_43_seth.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2003,7 +2000,7 @@ SEM_FN_NAME (m32r,sll) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,sll3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_5_addv3.f +#define FLD(f) abuf->fields.fmt_44_sll3.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2027,7 +2024,7 @@ SEM_FN_NAME (m32r,sll3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,slli) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_40_slli.f +#define FLD(f) abuf->fields.fmt_45_slli.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2075,7 +2072,7 @@ SEM_FN_NAME (m32r,sra) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,sra3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_5_addv3.f +#define FLD(f) abuf->fields.fmt_44_sll3.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2099,7 +2096,7 @@ SEM_FN_NAME (m32r,sra3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,srai) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_40_slli.f +#define FLD(f) abuf->fields.fmt_45_slli.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2147,7 +2144,7 @@ SEM_FN_NAME (m32r,srl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,srl3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_5_addv3.f +#define FLD(f) abuf->fields.fmt_44_sll3.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2171,7 +2168,7 @@ SEM_FN_NAME (m32r,srl3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,srli) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_40_slli.f +#define FLD(f) abuf->fields.fmt_45_slli.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2195,7 +2192,7 @@ SEM_FN_NAME (m32r,srli) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,st) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_46_st.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2218,7 +2215,7 @@ SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); CIA SEM_FN_NAME (m32r,st_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_41_st_d.f +#define FLD(f) abuf->fields.fmt_47_st_d.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2241,7 +2238,7 @@ SETMEMSI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1)); CIA SEM_FN_NAME (m32r,stb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_48_stb.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2264,7 +2261,7 @@ SETMEMQI (current_cpu, * FLD (f_r2), * FLD (f_r1)); CIA SEM_FN_NAME (m32r,stb_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_41_st_d.f +#define FLD(f) abuf->fields.fmt_49_stb_d.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2287,7 +2284,7 @@ SETMEMQI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1)); CIA SEM_FN_NAME (m32r,sth) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_50_sth.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2310,7 +2307,7 @@ SETMEMHI (current_cpu, * FLD (f_r2), * FLD (f_r1)); CIA SEM_FN_NAME (m32r,sth_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_41_st_d.f +#define FLD(f) abuf->fields.fmt_51_sth_d.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2333,7 +2330,7 @@ SETMEMHI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1)); CIA SEM_FN_NAME (m32r,st_plus) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_52_st_plus.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2348,6 +2345,7 @@ SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); if (PROFILE_MODEL_P (current_cpu)) { m32r_model_mark_get_h_gr (current_cpu, abuf); + m32r_model_mark_set_h_gr (current_cpu, abuf); m32r_model_profile_insn (current_cpu, abuf); } #endif @@ -2360,7 +2358,7 @@ SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); CIA SEM_FN_NAME (m32r,st_minus) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_52_st_plus.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2375,6 +2373,7 @@ SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); if (PROFILE_MODEL_P (current_cpu)) { m32r_model_mark_get_h_gr (current_cpu, abuf); + m32r_model_mark_set_h_gr (current_cpu, abuf); m32r_model_profile_insn (current_cpu, abuf); } #endif @@ -2411,7 +2410,7 @@ SEM_FN_NAME (m32r,sub) (SIM_CPU *current_cpu, SEM_ARG sem_arg) CIA SEM_FN_NAME (m32r,subv) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_0_add.f +#define FLD(f) abuf->fields.fmt_5_addv.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2442,7 +2441,7 @@ do { CIA SEM_FN_NAME (m32r,subx) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_6_addx.f +#define FLD(f) abuf->fields.fmt_7_addx.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); @@ -2473,12 +2472,19 @@ do { CIA SEM_FN_NAME (m32r,trap) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_42_trap.f +#define FLD(f) abuf->fields.fmt_53_trap.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); int taken_p = 0; +do { +m32r_h_cr_set (current_cpu, 6, ADDSI (CPU (h_pc), 4)); + TRACE_RESULT (current_cpu, "h-cr-6", 'x', m32r_h_cr_get (current_cpu, 6)); +m32r_h_cr_set (current_cpu, 0, ANDSI (SRLSI (m32r_h_cr_get (current_cpu, 0), 8), 33488896)); + TRACE_RESULT (current_cpu, "h-cr-0", 'x', m32r_h_cr_get (current_cpu, 0)); do_trap (current_cpu, FLD (f_uimm4)); +; /*clobber*/ +} while (0); #if WITH_PROFILE_MODEL_P if (PROFILE_MODEL_P (current_cpu)) @@ -2495,11 +2501,18 @@ do_trap (current_cpu, FLD (f_uimm4)); CIA SEM_FN_NAME (m32r,unlock) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { -#define FLD(f) abuf->fields.fmt_15_cmp.f +#define FLD(f) abuf->fields.fmt_54_unlock.f ARGBUF *abuf = SEM_ARGBUF (sem_arg); CIA new_pc = SEM_NEXT_PC (sem_arg); -do_unlock (current_cpu, * FLD (f_r1), * FLD (f_r2)); +do { +if (CPU (h_lock)) { +SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1)); + TRACE_RESULT (current_cpu, "h-memory-src2", 'x', GETMEMSI (current_cpu, * FLD (f_r2))); +} + CPU (h_lock) = 0; + TRACE_RESULT (current_cpu, "h-lock-0", 'x', CPU (h_lock)); +} while (0); #if WITH_PROFILE_MODEL_P if (PROFILE_MODEL_P (current_cpu)) |