From 37f79ec86f7d8787d1e06ebabc698252ab8ac81f Mon Sep 17 00:00:00 2001 From: comex Date: Mon, 1 Aug 2016 19:21:18 -0400 Subject: [PATCH] Don't use the fast path when there are watchpoints enabled, for writes too. Also fold the check in both functionss into 'slowmem' rather than having a separate test. (jo.alwaysUseMemFuncs implies jo.memcheck anyway, as makes sense.) --- Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp index e08b60b7f9ba..7fe72851ef8a 100644 --- a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp @@ -255,7 +255,7 @@ FixupBranch EmuCodeBlock::CheckIfSafeAddress(const OpArg& reg_value, X64Reg reg_ void EmuCodeBlock::SafeLoadToReg(X64Reg reg_value, const Gen::OpArg& opAddress, int accessSize, s32 offset, BitSet32 registersInUse, bool signExtend, int flags) { - bool slowmem = (flags & SAFE_LOADSTORE_FORCE_SLOWMEM) != 0; + bool slowmem = (flags & SAFE_LOADSTORE_FORCE_SLOWMEM) != 0 || jit->jo.alwaysUseMemFuncs; registersInUse[reg_value] = false; if (jit->jo.fastmem && !(flags & SAFE_LOADSTORE_NO_FASTMEM) && !slowmem) @@ -305,7 +305,7 @@ void EmuCodeBlock::SafeLoadToReg(X64Reg reg_value, const Gen::OpArg& opAddress, } FixupBranch exit; - if (!jit->jo.alwaysUseMemFuncs && !slowmem) + if (!slowmem) { u32 mem_mask = Memory::ADDR_MASK_HW_ACCESS; @@ -528,7 +528,7 @@ void EmuCodeBlock::SafeWriteRegToReg(OpArg reg_value, X64Reg reg_addr, int acces BitSet32 registersInUse, int flags) { bool swap = !(flags & SAFE_LOADSTORE_NO_SWAP); - bool slowmem = (flags & SAFE_LOADSTORE_FORCE_SLOWMEM) != 0; + bool slowmem = (flags & SAFE_LOADSTORE_FORCE_SLOWMEM) != 0 || jit->jo.alwaysUseMemFuncs; // set the correct immediate format reg_value = FixImmediate(accessSize, reg_value);