Jit64: divwx - Simplify divisor == -1 case

Suggested by @MerryMage. Thanks!

Co-authored-by: merry <MerryMage@users.noreply.github.com>
This commit is contained in:
Sintendo 2021-03-06 22:28:40 +01:00
parent 83f38388a1
commit defe7162f5

View File

@ -1445,8 +1445,8 @@ void Jit64::divwx(UGeckoInstruction inst)
if (d != a) if (d != a)
MOV(32, Rd, Ra); MOV(32, Rd, Ra);
CMP(32, Rd, Imm32(0x80000000)); NEG(32, Rd);
const FixupBranch normal = J_CC(CC_NE); const FixupBranch normal = J_CC(CC_NO);
MOV(32, Rd, Imm32(0xFFFFFFFF)); MOV(32, Rd, Imm32(0xFFFFFFFF));
if (inst.OE) if (inst.OE)
@ -1454,7 +1454,6 @@ void Jit64::divwx(UGeckoInstruction inst)
const FixupBranch done = J(); const FixupBranch done = J();
SetJumpTarget(normal); SetJumpTarget(normal);
NEG(32, Rd);
if (inst.OE) if (inst.OE)
GenerateConstantOverflow(false); GenerateConstantOverflow(false);