diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2016-02-20 02:20:41 +0000 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2016-02-20 02:20:41 +0000 |
| commit | 3b2e170f0bdfbe46a97272d0fa091301ecdfa4af (patch) | |
| tree | 3d9bf9de753dafbcd93c6f32fcfaf6fdabc750af /Source | |
| parent | b291b0a7c23ce005debf02b1d6fe0e7b008f9563 (diff) | |
Interpreter: simplify subtable handling
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp | 10 | ||||
| -rw-r--r-- | Source/Core/Core/PowerPC/PPCTables.cpp | 14 |
2 files changed, 11 insertions, 13 deletions
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp index f79b47d31a..13d2852f7c 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp @@ -19,11 +19,11 @@ static GekkoOPInfo unknownopinfo = { "unknown_instruction", OPTYPE_UNKNOWN, FL_E static GekkoOPTemplate primarytable[] = { - {4, Interpreter::RunTable4, {"RunTable4", OPTYPE_SUBTABLE | (4<<24), 0, 0, 0, 0, 0}}, - {19, Interpreter::RunTable19, {"RunTable19", OPTYPE_SUBTABLE | (19<<24), 0, 0, 0, 0, 0}}, - {31, Interpreter::RunTable31, {"RunTable31", OPTYPE_SUBTABLE | (31<<24), 0, 0, 0, 0, 0}}, - {59, Interpreter::RunTable59, {"RunTable59", OPTYPE_SUBTABLE | (59<<24), 0, 0, 0, 0, 0}}, - {63, Interpreter::RunTable63, {"RunTable63", OPTYPE_SUBTABLE | (63<<24), 0, 0, 0, 0, 0}}, + {4, Interpreter::RunTable4, {"RunTable4", OPTYPE_SUBTABLE, 0, 0, 0, 0, 0}}, + {19, Interpreter::RunTable19, {"RunTable19", OPTYPE_SUBTABLE, 0, 0, 0, 0, 0}}, + {31, Interpreter::RunTable31, {"RunTable31", OPTYPE_SUBTABLE, 0, 0, 0, 0, 0}}, + {59, Interpreter::RunTable59, {"RunTable59", OPTYPE_SUBTABLE, 0, 0, 0, 0, 0}}, + {63, Interpreter::RunTable63, {"RunTable63", OPTYPE_SUBTABLE, 0, 0, 0, 0, 0}}, {16, Interpreter::bcx, {"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK, 1, 0, 0, 0}}, {18, Interpreter::bx, {"bx", OPTYPE_SYSTEM, FL_ENDBLOCK, 1, 0, 0, 0}}, diff --git a/Source/Core/Core/PowerPC/PPCTables.cpp b/Source/Core/Core/PowerPC/PPCTables.cpp index d6d44d215f..b0d9b0d1e7 100644 --- a/Source/Core/Core/PowerPC/PPCTables.cpp +++ b/Source/Core/Core/PowerPC/PPCTables.cpp @@ -37,10 +37,9 @@ const u64 m_crTable[16] = GekkoOPInfo *GetOpInfo(UGeckoInstruction _inst) { GekkoOPInfo *info = m_infoTable[_inst.OPCD]; - if ((info->type & 0xFFFFFF) == OPTYPE_SUBTABLE) + if (info->type == OPTYPE_SUBTABLE) { - int table = info->type>>24; - switch (table) + switch (_inst.OPCD) { case 4: return m_infoTable4[_inst.SUBOP10]; case 19: return m_infoTable19[_inst.SUBOP10]; @@ -54,7 +53,7 @@ GekkoOPInfo *GetOpInfo(UGeckoInstruction _inst) } else { - if ((info->type & 0xFFFFFF) == OPTYPE_INVALID) + if (info->type == OPTYPE_INVALID) { _assert_msg_(POWERPC,0,"GetOpInfo - invalid op %08x @ %08x", _inst.hex, PC); return nullptr; @@ -66,10 +65,9 @@ GekkoOPInfo *GetOpInfo(UGeckoInstruction _inst) Interpreter::Instruction GetInterpreterOp(UGeckoInstruction _inst) { const GekkoOPInfo *info = m_infoTable[_inst.OPCD]; - if ((info->type & 0xFFFFFF) == OPTYPE_SUBTABLE) + if (info->type == OPTYPE_SUBTABLE) { - int table = info->type>>24; - switch (table) + switch (_inst.OPCD) { case 4: return Interpreter::m_opTable4[_inst.SUBOP10]; case 19: return Interpreter::m_opTable19[_inst.SUBOP10]; @@ -83,7 +81,7 @@ Interpreter::Instruction GetInterpreterOp(UGeckoInstruction _inst) } else { - if ((info->type & 0xFFFFFF) == OPTYPE_INVALID) + if (info->type == OPTYPE_INVALID) { _assert_msg_(POWERPC,0,"GetInterpreterOp - invalid op %08x @ %08x", _inst.hex, PC); return nullptr; |
