diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp index 2fc1524809..6c0d159be8 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp @@ -615,16 +615,19 @@ void JitArm64::cmpl(UGeckoInstruction inst) u64 A = gpr.GetImm(a); u64 B = gpr.GetImm(b); MOVI2R(CR, A - B); - return; } - - if (gpr.IsImm(b) && !gpr.GetImm(b)) + else if (gpr.IsImm(a) && !gpr.GetImm(a)) + { + NEG(CR, EncodeRegTo64(gpr.R(b))); + } + else if (gpr.IsImm(b) && !gpr.GetImm(b)) { MOV(EncodeRegTo32(CR), gpr.R(a)); - return; } - - SUB(gpr.CR(crf), EncodeRegTo64(gpr.R(a)), EncodeRegTo64(gpr.R(b))); + else + { + SUB(CR, EncodeRegTo64(gpr.R(a)), EncodeRegTo64(gpr.R(b))); + } } void JitArm64::cmpi(UGeckoInstruction inst)