mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
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:
@ -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);
|
||||||
|
Reference in New Issue
Block a user