From 23327064f6cef33622e79603c2e59d7752bcded9 Mon Sep 17 00:00:00 2001 From: Sintendo <3380580+Sintendo@users.noreply.github.com> Date: Sun, 23 Jun 2024 23:18:46 +0200 Subject: [PATCH] JitArm64_LoadStoreFloating: Use ScopedARM64Reg --- .../Core/PowerPC/JitArm64/JitArm64_LoadStoreFloating.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStoreFloating.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStoreFloating.cpp index 0e471e355b..6bac5dc656 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStoreFloating.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStoreFloating.cpp @@ -268,14 +268,14 @@ void JitArm64::stfXX(UGeckoInstruction inst) const bool have_single = fpr.IsSingle(inst.FS, true); - ARM64Reg V0 = + Arm64FPRCache::ScopedARM64Reg V0 = fpr.R(inst.FS, want_single && have_single ? RegType::LowerPairSingle : RegType::LowerPair); if (want_single && !have_single) { - const ARM64Reg single_reg = fpr.GetReg(); + auto single_reg = fpr.GetScopedReg(); ConvertDoubleToSingleLower(inst.FS, single_reg, V0); - V0 = single_reg; + V0 = std::move(single_reg); } gpr.Lock(ARM64Reg::W1, ARM64Reg::W2, ARM64Reg::W30); @@ -425,9 +425,6 @@ void JitArm64::stfXX(UGeckoInstruction inst) MOV(gpr.R(a), addr_reg); } - if (want_single && !have_single) - fpr.Unlock(V0); - gpr.Unlock(ARM64Reg::W1, ARM64Reg::W2, ARM64Reg::W30); fpr.Unlock(ARM64Reg::Q0); if (!jo.fastmem)