mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-19 12:22:32 +00:00
Correctly match ranges in memchecks with ends.
This commit is contained in:
parent
d2b874436d
commit
540bd13222
@ -248,12 +248,12 @@ MemCheck *CBreakPoints::GetMemCheck(u32 address, int size)
|
||||
MemCheck &check = *iter;
|
||||
if (check.end != 0)
|
||||
{
|
||||
if (address >= check.start && address + size < check.end)
|
||||
if (address + size >= check.start && address < check.end)
|
||||
return ✓
|
||||
}
|
||||
else
|
||||
{
|
||||
if (check.start==address)
|
||||
if (check.start == address)
|
||||
return ✓
|
||||
}
|
||||
}
|
||||
|
@ -732,7 +732,7 @@ void Jit::JitSafeMem::MemCheckImm(ReadType type)
|
||||
|
||||
jit_->CMP(32, M((void*)&coreState), Imm32(0));
|
||||
skipChecks_.push_back(jit_->J_CC(CC_NE, true));
|
||||
jit_->js.afterOp = JitState::AFTER_CORE_STATE | JitState::AFTER_REWIND_PC_BAD_STATE;
|
||||
jit_->js.afterOp |= JitState::AFTER_CORE_STATE | JitState::AFTER_REWIND_PC_BAD_STATE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -749,9 +749,9 @@ void Jit::JitSafeMem::MemCheckAsm(ReadType type)
|
||||
FixupBranch skipNext, skipNextRange;
|
||||
if (it->end != 0)
|
||||
{
|
||||
jit_->CMP(32, R(xaddr_), Imm32(it->start - offset_));
|
||||
jit_->CMP(32, R(xaddr_), Imm32(it->start - offset_ - size_));
|
||||
skipNext = jit_->J_CC(CC_B);
|
||||
jit_->CMP(32, R(xaddr_), Imm32(it->end - offset_ - size_));
|
||||
jit_->CMP(32, R(xaddr_), Imm32(it->end - offset_));
|
||||
skipNextRange = jit_->J_CC(CC_AE);
|
||||
}
|
||||
else
|
||||
@ -768,7 +768,7 @@ void Jit::JitSafeMem::MemCheckAsm(ReadType type)
|
||||
|
||||
jit_->CMP(32, M((void*)&coreState), Imm32(0));
|
||||
skipChecks_.push_back(jit_->J_CC(CC_NE, true));
|
||||
jit_->js.afterOp = JitState::AFTER_CORE_STATE | JitState::AFTER_REWIND_PC_BAD_STATE;
|
||||
jit_->js.afterOp |= JitState::AFTER_CORE_STATE | JitState::AFTER_REWIND_PC_BAD_STATE;
|
||||
|
||||
jit_->SetJumpTarget(skipNext);
|
||||
if (it->end != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user