From abe9c30d3d6a45599143d4452541503f6ca45c9c Mon Sep 17 00:00:00 2001 From: degasus Date: Wed, 2 Nov 2016 22:38:03 +0100 Subject: [PATCH] JitArm64: Also push/pop gpr.R(addr). This fixes slowmem load instruction with update. --- .../Core/Core/PowerPC/JitArm64/JitArm64_LoadStore.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStore.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStore.cpp index e439c7b4c8..18fb9d9b39 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStore.cpp @@ -38,11 +38,6 @@ void JitArm64::SafeLoadToReg(u32 dest, s32 addr, s32 offsetReg, u32 flags, s32 o if (offsetReg != -1 && !gpr.IsImm(offsetReg)) off_reg = gpr.R(offsetReg); - BitSet32 regs_in_use = gpr.GetCallerSavedUsed(); - BitSet32 fprs_in_use = fpr.GetCallerSavedUsed(); - regs_in_use[W0] = 0; - regs_in_use[dest_reg] = 0; - ARM64Reg addr_reg = W0; u32 imm_addr = 0; bool is_immediate = false; @@ -116,6 +111,11 @@ void JitArm64::SafeLoadToReg(u32 dest, s32 addr, s32 offsetReg, u32 flags, s32 o MOV(gpr.R(addr), addr_reg); } + BitSet32 regs_in_use = gpr.GetCallerSavedUsed(); + BitSet32 fprs_in_use = fpr.GetCallerSavedUsed(); + regs_in_use[W0] = 0; + regs_in_use[dest_reg] = 0; + u32 access_size = BackPatchInfo::GetFlagSize(flags); u32 mmio_address = 0; if (is_immediate)