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.
This commit is contained in:
JosJuice 2021-09-05 11:38:39 +02:00
parent 282fda1530
commit 743de44f03

View File

@ -168,13 +168,6 @@ void JitArm64::psq_stXX(UGeckoInstruction inst)
constexpr ARM64Reg addr_reg = ARM64Reg::W1; constexpr ARM64Reg addr_reg = ARM64Reg::W1;
constexpr ARM64Reg type_reg = ARM64Reg::W2; 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 (inst.RA || update) // Always uses the register on update
{ {
if (indexed) if (indexed)
@ -198,6 +191,13 @@ void JitArm64::psq_stXX(UGeckoInstruction inst)
MOV(arm_addr, addr_reg); 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) if (js.assumeNoPairedQuantize)
{ {
u32 flags = BackPatchInfo::FLAG_STORE; u32 flags = BackPatchInfo::FLAG_STORE;