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
: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];
: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];
: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];
: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];
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;
: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]));
: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]));
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);
}