Skip to content

Commit

Permalink
Don't use the fast path when there are watchpoints enabled, for write…
Browse files Browse the repository at this point in the history
…s 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.)
  • Loading branch information
comex authored and OrN committed Sep 16, 2016
1 parent 703eebf commit 37f79ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 37f79ec

Please sign in to comment.