summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorSintendo <bram.speeckaert@gmail.com>2021-03-06 22:28:40 +0100
committerSintendo <bram.speeckaert@gmail.com>2021-03-07 18:29:12 +0100
commitdefe7162f557e6b43919f074e211d57875600e47 (patch)
tree666440f258daf69a0fd27088e3e25ee150b458ab /Source/Core
parent83f38388a1657a9572d667ed384ee033768f836d (diff)
Jit64: divwx - Simplify divisor == -1 case
Suggested by @MerryMage. Thanks! Co-authored-by: merry <MerryMage@users.noreply.github.com>
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
index 1db3836dab..c6b6ba6ddc 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
@@ -1445,8 +1445,8 @@ void Jit64::divwx(UGeckoInstruction inst)
if (d != a)
MOV(32, Rd, Ra);
- CMP(32, Rd, Imm32(0x80000000));
- const FixupBranch normal = J_CC(CC_NE);
+ NEG(32, Rd);
+ const FixupBranch normal = J_CC(CC_NO);
MOV(32, Rd, Imm32(0xFFFFFFFF));
if (inst.OE)
@@ -1454,7 +1454,6 @@ void Jit64::divwx(UGeckoInstruction inst)
const FixupBranch done = J();
SetJumpTarget(normal);
- NEG(32, Rd);
if (inst.OE)
GenerateConstantOverflow(false);