JitArm64: divwx - Special case dividend == 0
Zero divided by any number is still zero. For whatever reason, this case shows up frequently too.
This commit is contained in:
parent
09cdb076a3
commit
f8e97f5a8a
|
@ -1327,6 +1327,13 @@ void JitArm64::divwx(UGeckoInstruction inst)
|
||||||
if (inst.Rc)
|
if (inst.Rc)
|
||||||
ComputeRC0(imm_d);
|
ComputeRC0(imm_d);
|
||||||
}
|
}
|
||||||
|
else if (gpr.IsImm(a) && gpr.GetImm(a) == 0)
|
||||||
|
{
|
||||||
|
// Zero divided by anything is always zero
|
||||||
|
gpr.SetImmediate(d, 0);
|
||||||
|
if (inst.Rc)
|
||||||
|
ComputeRC0(0);
|
||||||
|
}
|
||||||
else if (gpr.IsImm(a))
|
else if (gpr.IsImm(a))
|
||||||
{
|
{
|
||||||
const u32 dividend = gpr.GetImm(a);
|
const u32 dividend = gpr.GetImm(a);
|
||||||
|
|
Loading…
Reference in New Issue