From d62ca40496c0498445d418b20c7fe91f6463e129 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 15 Oct 2018 21:01:56 +0100 Subject: [PATCH] Jit_FloatingPoint: fsign --- .../Core/PowerPC/Jit64/Jit_FloatingPoint.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp index 761f4cef2f..c74db0dbf5 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp @@ -380,29 +380,28 @@ void Jit64::fsign(UGeckoInstruction inst) int b = inst.FB; bool packed = inst.OPCD == 4; - fpr.Lock(b, d); - OpArg src = fpr.R(b); - fpr.BindToRegister(d, false); + RCOpArg src = fpr.Use(b, RCMode::Read); + RCX64Reg Rd = fpr.Bind(d, RCMode::Write); + RegCache::Realize(src, Rd); switch (inst.SUBOP10) { case 40: // neg - avx_op(&XEmitter::VXORPD, &XEmitter::XORPD, fpr.RX(d), src, - MConst(packed ? psSignBits2 : psSignBits), packed); + avx_op(&XEmitter::VXORPD, &XEmitter::XORPD, Rd, src, MConst(packed ? psSignBits2 : psSignBits), + packed); break; case 136: // nabs - avx_op(&XEmitter::VORPD, &XEmitter::ORPD, fpr.RX(d), src, - MConst(packed ? psSignBits2 : psSignBits), packed); + avx_op(&XEmitter::VORPD, &XEmitter::ORPD, Rd, src, MConst(packed ? psSignBits2 : psSignBits), + packed); break; case 264: // abs - avx_op(&XEmitter::VANDPD, &XEmitter::ANDPD, fpr.RX(d), src, - MConst(packed ? psAbsMask2 : psAbsMask), packed); + avx_op(&XEmitter::VANDPD, &XEmitter::ANDPD, Rd, src, MConst(packed ? psAbsMask2 : psAbsMask), + packed); break; default: PanicAlert("fsign bleh"); break; } - fpr.UnlockAll(); } void Jit64::fselx(UGeckoInstruction inst)