summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2019-08-18 03:41:00 +0100
committerTillmann Karras <tilkax@gmail.com>2019-08-18 03:49:32 +0100
commitee85ec95b49032afcd07d7225a7e636493477c76 (patch)
treef4d88c0d3f5f1761575a6c1629b9de0c6c4c836e /Source
parent7520306671d90000f62295e300a66b2e305d665a (diff)
Jit64: fix mcrfs
It was deleting the wrong bits. This fixes issue 10074 (Super Monkey Ball 2 minigame). I introduced this regression in 0f2c65668746c739ad116fb8daa3c027ea429f41.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp
index 6a5d7bb360..99c323398f 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp
@@ -635,7 +635,7 @@ void Jit64::mcrfs(UGeckoInstruction inst)
u32 mask = 0xF << shift;
// Only clear exception bits (but not FEX/VX).
- mask &= 0x9FF87000;
+ mask &= FPSCR_FX | FPSCR_ANY_X;
MOV(32, R(RSCRATCH), PPCSTATE(fpscr));
if (cpu_info.bBMI1)
@@ -649,7 +649,7 @@ void Jit64::mcrfs(UGeckoInstruction inst)
SHR(32, R(RSCRATCH2), Imm8(shift));
AND(32, R(RSCRATCH2), Imm32(0xF));
}
- AND(32, R(RSCRATCH), Imm32(mask));
+ AND(32, R(RSCRATCH), Imm32(~mask));
MOV(32, PPCSTATE(fpscr), R(RSCRATCH));
LEA(64, RSCRATCH, MConst(PowerPC::ConditionRegister::s_crTable));
MOV(64, R(RSCRATCH), MComplex(RSCRATCH, RSCRATCH2, SCALE_8, 0));