mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
irjit: Add jump crash checks.
Doesn't seem to have any significant impact on performance.
This commit is contained in:
parent
d2ef6c561c
commit
3c34c7c456
@ -300,9 +300,8 @@ void IRFrontend::Comp_Jump(MIPSOpcode op) {
|
||||
js.cancel = true;
|
||||
else
|
||||
ERROR_LOG_REPORT(JIT, "Jump to invalid address: %08x", targetAddr);
|
||||
js.compiling = false;
|
||||
// TODO: Mark this block dirty or something? May be indication it will be changed by imports.
|
||||
return;
|
||||
// Continue so the block gets completed and crashes properly.
|
||||
}
|
||||
|
||||
switch (op >> 26) {
|
||||
|
@ -224,6 +224,10 @@ void IRJit::RunLoopUntil(u64 globalticks) {
|
||||
u32 data = inst & 0xFFFFFF;
|
||||
IRBlock *block = blocks_.GetBlock(data);
|
||||
mips_->pc = IRInterpret(mips_, block->GetInstructions(), block->GetNumInstructions());
|
||||
if (!Memory::IsValidAddress(mips_->pc)) {
|
||||
Core_ExecException(mips_->pc, mips_->pc, ExecExceptionType::JUMP);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// RestoreRoundingMode(true);
|
||||
Compile(mips_->pc);
|
||||
|
@ -55,6 +55,7 @@
|
||||
static inline void DelayBranchTo(u32 where)
|
||||
{
|
||||
if (!Memory::IsValidAddress(where)) {
|
||||
// TODO: What about misaligned?
|
||||
Core_ExecException(where, PC, ExecExceptionType::JUMP);
|
||||
}
|
||||
PC += 4;
|
||||
|
Loading…
Reference in New Issue
Block a user