From 0deed2a5af253d1d4d49f4c1f61f49937a95cd4e Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 24 Dec 2018 19:02:43 +0000 Subject: [PATCH] EmuCodeBlock: Fix bug in SetFPRF: Should only consider lower double --- Source/Core/Core/PowerPC/Jit64Common/EmuCodeBlock.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/Jit64Common/EmuCodeBlock.cpp b/Source/Core/Core/PowerPC/Jit64Common/EmuCodeBlock.cpp index f726ce0c10..82db73bcc6 100644 --- a/Source/Core/Core/PowerPC/Jit64Common/EmuCodeBlock.cpp +++ b/Source/Core/Core/PowerPC/Jit64Common/EmuCodeBlock.cpp @@ -982,6 +982,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 @@ -1027,7 +1028,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;