From 7d3fac2b4ba00e08153009694bdaf8c7634dc9d2 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 31 Mar 2018 22:33:43 -0700 Subject: [PATCH] arm64jit: Fix a case of R() on unmapped. But this probably means a game crash anyway... Attempting to fix #10843. --- Core/MIPS/ARM64/Arm64CompLoadStore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/MIPS/ARM64/Arm64CompLoadStore.cpp b/Core/MIPS/ARM64/Arm64CompLoadStore.cpp index 9a226a32e6..4e5f42f053 100644 --- a/Core/MIPS/ARM64/Arm64CompLoadStore.cpp +++ b/Core/MIPS/ARM64/Arm64CompLoadStore.cpp @@ -334,7 +334,7 @@ namespace MIPSComp { if (!load && gpr.IsImm(rt) && gpr.TryMapTempImm(rt) != INVALID_REG) { // We're storing an immediate value, let's see if we can optimize rt. - if (!gpr.IsImm(rs) || offset == 0) { + if (!gpr.IsImm(rs) || !Memory::IsValidAddress(iaddr) || offset == 0) { // In this case, we're always going to need rs mapped, which may flush the temp imm. // We handle that in the cases below since targetReg is INVALID_REG. gpr.MapIn(rs);