From 87dcda57857c3204a9bbe6b72ea1b10bd96b4c70 Mon Sep 17 00:00:00 2001 From: magumagu Date: Fri, 13 Mar 2015 01:34:52 -0700 Subject: [PATCH] Remove remnants of old fake opcodes. These are illegal opcodes, and should be treated as such. --- Source/Core/Common/GekkoDisassembler.cpp | 20 ------------------- .../Core/PowerPC/Interpreter/Interpreter.h | 1 - .../Interpreter/Interpreter_Branch.cpp | 5 ----- .../Interpreter/Interpreter_Tables.cpp | 4 +--- .../Core/Core/PowerPC/Jit64/Jit64_Tables.cpp | 17 ++++++---------- .../Core/PowerPC/Jit64IL/JitIL_Tables.cpp | 17 ++++++---------- .../Core/PowerPC/JitArm32/JitArm_Tables.cpp | 17 ++++++---------- .../Core/PowerPC/JitArm64/JitArm64_Tables.cpp | 17 ++++++---------- 8 files changed, 25 insertions(+), 73 deletions(-) diff --git a/Source/Core/Common/GekkoDisassembler.cpp b/Source/Core/Common/GekkoDisassembler.cpp index 5200776526..7ba77a2ea1 100644 --- a/Source/Core/Common/GekkoDisassembler.cpp +++ b/Source/Core/Common/GekkoDisassembler.cpp @@ -1196,26 +1196,6 @@ u32* GekkoDisassembler::DoDisassembly(bool big_endian) switch (PPCGETIDX(in)) { - case 0: - { - int block = in & 0x3FFFFFF; - if (block) - { - m_opcode = "JITblock"; - m_operands = StringFromFormat("%i", block); - } - else - { - m_opcode = ""; - m_operands = "---"; - } - } - break; - - case 1: // HLE call - m_opcode = "HLE"; - break; - case 2: trapi(in, PPCF_64); // tdi break; diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.h b/Source/Core/Core/PowerPC/Interpreter/Interpreter.h index 3afaaf9644..24495b00fe 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.h +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.h @@ -44,7 +44,6 @@ public: static void bcctrx(UGeckoInstruction _inst); static void bclrx(UGeckoInstruction _inst); static void HLEFunction(UGeckoInstruction _inst); - static void CompiledBlock(UGeckoInstruction _inst); // Syscall Instruction static void sc(UGeckoInstruction _inst); diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Branch.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Branch.cpp index 497f06fb82..4c92b56903 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Branch.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Branch.cpp @@ -92,11 +92,6 @@ void Interpreter::HLEFunction(UGeckoInstruction _inst) HLE::Execute(PC, _inst.hex); } -void Interpreter::CompiledBlock(UGeckoInstruction _inst) -{ - _assert_msg_(POWERPC, 0, "CompiledBlock - shouldn't be here!"); -} - void Interpreter::rfi(UGeckoInstruction _inst) { // Restore saved bits from SRR1 to MSR. diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp index 633d49af01..de2cc5167e 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp @@ -26,8 +26,6 @@ static GekkoOPTemplate primarytable[] = {16, Interpreter::bcx, {"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK, 1, 0, 0, 0}}, {18, Interpreter::bx, {"bx", OPTYPE_SYSTEM, FL_ENDBLOCK, 1, 0, 0, 0}}, - {1, Interpreter::HLEFunction, {"HLEFunction", OPTYPE_SYSTEM, FL_ENDBLOCK, 1, 0, 0, 0}}, - {2, Interpreter::CompiledBlock,{"DynaBlock", OPTYPE_SYSTEM, 1, 0, 0, 0, 0}}, {3, Interpreter::twi, {"twi", OPTYPE_SYSTEM, FL_ENDBLOCK, 1, 0, 0, 0}}, {17, Interpreter::sc, {"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 2, 0, 0, 0}}, @@ -86,7 +84,7 @@ static GekkoOPTemplate primarytable[] = {60, Interpreter::psq_st, {"psq_st", OPTYPE_STOREPS, FL_IN_FLOAT_S | FL_IN_A0 | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}}, {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 + //missing: 0, 1, 2, 5, 6, 9, 22, 30, 62, 58 }; static GekkoOPTemplate table4[] = diff --git a/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp b/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp index cbeb9c5ed9..2c28aca48b 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp @@ -38,8 +38,6 @@ static GekkoOPTemplate primarytable[] = {16, &Jit64::bcx}, //"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, {18, &Jit64::bx}, //"bx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {1, &Jit64::HLEFunction}, //"HLEFunction", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {2, &Jit64::FallBackToInterpreter}, //"DynaBlock", OPTYPE_SYSTEM, 0}}, {3, &Jit64::twx}, //"twi", OPTYPE_SYSTEM, FL_ENDBLOCK}}, {17, &Jit64::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, @@ -97,15 +95,7 @@ static GekkoOPTemplate primarytable[] = {60, &Jit64::psq_stXX}, //"psq_st", OPTYPE_PS, FL_IN_A}}, {61, &Jit64::psq_stXX}, //"psq_stu", OPTYPE_PS, FL_OUT_A | FL_IN_A}}, - //missing: 0, 5, 6, 9, 22, 30, 62, 58 - {0, &Jit64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {5, &Jit64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {6, &Jit64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {9, &Jit64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {22, &Jit64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {30, &Jit64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {62, &Jit64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {58, &Jit64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, + //missing: 0, 1, 2, 5, 6, 9, 22, 30, 62, 58 }; static GekkoOPTemplate table4[] = @@ -396,6 +386,11 @@ void InitTables() return; //clear + for (auto& tpl : dynaOpTable) + { + tpl = &Jit64::FallBackToInterpreter; + } + for (auto& tpl : dynaOpTable59) { tpl = &Jit64::FallBackToInterpreter; diff --git a/Source/Core/Core/PowerPC/Jit64IL/JitIL_Tables.cpp b/Source/Core/Core/PowerPC/Jit64IL/JitIL_Tables.cpp index a36a86aea1..bde44df9e2 100644 --- a/Source/Core/Core/PowerPC/Jit64IL/JitIL_Tables.cpp +++ b/Source/Core/Core/PowerPC/Jit64IL/JitIL_Tables.cpp @@ -40,8 +40,6 @@ static GekkoOPTemplate primarytable[] = {16, &JitIL::bcx}, //"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, {18, &JitIL::bx}, //"bx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {1, &JitIL::HLEFunction}, //"HLEFunction", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {2, &JitIL::FallBackToInterpreter}, //"DynaBlock", OPTYPE_SYSTEM, 0}}, {3, &JitIL::FallBackToInterpreter}, //"twi", OPTYPE_SYSTEM, 0}}, {17, &JitIL::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, @@ -99,15 +97,7 @@ static GekkoOPTemplate primarytable[] = {60, &JitIL::psq_st}, //"psq_st", OPTYPE_PS, FL_IN_A}}, {61, &JitIL::psq_st}, //"psq_stu", OPTYPE_PS, FL_OUT_A | FL_IN_A}}, - //missing: 0, 5, 6, 9, 22, 30, 62, 58 - {0, &JitIL::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {5, &JitIL::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {6, &JitIL::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {9, &JitIL::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {22, &JitIL::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {30, &JitIL::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {62, &JitIL::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {58, &JitIL::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, + //missing: 0, 1, 2, 5, 6, 9, 22, 30, 62, 58 }; static GekkoOPTemplate table4[] = @@ -401,6 +391,11 @@ void InitTables() return; //clear + for (auto& tpl : dynaOpTable) + { + tpl = &JitIL::FallBackToInterpreter; + } + for (auto& tpl : dynaOpTable59) { tpl = &JitIL::FallBackToInterpreter; diff --git a/Source/Core/Core/PowerPC/JitArm32/JitArm_Tables.cpp b/Source/Core/Core/PowerPC/JitArm32/JitArm_Tables.cpp index 6d1099d6bc..b54bb3a35a 100644 --- a/Source/Core/Core/PowerPC/JitArm32/JitArm_Tables.cpp +++ b/Source/Core/Core/PowerPC/JitArm32/JitArm_Tables.cpp @@ -40,8 +40,6 @@ static GekkoOPTemplate primarytable[] = {16, &JitArm::bcx}, //"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, {18, &JitArm::bx}, //"bx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {1, &JitArm::HLEFunction}, //"HLEFunction", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {2, &JitArm::FallBackToInterpreter}, //"DynaBlock", OPTYPE_SYSTEM, 0}}, {3, &JitArm::twx}, //"twi", OPTYPE_SYSTEM, FL_ENDBLOCK}}, {17, &JitArm::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, @@ -99,15 +97,7 @@ static GekkoOPTemplate primarytable[] = {60, &JitArm::psq_st}, //"psq_st", OPTYPE_PS, FL_IN_A}}, {61, &JitArm::psq_st}, //"psq_stu", OPTYPE_PS, FL_OUT_A | FL_IN_A}}, - //missing: 0, 5, 6, 9, 22, 30, 62, 58 - {0, &JitArm::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {5, &JitArm::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {6, &JitArm::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {9, &JitArm::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {22, &JitArm::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {30, &JitArm::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {62, &JitArm::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {58, &JitArm::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, + //missing: 0, 1, 2, 5, 6, 9, 22, 30, 62, 58 }; static GekkoOPTemplate table4[] = @@ -400,6 +390,11 @@ void InitTables() return; //clear + for (auto& tpl : dynaOpTable) + { + tpl = &JitArm::FallBackToInterpreter; + } + for (int i = 0; i < 32; i++) { dynaOpTable59[i] = &JitArm::FallBackToInterpreter; diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp index 17cc7164ac..c1a4cd27c8 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp @@ -40,8 +40,6 @@ static GekkoOPTemplate primarytable[] = {16, &JitArm64::bcx}, //"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, {18, &JitArm64::bx}, //"bx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {1, &JitArm64::HLEFunction}, //"HLEFunction", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {2, &JitArm64::FallBackToInterpreter}, //"DynaBlock", OPTYPE_SYSTEM, 0}}, {3, &JitArm64::twx}, //"twi", OPTYPE_SYSTEM, FL_ENDBLOCK}}, {17, &JitArm64::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, @@ -99,15 +97,7 @@ static GekkoOPTemplate primarytable[] = {60, &JitArm64::psq_st}, //"psq_st", OPTYPE_PS, FL_IN_A}}, {61, &JitArm64::psq_st}, //"psq_stu", OPTYPE_PS, FL_OUT_A | FL_IN_A}}, - //missing: 0, 5, 6, 9, 22, 30, 62, 58 - {0, &JitArm64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {5, &JitArm64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {6, &JitArm64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {9, &JitArm64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {22, &JitArm64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {30, &JitArm64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {62, &JitArm64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {58, &JitArm64::FallBackToInterpreter}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, + //missing: 0, 1, 2, 5, 6, 9, 22, 30, 62, 58 }; static GekkoOPTemplate table4[] = @@ -398,6 +388,11 @@ void InitTables() return; //clear + for (auto& tpl : dynaOpTable) + { + tpl = &JitArm64::FallBackToInterpreter; + } + for (int i = 0; i < 32; i++) { dynaOpTable59[i] = &JitArm64::FallBackToInterpreter;