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.)
This commit is contained in:
comex 2016-08-01 19:21:18 -04:00
parent 84c936cab8
commit c51faa41f5
1 changed files with 3 additions and 3 deletions

View File

@ -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);