* 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.
This commit is contained in:
Gavin Romig-Koch 1998-05-13 14:00:56 +00:00
parent b3c22f56b8
commit 94dda41a0c
2 changed files with 59 additions and 9 deletions

View File

@ -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.

View File

@ -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);
}