JIT: catch illegal instruction errors

Still crash, but at least give a message informing the world that it happened.
This commit is contained in:
Fiora 2015-01-06 11:06:49 -08:00
parent 25fac0282c
commit 8f7c799794
1 changed files with 5 additions and 0 deletions

View File

@ -673,6 +673,11 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock *block, CodeBuffer *buffer, u32
num_inst++;
memset(&code[i], 0, sizeof(CodeOp));
GekkoOPInfo *opinfo = GetOpInfo(inst);
if (!opinfo)
{
PanicAlert("Invalid PowerPC opcode: %x.", inst.hex);
Crash();
}
code[i].opinfo = opinfo;
code[i].address = address;