From 62e7b34c88f707c6ed04d6b36f0693c2cc0a2773 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 13 Aug 2021 14:32:25 +0200 Subject: [PATCH] JitArm64: Don't lock W30 in dcbx If W30 is in use and we don't lock it, it will be pushed to the stack before the BLR, so there isn't really any reason to lock W30. --- Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStore.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStore.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStore.cpp index 46ecb5485c..a107a775c3 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStore.cpp @@ -564,11 +564,11 @@ void JitArm64::dcbx(UGeckoInstruction inst) js.op[1].inst.RA_6 == b && js.op[1].inst.RD_2 == b && js.op[2].inst.hex == 0x4200fff8; - gpr.Lock(ARM64Reg::W0, ARM64Reg::W30); + gpr.Lock(ARM64Reg::W0); if (make_loop) gpr.Lock(ARM64Reg::W1); - ARM64Reg WA = ARM64Reg::W30; + ARM64Reg WA = gpr.GetReg(); if (make_loop) gpr.BindToRegister(b, true); @@ -687,7 +687,7 @@ void JitArm64::dcbx(UGeckoInstruction inst) gprs_to_push[DecodeReg(loop_counter)] = false; ABI_PushRegisters(gprs_to_push); - m_float_emit.ABI_PushRegisters(fprs_to_push, ARM64Reg::X30); + m_float_emit.ABI_PushRegisters(fprs_to_push, WA); // The function call arguments are already in the correct registers if (make_loop) @@ -696,7 +696,7 @@ void JitArm64::dcbx(UGeckoInstruction inst) MOVP2R(ARM64Reg::X8, &JitInterface::InvalidateICacheLine); BLR(ARM64Reg::X8); - m_float_emit.ABI_PopRegisters(fprs_to_push, ARM64Reg::X30); + m_float_emit.ABI_PopRegisters(fprs_to_push, WA); ABI_PopRegisters(gprs_to_push); FixupBranch near_addr = B();