From 8f7c799794297f355136a453afe173a979f7cc52 Mon Sep 17 00:00:00 2001 From: Fiora Date: Tue, 6 Jan 2015 11:06:49 -0800 Subject: [PATCH] JIT: catch illegal instruction errors Still crash, but at least give a message informing the world that it happened. --- Source/Core/Core/PowerPC/PPCAnalyst.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp index 1064e6af2e..8cb1e5b383 100644 --- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp +++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp @@ -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;