From 743de44f0326d87997b82aec0720a367afcbadc6 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 5 Sep 2021 11:38:39 +0200 Subject: [PATCH] JitArm64: Move psq_stXX GetCallerSavedUsed calls later This is a proper fix for the issue that 3071a1d was a workaround for. It wasn't some kind of bug in the register cache that had laid dormant, it was a simple mistake made in b24b79e. --- .../PowerPC/JitArm64/JitArm64_LoadStorePaired.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStorePaired.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStorePaired.cpp index 4eb27de32f..f5e3177aac 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStorePaired.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStorePaired.cpp @@ -168,13 +168,6 @@ void JitArm64::psq_stXX(UGeckoInstruction inst) constexpr ARM64Reg addr_reg = ARM64Reg::W1; constexpr ARM64Reg type_reg = ARM64Reg::W2; - BitSet32 gprs_in_use = gpr.GetCallerSavedUsed(); - BitSet32 fprs_in_use = fpr.GetCallerSavedUsed(); - - // Wipe the registers we are using as temporaries - gprs_in_use &= BitSet32(~7); - fprs_in_use &= BitSet32(~3); - if (inst.RA || update) // Always uses the register on update { if (indexed) @@ -198,6 +191,13 @@ void JitArm64::psq_stXX(UGeckoInstruction inst) MOV(arm_addr, addr_reg); } + BitSet32 gprs_in_use = gpr.GetCallerSavedUsed(); + BitSet32 fprs_in_use = fpr.GetCallerSavedUsed(); + + // Wipe the registers we are using as temporaries + gprs_in_use &= BitSet32(~7); + fprs_in_use &= BitSet32(~3); + if (js.assumeNoPairedQuantize) { u32 flags = BackPatchInfo::FLAG_STORE;