x86/armjit: Stop compiling on a jump to invalid.

This commit is contained in:
Unknown W. Brackets committed 2013-11-10 21:59:50 -08:00
1 parent fd38b10ab6
commit bb960480c8
2 files changed
+22

No files matched your search

+11
View File
@@ -406,6 +406,17 @@ void Jit::Comp_Jump(MIPSOpcode op)
u32 off = _IMM26 << 2;
u32 targetAddr = (js.compilerPC & 0xF0000000) | off;
// Might be a stubbed address or something?
if (!Memory::IsValidAddress(targetAddr))
{
if (js.nextExit == 0)
ERROR_LOG_REPORT(JIT, "Jump to invalid address: %08x", targetAddr)
else
js.compiling = false;
// TODO: Mark this block dirty or something? May be indication it will be changed by imports.
return;
}
switch (op >> 26)
{
case 2: //j
+11
View File
@@ -536,6 +536,17 @@ void Jit::Comp_Jump(MIPSOpcode op)
u32 off = _IMM26 << 2;
u32 targetAddr = (js.compilerPC & 0xF0000000) | off;
// Might be a stubbed address or something?
if (!Memory::IsValidAddress(targetAddr))
{
if (js.nextExit == 0)
ERROR_LOG_REPORT(JIT, "Jump to invalid address: %08x", targetAddr)
else
js.compiling = false;
// TODO: Mark this block dirty or something? May be indication it will be changed by imports.
return;
}
switch (op >> 26)
{
case 2: //j