diff options
author | Gavin Romig-Koch <gavin@redhat.com> | 1998-05-13 14:00:56 +0000 |
---|---|---|
committer | Gavin Romig-Koch <gavin@redhat.com> | 1998-05-13 14:00:56 +0000 |
commit | 94dda41a0c12c6d7327c30054809a9e0dd93c66f (patch) | |
tree | 51714906574ca95c0299b0e004a26974467d9006 | |
parent | b3c22f56b8a8649ee80dfa0b55fd215394b7cb8f (diff) | |
download | fsf-binutils-gdb-94dda41a0c12c6d7327c30054809a9e0dd93c66f.zip fsf-binutils-gdb-94dda41a0c12c6d7327c30054809a9e0dd93c66f.tar.gz fsf-binutils-gdb-94dda41a0c12c6d7327c30054809a9e0dd93c66f.tar.bz2 |
* mips/mips.igen (check_op_hilo,check_mult_hilo,check_div_hilo):
Replace check_op_hilo with check_mult_hilo and check_div_hilo.
Add special r3900 version of do_mult_hilo.
(do_dmultx,do_mult,do_multu): Replace calls to check_op_hilo
with calls to check_mult_hilo.
(do_ddiv,do_ddivu,do_div,do_divu): Replace calls to check_op_hilo
with calls to check_div_hilo.
-rw-r--r-- | sim/mips/ChangeLog | 10 | ||||
-rw-r--r-- | sim/mips/mips.igen | 58 |
2 files changed, 59 insertions, 9 deletions
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 6634e7b..452c830 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,13 @@ +Wed May 13 09:59:27 1998 Gavin Koch <gavin@cygnus.com> + + * mips/mips.igen (check_op_hilo,check_mult_hilo,check_div_hilo): + Replace check_op_hilo with check_mult_hilo and check_div_hilo. + Add special r3900 version of do_mult_hilo. + (do_dmultx,do_mult,do_multu): Replace calls to check_op_hilo + with calls to check_mult_hilo. + (do_ddiv,do_ddivu,do_div,do_divu): Replace calls to check_op_hilo + with calls to check_div_hilo. + Tue May 12 15:22:11 1998 Andrew Cagney <cagney@b1.cygnus.com> * configure.in (SUBTARGET_R3900): Define for mipstx39 target. diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen index 4050a2c..303de9d 100644 --- a/sim/mips/mips.igen +++ b/sim/mips/mips.igen @@ -154,7 +154,47 @@ return ok; } -:function:::int:check_op_hilo:hilo_history *hi, hilo_history *lo +:function:::int:check_mult_hilo:hilo_history *hi, hilo_history *lo +*mipsI,mipsII,mipsIII,mipsIV: +*vr5000: +// start-sanitize-vr4320 +*vr4320: +// end-sanitize-vr4320 +// start-sanitize-vr5400 +*vr5400: +// end-sanitize-vr5400 +// start-sanitize-r5900 +*r5900: +// end-sanitize-r5900 +{ + signed64 time = sim_events_time (SD); + int ok = (check_mf_cycles (SD_, hi, time, "OP") + && check_mf_cycles (SD_, lo, time, "OP")); + hi->op.timestamp = time; + lo->op.timestamp = time; + hi->op.cia = CIA; + lo->op.cia = CIA; + return ok; +} + + +// The r3900 mult and multu insns _can_ be exectuted immediatly after +// a mf{hi,lo} +:function:::int:check_mult_hilo:hilo_history *hi, hilo_history *lo +*r3900: +// start-sanitize-tx19 +*tx19: +// end-sanitize-tx19 +{ + signed64 time = sim_events_time (SD); + hi->op.timestamp = time; + lo->op.timestamp = time; + hi->op.cia = CIA; + lo->op.cia = CIA; + return 1; +} + +:function:::int:check_div_hilo:hilo_history *hi, hilo_history *lo *mipsI,mipsII,mipsIII,mipsIV: *vr5000: // start-sanitize-vr4320 @@ -954,7 +994,7 @@ :function:64::void:do_ddiv:int rs, int rt { - check_op_hilo (SD_, HIHISTORY, LOHISTORY); + check_div_hilo (SD_, HIHISTORY, LOHISTORY); TRACE_ALU_INPUT2 (GPR[rs], GPR[rt]); { signed64 n = GPR[rs]; @@ -1003,7 +1043,7 @@ :function:64::void:do_ddivu:int rs, int rt { - check_op_hilo (SD_, HIHISTORY, LOHISTORY); + check_div_hilo (SD_, HIHISTORY, LOHISTORY); TRACE_ALU_INPUT2 (GPR[rs], GPR[rt]); { unsigned64 n = GPR[rs]; @@ -1044,7 +1084,7 @@ :function:::void:do_div:int rs, int rt { - check_op_hilo (SD_, HIHISTORY, LOHISTORY); + check_div_hilo (SD_, HIHISTORY, LOHISTORY); TRACE_ALU_INPUT2 (GPR[rs], GPR[rt]); { signed32 n = GPR[rs]; @@ -1093,7 +1133,7 @@ :function:::void:do_divu:int rs, int rt { - check_op_hilo (SD_, HIHISTORY, LOHISTORY); + check_div_hilo (SD_, HIHISTORY, LOHISTORY); TRACE_ALU_INPUT2 (GPR[rs], GPR[rt]); { unsigned32 n = GPR[rs]; @@ -1147,7 +1187,7 @@ int sign; unsigned64 op1 = GPR[rs]; unsigned64 op2 = GPR[rt]; - check_op_hilo (SD_, HIHISTORY, LOHISTORY); + check_mult_hilo (SD_, HIHISTORY, LOHISTORY); TRACE_ALU_INPUT2 (GPR[rs], GPR[rt]); /* make signed multiply unsigned */ sign = 0; @@ -2272,7 +2312,7 @@ :function:::void:do_mult:int rs, int rt, int rd { signed64 prod; - check_op_hilo (SD_, HIHISTORY, LOHISTORY); + check_mult_hilo (SD_, HIHISTORY, LOHISTORY); TRACE_ALU_INPUT2 (GPR[rs], GPR[rt]); prod = (((signed64)(signed32) GPR[rs]) * ((signed64)(signed32) GPR[rt])); @@ -2315,7 +2355,7 @@ :function:::void:do_multu:int rs, int rt, int rd { unsigned64 prod; - check_op_hilo (SD_, HIHISTORY, LOHISTORY); + check_mult_hilo (SD_, HIHISTORY, LOHISTORY); TRACE_ALU_INPUT2 (GPR[rs], GPR[rt]); prod = (((unsigned64)(unsigned32) GPR[rs]) * ((unsigned64)(unsigned32) GPR[rt])); @@ -3140,7 +3180,7 @@ memval = (rt >> (8 * (access - byte))); else memval = (rt << (8 * (mask - byte))); - StoreMemory (uncached, byte & access, memval, NULL, paddr, vaddr, isREAL); + StoreMemory (uncached, byte & access, memval, 0, paddr, vaddr, isREAL); } |