From cc77e2f3ef58a15b61141de44b3a45893b9dcc6c Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 15 Oct 2018 21:02:01 +0100 Subject: [PATCH] Jit_FloatingPoint: fctiwx --- Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp index c738a20cb7..8ab78daea8 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp @@ -598,8 +598,10 @@ void Jit64::fctiwx(UGeckoInstruction inst) int d = inst.RD; int b = inst.RB; - fpr.Lock(d, b); - fpr.BindToRegister(d); + + RCOpArg Rb = fpr.Use(b, RCMode::Read); + RCX64Reg Rd = fpr.Bind(d, RCMode::Write); + RegCache::Realize(Rb, Rd); // Intel uses 0x80000000 as a generic error code while PowerPC uses clamping: // @@ -613,7 +615,7 @@ void Jit64::fctiwx(UGeckoInstruction inst) // except for -0.0 where they are set to 0xfff80001 (TODO). MOVAPD(XMM0, MConst(half_qnan_and_s32_max)); - MINSD(XMM0, fpr.R(b)); + MINSD(XMM0, Rb); switch (inst.SUBOP10) { // fctiwx @@ -627,8 +629,7 @@ void Jit64::fctiwx(UGeckoInstruction inst) break; } // d[64+] must not be modified - MOVSD(fpr.R(d), XMM0); - fpr.UnlockAll(); + MOVSD(Rd, XMM0); } void Jit64::frspx(UGeckoInstruction inst)