From d7e2c2c1d2e9819a945b72b3f813fd4e6bbcd227 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 21 Jun 2014 07:45:47 -0700 Subject: [PATCH] armjit: Oops, correctly handle plus/minus vmin/max. --- Core/MIPS/ARM/ArmCompVFPU.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Core/MIPS/ARM/ArmCompVFPU.cpp b/Core/MIPS/ARM/ArmCompVFPU.cpp index 59dc69ff67..9dd2490fba 100644 --- a/Core/MIPS/ARM/ArmCompVFPU.cpp +++ b/Core/MIPS/ARM/ArmCompVFPU.cpp @@ -751,10 +751,12 @@ namespace MIPSComp // If both are negative, we reverse the comparison. We want the highest mantissa then. // Also, between -NAN and -5.0, we want -NAN to be less. TST(SCRATCHREG1, SCRATCHREG2); - SetCC(CC_MI); + FixupBranch cmpPositive = B_CC(CC_PL); CMP(SCRATCHREG2, SCRATCHREG1); - SetCC(CC_PL); + FixupBranch skipPositive = B(); + SetJumpTarget(cmpPositive); CMP(SCRATCHREG1, SCRATCHREG2); + SetJumpTarget(skipPositive); SetCC(CC_AL); SetJumpTarget(skipNAN); SetCC(CC_LT); @@ -774,10 +776,12 @@ namespace MIPSComp // If both are negative, we reverse the comparison. We want the lowest mantissa then. // Also, between -NAN and -5.0, we want -5.0 to be greater. TST(SCRATCHREG2, SCRATCHREG1); - SetCC(CC_MI); + FixupBranch cmpPositive = B_CC(CC_PL); CMP(SCRATCHREG1, SCRATCHREG2); - SetCC(CC_PL); + FixupBranch skipPositive = B(); + SetJumpTarget(cmpPositive); CMP(SCRATCHREG2, SCRATCHREG1); + SetJumpTarget(skipPositive); SetCC(CC_AL); SetJumpTarget(skipNAN); SetCC(CC_LT);