Permalink
Browse files

Merge pull request #7115 from Sintendo/double2singleopt

Jit64Common: Eliminate branch in ConvertDoubleToSingle
  • Loading branch information...
delroth committed Jun 24, 2018
2 parents 1453a31 + 78bc969 commit 212adc7b870b6f648b20c8e2c942204bd800045d
Showing with 3 additions and 5 deletions.
  1. +3 −5 Source/Core/Core/PowerPC/Jit64Common/EmuCodeBlock.cpp
@@ -898,10 +898,9 @@ void EmuCodeBlock::ConvertDoubleToSingle(X64Reg dst, X64Reg src)
MOVD_xmm(R(RSCRATCH), XMM1);
// Check if the double is in the range of valid single subnormal
CMP(16, R(RSCRATCH), Imm16(896));
FixupBranch NoDenormalize = J_CC(CC_G);
CMP(16, R(RSCRATCH), Imm16(874));
FixupBranch NoDenormalize2 = J_CC(CC_L);
SUB(16, R(RSCRATCH), Imm16(874));
CMP(16, R(RSCRATCH), Imm16(896 - 874));
FixupBranch NoDenormalize = J_CC(CC_A);
// Denormalise
@@ -927,7 +926,6 @@ void EmuCodeBlock::ConvertDoubleToSingle(X64Reg dst, X64Reg src)
FixupBranch end = J(false); // Goto end
SetJumpTarget(NoDenormalize);
SetJumpTarget(NoDenormalize2);
// Don't Denormalize

0 comments on commit 212adc7

Please sign in to comment.