diff options
| author | magumagu <magumagu9@gmail.com> | 2015-01-23 21:27:34 -0800 |
|---|---|---|
| committer | magumagu <magumagu9@gmail.com> | 2015-02-11 21:01:00 -0800 |
| commit | e640ef9d7b07a007e417dc2852332baf024e6a51 (patch) | |
| tree | 6c40dc7978fec258c58b9ed7718e7b201b5f843b /Source/Core | |
| parent | 20aa9378244a89b912539f3b2b37842a0824dc9d (diff) | |
Improve illegal instruction handling.
This should more reliably show an error message for illegal
instructions.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp | 12 | ||||
| -rw-r--r-- | Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp | 16 |
2 files changed, 12 insertions, 16 deletions
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp index 0f549a74b9..55be204115 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp @@ -281,14 +281,10 @@ void Interpreter::Run() void Interpreter::unknown_instruction(UGeckoInstruction _inst) { - if (_inst.hex != 0) - { - std::string disasm = GekkoDisassembler::Disassemble(PowerPC::HostRead_U32(last_pc), last_pc); - NOTICE_LOG(POWERPC, "Last PC = %08x : %s", last_pc, disasm.c_str()); - Dolphin_Debugger::PrintCallstack(); - _assert_msg_(POWERPC, 0, "\nIntCPU: Unknown instruction %08x at PC = %08x last_PC = %08x LR = %08x\n", _inst.hex, PC, last_pc, LR); - } - + std::string disasm = GekkoDisassembler::Disassemble(PowerPC::HostRead_U32(last_pc), last_pc); + NOTICE_LOG(POWERPC, "Last PC = %08x : %s", last_pc, disasm.c_str()); + Dolphin_Debugger::PrintCallstack(); + _assert_msg_(POWERPC, 0, "\nIntCPU: Unknown instruction %08x at PC = %08x last_PC = %08x LR = %08x\n", _inst.hex, PC, last_pc, LR); } void Interpreter::ClearCache() diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp index 639a899f57..fb7275f9a6 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp @@ -85,14 +85,14 @@ static GekkoOPTemplate primarytable[] = {61, Interpreter::psq_stu, {"psq_stu", OPTYPE_STOREPS, FL_IN_FLOAT_S | FL_OUT_A | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}}, //missing: 0, 5, 6, 9, 22, 30, 62, 58 - {0, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, 0, 0, 0, 0, 0}}, - {5, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, 0, 0, 0, 0, 0}}, - {6, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, 0, 0, 0, 0, 0}}, - {9, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, 0, 0, 0, 0, 0}}, - {22, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, 0, 0, 0, 0, 0}}, - {30, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, 0, 0, 0, 0, 0}}, - {62, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, 0, 0, 0, 0, 0}}, - {58, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, 0, 0, 0, 0, 0}}, + {0, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, FL_ENDBLOCK, 0, 0, 0, 0}}, + {5, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, FL_ENDBLOCK, 0, 0, 0, 0}}, + {6, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, FL_ENDBLOCK, 0, 0, 0, 0}}, + {9, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, FL_ENDBLOCK, 0, 0, 0, 0}}, + {22, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, FL_ENDBLOCK, 0, 0, 0, 0}}, + {30, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, FL_ENDBLOCK, 0, 0, 0, 0}}, + {62, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, FL_ENDBLOCK, 0, 0, 0, 0}}, + {58, Interpreter::unknown_instruction, {"unknown_instruction", OPTYPE_UNKNOWN, FL_ENDBLOCK, 0, 0, 0, 0}}, }; static GekkoOPTemplate table4[] = |
