Skip to content
Permalink
Browse files
Merge pull request #7642 from MerryMage/fprf-whole
EmuCodeBlock: Fix bug in SetFPRF: Should only consider lower double
  • Loading branch information
lioncash committed Dec 28, 2018
2 parents b7db1f0 + 0deed2a commit 2d37944
Showing 1 changed file with 2 additions and 1 deletion.
@@ -986,6 +986,7 @@ void EmuCodeBlock::ConvertSingleToDouble(X64Reg dst, X64Reg src, bool src_is_gpr
alignas(16) static const u64 psDoubleExp[2] = {0x7FF0000000000000ULL, 0};
alignas(16) static const u64 psDoubleFrac[2] = {0x000FFFFFFFFFFFFFULL, 0};
alignas(16) static const u64 psDoubleNoSign[2] = {0x7FFFFFFFFFFFFFFFULL, 0};
alignas(16) static const u64 psWhole[2] = {0xFFFFFFFFFFFFFFFFULL, 0};

// TODO: it might be faster to handle FPRF in the same way as CR is currently handled for integer,
// storing
@@ -1031,7 +1032,7 @@ void EmuCodeBlock::SetFPRF(Gen::X64Reg xmm)
continue3 = J();

SetJumpTarget(zeroExponent);
PTEST(xmm, R(xmm));
PTEST(xmm, MConst(psWhole));
FixupBranch zero = J_CC(CC_Z);

// No exponent + mantissa: sign ? PPC_FPCLASS_ND : PPC_FPCLASS_PD;

0 comments on commit 2d37944

Please sign in to comment.