From 9723a4e2edd016baa4d6f0fc23e84a631b62d6b1 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 11 May 2015 14:25:43 +0200 Subject: [PATCH 1/6] Interpreter: use IntDouble instead of casts --- Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h b/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h index efd0ddc68d..5742b348e4 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h @@ -76,9 +76,9 @@ inline double ForceDouble(double d) inline double Force25Bit(double d) { - u64 di = *(u64*)&d; - di = (di & 0xFFFFFFFFF8000000ULL) + (di & 0x8000000); - return *(double*)&di; + MathUtil::IntDouble x(d); + x.i = (x.i & 0xFFFFFFFFF8000000ULL) + (x.i & 0x8000000); + return x.d; } // these functions allow globally modify operations behaviour From 2074abbe8614f2d0ea7ed4ca22915e1e9b06fd24 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 11 May 2015 23:42:47 +0200 Subject: [PATCH 2/6] Jit64: drop unused argument from SetFPRFIfNeeded --- Source/Core/Core/PowerPC/Jit64/Jit.h | 2 +- Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp | 12 ++++++------ Source/Core/Core/PowerPC/Jit64/Jit_Paired.cpp | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.h b/Source/Core/Core/PowerPC/Jit64/Jit.h index b146487b2f..340a2dc0f6 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.h +++ b/Source/Core/Core/PowerPC/Jit64/Jit.h @@ -133,7 +133,7 @@ public: // Generates a branch that will check if a given bit of a CR register part // is set or not. Gen::FixupBranch JumpIfCRFieldBit(int field, int bit, bool jump_if_set = true); - void SetFPRFIfNeeded(UGeckoInstruction inst, Gen::X64Reg xmm); + void SetFPRFIfNeeded(Gen::X64Reg xmm); void MultiplyImmediate(u32 imm, int a, int d, bool overflow); diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp index 55de795673..349a7a269c 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp @@ -49,14 +49,14 @@ void Jit64::fp_tri_op(int d, int a, int b, bool reversible, bool single, void (X MOVDDUP(fpr.RX(d), fpr.R(d)); } } - SetFPRFIfNeeded(inst, fpr.RX(d)); + SetFPRFIfNeeded(fpr.RX(d)); fpr.UnlockAll(); } // We can avoid calculating FPRF if it's not needed; every float operation resets it, so // if it's going to be clobbered in a future instruction before being read, we can just // not calculate it. -void Jit64::SetFPRFIfNeeded(UGeckoInstruction inst, X64Reg xmm) +void Jit64::SetFPRFIfNeeded(X64Reg xmm) { // As far as we know, the games that use this flag only need FPRF for fmul and fmadd, but // FPRF is fast enough in JIT that we might as well just enable it for every float instruction @@ -230,7 +230,7 @@ void Jit64::fmaddXX(UGeckoInstruction inst) { MOVSD(fpr.RX(d), R(XMM0)); } - SetFPRFIfNeeded(inst, fpr.RX(d)); + SetFPRFIfNeeded(fpr.RX(d)); fpr.UnlockAll(); } @@ -497,7 +497,7 @@ void Jit64::frspx(UGeckoInstruction inst) MOVAPD(fpr.RX(d), fpr.R(b)); ForceSinglePrecisionS(fpr.RX(d), fpr.RX(d)); MOVDDUP(fpr.RX(d), fpr.R(d)); - SetFPRFIfNeeded(inst, fpr.RX(d)); + SetFPRFIfNeeded(fpr.RX(d)); fpr.UnlockAll(); } @@ -515,7 +515,7 @@ void Jit64::frsqrtex(UGeckoInstruction inst) MOVAPD(XMM0, fpr.R(b)); CALL((void *)asm_routines.frsqrte); MOVSD(fpr.R(d), XMM0); - SetFPRFIfNeeded(inst, fpr.RX(d)); + SetFPRFIfNeeded(fpr.RX(d)); fpr.UnlockAll(); gpr.UnlockAllX(); } @@ -534,7 +534,7 @@ void Jit64::fresx(UGeckoInstruction inst) MOVAPD(XMM0, fpr.R(b)); CALL((void *)asm_routines.fres); MOVSD(fpr.R(d), XMM0); - SetFPRFIfNeeded(inst, fpr.RX(d)); + SetFPRFIfNeeded(fpr.RX(d)); fpr.UnlockAll(); gpr.UnlockAllX(); } diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Paired.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Paired.cpp index 5a141008a3..2c772a3606 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Paired.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Paired.cpp @@ -114,7 +114,7 @@ void Jit64::tri_op(int d, int a, int b, bool reversible, void (XEmitter::*avxOp) avx_op(avxOp, sseOp, fpr.RX(d), fpr.R(a), fpr.R(b), true, reversible); } ForceSinglePrecisionP(fpr.RX(d), fpr.RX(d)); - SetFPRFIfNeeded(inst, fpr.RX(d)); + SetFPRFIfNeeded(fpr.RX(d)); fpr.UnlockAll(); } @@ -174,7 +174,7 @@ void Jit64::ps_sum(UGeckoInstruction inst) } fpr.BindToRegister(d, false); ForceSinglePrecisionP(fpr.RX(d), XMM0); - SetFPRFIfNeeded(inst, fpr.RX(d)); + SetFPRFIfNeeded(fpr.RX(d)); fpr.UnlockAll(); } @@ -206,7 +206,7 @@ void Jit64::ps_muls(UGeckoInstruction inst) MULPD(XMM0, fpr.R(a)); fpr.BindToRegister(d, false); ForceSinglePrecisionP(fpr.RX(d), XMM0); - SetFPRFIfNeeded(inst, fpr.RX(d)); + SetFPRFIfNeeded(fpr.RX(d)); fpr.UnlockAll(); } @@ -265,7 +265,7 @@ void Jit64::ps_rsqrte(UGeckoInstruction inst) MOVLHPS(fpr.RX(d), XMM0); ForceSinglePrecisionP(fpr.RX(d), fpr.RX(d)); - SetFPRFIfNeeded(inst, fpr.RX(d)); + SetFPRFIfNeeded(fpr.RX(d)); fpr.UnlockAll(); gpr.UnlockAllX(); } @@ -292,7 +292,7 @@ void Jit64::ps_res(UGeckoInstruction inst) MOVLHPS(fpr.RX(d), XMM0); ForceSinglePrecisionP(fpr.RX(d), fpr.RX(d)); - SetFPRFIfNeeded(inst, fpr.RX(d)); + SetFPRFIfNeeded(fpr.RX(d)); fpr.UnlockAll(); gpr.UnlockAllX(); } @@ -387,7 +387,7 @@ void Jit64::ps_maddXX(UGeckoInstruction inst) fpr.BindToRegister(d, false); ForceSinglePrecisionP(fpr.RX(d), XMM0); - SetFPRFIfNeeded(inst, fpr.RX(d)); + SetFPRFIfNeeded(fpr.RX(d)); fpr.UnlockAll(); } From 5b023b83ec339d68dcbd84e09abe8521f0f0d1a1 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Wed, 13 May 2015 20:37:16 +0200 Subject: [PATCH 3/6] Jit64: rename twx to twX We use the lower-case x to signal an optional Rc bit. --- Source/Core/Core/PowerPC/Jit64/Jit.h | 2 +- Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp | 4 ++-- Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.h b/Source/Core/Core/PowerPC/Jit64/Jit.h index 340a2dc0f6..3fb54dce73 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.h +++ b/Source/Core/Core/PowerPC/Jit64/Jit.h @@ -240,7 +240,7 @@ public: void subfic(UGeckoInstruction inst); void subfx(UGeckoInstruction inst); - void twx(UGeckoInstruction inst); + void twX(UGeckoInstruction inst); void lXXx(UGeckoInstruction inst); diff --git a/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp b/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp index d5db7fa55c..52eb0af503 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp @@ -38,7 +38,7 @@ static GekkoOPTemplate primarytable[] = {16, &Jit64::bcx}, //"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, {18, &Jit64::bx}, //"bx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {3, &Jit64::twx}, //"twi", OPTYPE_SYSTEM, FL_ENDBLOCK}}, + {3, &Jit64::twX}, //"twi", OPTYPE_SYSTEM, FL_ENDBLOCK}}, {17, &Jit64::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, {7, &Jit64::mulli}, //"mulli", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_RC_BIT, 2}}, @@ -298,7 +298,7 @@ static GekkoOPTemplate table31[] = {595, &Jit64::FallBackToInterpreter}, //"mfsr", OPTYPE_SYSTEM, FL_OUT_D, 2}}, {659, &Jit64::FallBackToInterpreter}, //"mfsrin", OPTYPE_SYSTEM, FL_OUT_D, 2}}, - {4, &Jit64::twx}, //"tw", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, + {4, &Jit64::twX}, //"tw", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, {598, &Jit64::DoNothing}, //"sync", OPTYPE_SYSTEM, 0, 2}}, {982, &Jit64::icbi}, //"icbi", OPTYPE_SYSTEM, FL_ENDBLOCK, 3}}, diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp index 097e0be3b8..b57b6f00cd 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp @@ -1849,7 +1849,7 @@ void Jit64::cntlzwx(UGeckoInstruction inst) gpr.UnlockAll(); } -void Jit64::twx(UGeckoInstruction inst) +void Jit64::twX(UGeckoInstruction inst) { INSTRUCTION_START JITDISABLE(bJITIntegerOff); From accefbf0a55569605a81bd20b90ca6449690c70a Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Thu, 14 May 2015 11:06:05 +0200 Subject: [PATCH 4/6] JitBase: small cleanup --- Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp | 1 - Source/Core/Core/PowerPC/JitCommon/JitBase.cpp | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp index b57b6f00cd..1c6a00d136 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp @@ -1161,7 +1161,6 @@ void Jit64::divwux(UGeckoInstruction inst) { GenerateConstantOverflow(true); } - //MOV(32, R(RAX), gpr.R(d)); FixupBranch end = J(); SetJumpTarget(not_div_by_zero); DIV(32, gpr.R(b)); diff --git a/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp b/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp index d03df55846..1b171100c2 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp @@ -20,11 +20,8 @@ void Jit(u32 em_address) u32 Helper_Mask(u8 mb, u8 me) { - return (((mb > me) ? - ~(((u32)-1 >> mb) ^ ((me >= 31) ? 0 : (u32) -1 >> (me + 1))) - : - (((u32)-1 >> mb) ^ ((me >= 31) ? 0 : (u32) -1 >> (me + 1)))) - ); + u32 mask = ((u32)-1 >> mb) ^ (me >= 31 ? 0 : (u32)-1 >> (me + 1)); + return mb > me ? ~mask : mask; } void LogGeneratedX86(int size, PPCAnalyst::CodeBuffer *code_buffer, const u8 *normalEntry, JitBlock *b) @@ -45,11 +42,7 @@ void LogGeneratedX86(int size, PPCAnalyst::CodeBuffer *code_buffer, const u8 *no while ((u8*)disasmPtr < end) { char sptr[1000] = ""; -#if _ARCH_64 disasmPtr += x64disasm.disasm64(disasmPtr, disasmPtr, (u8*)disasmPtr, sptr); -#else - disasmPtr += x64disasm.disasm32(disasmPtr, disasmPtr, (u8*)disasmPtr, sptr); -#endif DEBUG_LOG(DYNA_REC,"IR_X86 x86: %s", sptr); } From 6c5e5cc7b8d9ccaddb9d7fe5a1a55336afbad04a Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Thu, 14 May 2015 18:24:06 +0200 Subject: [PATCH 5/6] PowerPC: clean up instruction tables --- .../Core/Core/PowerPC/Jit64/Jit64_Tables.cpp | 492 +++++++++--------- .../Core/PowerPC/JitArm32/JitArm_Tables.cpp | 492 +++++++++--------- .../Core/PowerPC/JitArm64/JitArm64_Tables.cpp | 492 +++++++++--------- Source/Core/Core/PowerPC/PPCTables.h | 1 - 4 files changed, 738 insertions(+), 739 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp b/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp index 52eb0af503..5b9ac6ae23 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp @@ -29,335 +29,335 @@ struct GekkoOPTemplate static GekkoOPTemplate primarytable[] = { - {4, &Jit64::DynaRunTable4}, //"RunTable4", OPTYPE_SUBTABLE | (4<<24), 0}}, - {19, &Jit64::DynaRunTable19}, //"RunTable19", OPTYPE_SUBTABLE | (19<<24), 0}}, - {31, &Jit64::DynaRunTable31}, //"RunTable31", OPTYPE_SUBTABLE | (31<<24), 0}}, - {59, &Jit64::DynaRunTable59}, //"RunTable59", OPTYPE_SUBTABLE | (59<<24), 0}}, - {63, &Jit64::DynaRunTable63}, //"RunTable63", OPTYPE_SUBTABLE | (63<<24), 0}}, + {4, &Jit64::DynaRunTable4}, // RunTable4 + {19, &Jit64::DynaRunTable19}, // RunTable19 + {31, &Jit64::DynaRunTable31}, // RunTable31 + {59, &Jit64::DynaRunTable59}, // RunTable59 + {63, &Jit64::DynaRunTable63}, // RunTable63 - {16, &Jit64::bcx}, //"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {18, &Jit64::bx}, //"bx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, + {16, &Jit64::bcx}, // bcx + {18, &Jit64::bx}, // bx - {3, &Jit64::twX}, //"twi", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {17, &Jit64::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, + {3, &Jit64::twX}, // twi + {17, &Jit64::sc}, // sc - {7, &Jit64::mulli}, //"mulli", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_RC_BIT, 2}}, - {8, &Jit64::subfic}, //"subfic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}}, - {10, &Jit64::cmpXX}, //"cmpli", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}}, - {11, &Jit64::cmpXX}, //"cmpi", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}}, - {12, &Jit64::reg_imm}, //"addic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}}, - {13, &Jit64::reg_imm}, //"addic_rc", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA | FL_SET_CR0}}, - {14, &Jit64::reg_imm}, //"addi", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}}, - {15, &Jit64::reg_imm}, //"addis", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}}, + {7, &Jit64::mulli}, // mulli + {8, &Jit64::subfic}, // subfic + {10, &Jit64::cmpXX}, // cmpli + {11, &Jit64::cmpXX}, // cmpi + {12, &Jit64::reg_imm}, // addic + {13, &Jit64::reg_imm}, // addic_rc + {14, &Jit64::reg_imm}, // addi + {15, &Jit64::reg_imm}, // addis - {20, &Jit64::rlwimix}, //"rlwimix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_A | FL_IN_S | FL_RC_BIT}}, - {21, &Jit64::rlwinmx}, //"rlwinmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {23, &Jit64::rlwnmx}, //"rlwnmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_IN_B | FL_RC_BIT}}, + {20, &Jit64::rlwimix}, // rlwimix + {21, &Jit64::rlwinmx}, // rlwinmx + {23, &Jit64::rlwnmx}, // rlwnmx - {24, &Jit64::reg_imm}, //"ori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {25, &Jit64::reg_imm}, //"oris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {26, &Jit64::reg_imm}, //"xori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {27, &Jit64::reg_imm}, //"xoris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {28, &Jit64::reg_imm}, //"andi_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}}, - {29, &Jit64::reg_imm}, //"andis_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}}, + {24, &Jit64::reg_imm}, // ori + {25, &Jit64::reg_imm}, // oris + {26, &Jit64::reg_imm}, // xori + {27, &Jit64::reg_imm}, // xoris + {28, &Jit64::reg_imm}, // andi_rc + {29, &Jit64::reg_imm}, // andis_rc - {32, &Jit64::lXXx}, //"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {33, &Jit64::lXXx}, //"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {34, &Jit64::lXXx}, //"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {35, &Jit64::lXXx}, //"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {40, &Jit64::lXXx}, //"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {41, &Jit64::lXXx}, //"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {42, &Jit64::lXXx}, //"lha", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {43, &Jit64::lXXx}, //"lhau", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, + {32, &Jit64::lXXx}, // lwz + {33, &Jit64::lXXx}, // lwzu + {34, &Jit64::lXXx}, // lbz + {35, &Jit64::lXXx}, // lbzu + {40, &Jit64::lXXx}, // lhz + {41, &Jit64::lXXx}, // lhzu + {42, &Jit64::lXXx}, // lha + {43, &Jit64::lXXx}, // lhau - {44, &Jit64::stX}, //"sth", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {45, &Jit64::stX}, //"sthu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, - {36, &Jit64::stX}, //"stw", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {37, &Jit64::stX}, //"stwu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, - {38, &Jit64::stX}, //"stb", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {39, &Jit64::stX}, //"stbu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, + {44, &Jit64::stX}, // sth + {45, &Jit64::stX}, // sthu + {36, &Jit64::stX}, // stw + {37, &Jit64::stX}, // stwu + {38, &Jit64::stX}, // stb + {39, &Jit64::stX}, // stbu - {46, &Jit64::lmw}, //"lmw", OPTYPE_SYSTEM, FL_EVIL, 10}}, - {47, &Jit64::stmw}, //"stmw", OPTYPE_SYSTEM, FL_EVIL, 10}}, + {46, &Jit64::lmw}, // lmw + {47, &Jit64::stmw}, // stmw - {48, &Jit64::lfXXX}, //"lfs", OPTYPE_LOADFP, FL_IN_A}}, - {49, &Jit64::lfXXX}, //"lfsu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}}, - {50, &Jit64::lfXXX}, //"lfd", OPTYPE_LOADFP, FL_IN_A}}, - {51, &Jit64::lfXXX}, //"lfdu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}}, + {48, &Jit64::lfXXX}, // lfs + {49, &Jit64::lfXXX}, // lfsu + {50, &Jit64::lfXXX}, // lfd + {51, &Jit64::lfXXX}, // lfdu - {52, &Jit64::stfXXX}, //"stfs", OPTYPE_STOREFP, FL_IN_A}}, - {53, &Jit64::stfXXX}, //"stfsu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}}, - {54, &Jit64::stfXXX}, //"stfd", OPTYPE_STOREFP, FL_IN_A}}, - {55, &Jit64::stfXXX}, //"stfdu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}}, + {52, &Jit64::stfXXX}, // stfs + {53, &Jit64::stfXXX}, // stfsu + {54, &Jit64::stfXXX}, // stfd + {55, &Jit64::stfXXX}, // stfdu - {56, &Jit64::psq_lXX}, //"psq_l", OPTYPE_PS, FL_IN_A}}, - {57, &Jit64::psq_lXX}, //"psq_lu", OPTYPE_PS, FL_OUT_A | FL_IN_A}}, - {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}}, + {56, &Jit64::psq_lXX}, // psq_l + {57, &Jit64::psq_lXX}, // psq_lu + {60, &Jit64::psq_stXX}, // psq_st + {61, &Jit64::psq_stXX}, // psq_stu //missing: 0, 1, 2, 5, 6, 9, 22, 30, 62, 58 }; static GekkoOPTemplate table4[] = { //SUBOP10 - {0, &Jit64::ps_cmpXX}, //"ps_cmpu0", OPTYPE_PS, FL_SET_CRn}}, - {32, &Jit64::ps_cmpXX}, //"ps_cmpo0", OPTYPE_PS, FL_SET_CRn}}, - {40, &Jit64::ps_sign}, //"ps_neg", OPTYPE_PS, FL_RC_BIT}}, - {136, &Jit64::ps_sign}, //"ps_nabs", OPTYPE_PS, FL_RC_BIT}}, - {264, &Jit64::ps_sign}, //"ps_abs", OPTYPE_PS, FL_RC_BIT}}, - {64, &Jit64::ps_cmpXX}, //"ps_cmpu1", OPTYPE_PS, FL_RC_BIT}}, - {72, &Jit64::ps_mr}, //"ps_mr", OPTYPE_PS, FL_RC_BIT}}, - {96, &Jit64::ps_cmpXX}, //"ps_cmpo1", OPTYPE_PS, FL_RC_BIT}}, - {528, &Jit64::ps_mergeXX}, //"ps_merge00", OPTYPE_PS, FL_RC_BIT}}, - {560, &Jit64::ps_mergeXX}, //"ps_merge01", OPTYPE_PS, FL_RC_BIT}}, - {592, &Jit64::ps_mergeXX}, //"ps_merge10", OPTYPE_PS, FL_RC_BIT}}, - {624, &Jit64::ps_mergeXX}, //"ps_merge11", OPTYPE_PS, FL_RC_BIT}}, + {0, &Jit64::ps_cmpXX}, // ps_cmpu0 + {32, &Jit64::ps_cmpXX}, // ps_cmpo0 + {40, &Jit64::ps_sign}, // ps_neg + {136, &Jit64::ps_sign}, // ps_nabs + {264, &Jit64::ps_sign}, // ps_abs + {64, &Jit64::ps_cmpXX}, // ps_cmpu1 + {72, &Jit64::ps_mr}, // ps_mr + {96, &Jit64::ps_cmpXX}, // ps_cmpo1 + {528, &Jit64::ps_mergeXX}, // ps_merge00 + {560, &Jit64::ps_mergeXX}, // ps_merge01 + {592, &Jit64::ps_mergeXX}, // ps_merge10 + {624, &Jit64::ps_mergeXX}, // ps_merge11 - {1014, &Jit64::FallBackToInterpreter}, //"dcbz_l", OPTYPE_SYSTEM, 0}}, + {1014, &Jit64::FallBackToInterpreter}, // dcbz_l }; static GekkoOPTemplate table4_2[] = { - {10, &Jit64::ps_sum}, //"ps_sum0", OPTYPE_PS, 0}}, - {11, &Jit64::ps_sum}, //"ps_sum1", OPTYPE_PS, 0}}, - {12, &Jit64::ps_muls}, //"ps_muls0", OPTYPE_PS, 0}}, - {13, &Jit64::ps_muls}, //"ps_muls1", OPTYPE_PS, 0}}, - {14, &Jit64::ps_maddXX}, //"ps_madds0", OPTYPE_PS, 0}}, - {15, &Jit64::ps_maddXX}, //"ps_madds1", OPTYPE_PS, 0}}, - {18, &Jit64::ps_arith}, //"ps_div", OPTYPE_PS, 0, 16}}, - {20, &Jit64::ps_arith}, //"ps_sub", OPTYPE_PS, 0}}, - {21, &Jit64::ps_arith}, //"ps_add", OPTYPE_PS, 0}}, - {23, &Jit64::ps_sel}, //"ps_sel", OPTYPE_PS, 0}}, - {24, &Jit64::ps_res}, //"ps_res", OPTYPE_PS, 0}}, - {25, &Jit64::ps_arith}, //"ps_mul", OPTYPE_PS, 0}}, - {26, &Jit64::ps_rsqrte}, //"ps_rsqrte", OPTYPE_PS, 0, 1}}, - {28, &Jit64::ps_maddXX}, //"ps_msub", OPTYPE_PS, 0}}, - {29, &Jit64::ps_maddXX}, //"ps_madd", OPTYPE_PS, 0}}, - {30, &Jit64::ps_maddXX}, //"ps_nmsub", OPTYPE_PS, 0}}, - {31, &Jit64::ps_maddXX}, //"ps_nmadd", OPTYPE_PS, 0}}, + {10, &Jit64::ps_sum}, // ps_sum0 + {11, &Jit64::ps_sum}, // ps_sum1 + {12, &Jit64::ps_muls}, // ps_muls0 + {13, &Jit64::ps_muls}, // ps_muls1 + {14, &Jit64::ps_maddXX}, // ps_madds0 + {15, &Jit64::ps_maddXX}, // ps_madds1 + {18, &Jit64::ps_arith}, // ps_div + {20, &Jit64::ps_arith}, // ps_sub + {21, &Jit64::ps_arith}, // ps_add + {23, &Jit64::ps_sel}, // ps_sel + {24, &Jit64::ps_res}, // ps_res + {25, &Jit64::ps_arith}, // ps_mul + {26, &Jit64::ps_rsqrte}, // ps_rsqrte + {28, &Jit64::ps_maddXX}, // ps_msub + {29, &Jit64::ps_maddXX}, // ps_madd + {30, &Jit64::ps_maddXX}, // ps_nmsub + {31, &Jit64::ps_maddXX}, // ps_nmadd }; static GekkoOPTemplate table4_3[] = { - {6, &Jit64::psq_lXX}, //"psq_lx", OPTYPE_PS, 0}}, - {7, &Jit64::psq_stXX}, //"psq_stx", OPTYPE_PS, 0}}, - {38, &Jit64::psq_lXX}, //"psq_lux", OPTYPE_PS, 0}}, - {39, &Jit64::psq_stXX}, //"psq_stux", OPTYPE_PS, 0}}, + {6, &Jit64::psq_lXX}, // psq_lx + {7, &Jit64::psq_stXX}, // psq_stx + {38, &Jit64::psq_lXX}, // psq_lux + {39, &Jit64::psq_stXX}, // psq_stux }; static GekkoOPTemplate table19[] = { - {528, &Jit64::bcctrx}, //"bcctrx", OPTYPE_BRANCH, FL_ENDBLOCK}}, - {16, &Jit64::bclrx}, //"bclrx", OPTYPE_BRANCH, FL_ENDBLOCK}}, - {257, &Jit64::crXXX}, //"crand", OPTYPE_CR, FL_EVIL}}, - {129, &Jit64::crXXX}, //"crandc", OPTYPE_CR, FL_EVIL}}, - {289, &Jit64::crXXX}, //"creqv", OPTYPE_CR, FL_EVIL}}, - {225, &Jit64::crXXX}, //"crnand", OPTYPE_CR, FL_EVIL}}, - {33, &Jit64::crXXX}, //"crnor", OPTYPE_CR, FL_EVIL}}, - {449, &Jit64::crXXX}, //"cror", OPTYPE_CR, FL_EVIL}}, - {417, &Jit64::crXXX}, //"crorc", OPTYPE_CR, FL_EVIL}}, - {193, &Jit64::crXXX}, //"crxor", OPTYPE_CR, FL_EVIL}}, + {528, &Jit64::bcctrx}, // bcctrx + {16, &Jit64::bclrx}, // bclrx + {257, &Jit64::crXXX}, // crand + {129, &Jit64::crXXX}, // crandc + {289, &Jit64::crXXX}, // creqv + {225, &Jit64::crXXX}, // crnand + {33, &Jit64::crXXX}, // crnor + {449, &Jit64::crXXX}, // cror + {417, &Jit64::crXXX}, // crorc + {193, &Jit64::crXXX}, // crxor - {150, &Jit64::DoNothing}, //"isync", OPTYPE_ICACHE, FL_EVIL}}, - {0, &Jit64::mcrf}, //"mcrf", OPTYPE_SYSTEM, FL_EVIL}}, + {150, &Jit64::DoNothing}, // isync + {0, &Jit64::mcrf}, // mcrf - {50, &Jit64::rfi}, //"rfi", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS, 1}}, - {18, &Jit64::FallBackToInterpreter}, //"rfid", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS}} + {50, &Jit64::rfi}, // rfi + {18, &Jit64::FallBackToInterpreter}, // rfid }; static GekkoOPTemplate table31[] = { - {266, &Jit64::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {778, &Jit64::addx}, //"addox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {10, &Jit64::arithcx}, //"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {522, &Jit64::arithcx}, //"addcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {138, &Jit64::arithXex}, //"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {650, &Jit64::arithXex}, //"addeox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {234, &Jit64::arithXex}, //"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {746, &Jit64::arithXex}, //"addmeox" - {202, &Jit64::arithXex}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {714, &Jit64::arithXex}, //"addzeox" - {491, &Jit64::divwx}, //"divwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {1003, &Jit64::divwx}, //"divwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {459, &Jit64::divwux}, //"divwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {971, &Jit64::divwux}, //"divwuox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {75, &Jit64::mulhwXx}, //"mulhwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {11, &Jit64::mulhwXx}, //"mulhwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {235, &Jit64::mullwx}, //"mullwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {747, &Jit64::mullwx}, //"mullwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {104, &Jit64::negx}, //"negx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {616, &Jit64::negx}, //"negox" - {40, &Jit64::subfx}, //"subfx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {552, &Jit64::subfx}, //"subfox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {8, &Jit64::arithcx}, //"subfcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {520, &Jit64::arithcx}, //"subfcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {136, &Jit64::arithXex}, //"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {648, &Jit64::arithXex}, //"subfeox" - {232, &Jit64::arithXex}, //"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {744, &Jit64::arithXex}, //"subfmeox" - {200, &Jit64::arithXex}, //"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {712, &Jit64::arithXex}, //"subfzeox" + {266, &Jit64::addx}, // addx + {778, &Jit64::addx}, // addox + {10, &Jit64::arithcx}, // addcx + {522, &Jit64::arithcx}, // addcox + {138, &Jit64::arithXex}, // addex + {650, &Jit64::arithXex}, // addeox + {234, &Jit64::arithXex}, // addmex + {746, &Jit64::arithXex}, // addmeox + {202, &Jit64::arithXex}, // addzex + {714, &Jit64::arithXex}, // addzeox + {491, &Jit64::divwx}, // divwx + {1003, &Jit64::divwx}, // divwox + {459, &Jit64::divwux}, // divwux + {971, &Jit64::divwux}, // divwuox + {75, &Jit64::mulhwXx}, // mulhwx + {11, &Jit64::mulhwXx}, // mulhwux + {235, &Jit64::mullwx}, // mullwx + {747, &Jit64::mullwx}, // mullwox + {104, &Jit64::negx}, // negx + {616, &Jit64::negx}, // negox + {40, &Jit64::subfx}, // subfx + {552, &Jit64::subfx}, // subfox + {8, &Jit64::arithcx}, // subfcx + {520, &Jit64::arithcx}, // subfcox + {136, &Jit64::arithXex}, // subfex + {648, &Jit64::arithXex}, // subfeox + {232, &Jit64::arithXex}, // subfmex + {744, &Jit64::arithXex}, // subfmeox + {200, &Jit64::arithXex}, // subfzex + {712, &Jit64::arithXex}, // subfzeox - {28, &Jit64::boolX}, //"andx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {60, &Jit64::boolX}, //"andcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {444, &Jit64::boolX}, //"orx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {124, &Jit64::boolX}, //"norx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {316, &Jit64::boolX}, //"xorx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {412, &Jit64::boolX}, //"orcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {476, &Jit64::boolX}, //"nandx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {284, &Jit64::boolX}, //"eqvx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {0, &Jit64::cmpXX}, //"cmp", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}}, - {32, &Jit64::cmpXX}, //"cmpl", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}}, - {26, &Jit64::cntlzwx}, //"cntlzwx",OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {922, &Jit64::extsXx}, //"extshx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {954, &Jit64::extsXx}, //"extsbx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {536, &Jit64::srwx}, //"srwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, - {792, &Jit64::srawx}, //"srawx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_SET_CA | FL_RC_BIT}}, - {824, &Jit64::srawix}, //"srawix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_SET_CA | FL_RC_BIT}}, - {24, &Jit64::slwx}, //"slwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, + {28, &Jit64::boolX}, // andx + {60, &Jit64::boolX}, // andcx + {444, &Jit64::boolX}, // orx + {124, &Jit64::boolX}, // norx + {316, &Jit64::boolX}, // xorx + {412, &Jit64::boolX}, // orcx + {476, &Jit64::boolX}, // nandx + {284, &Jit64::boolX}, // eqvx + {0, &Jit64::cmpXX}, // cmp + {32, &Jit64::cmpXX}, // cmpl + {26, &Jit64::cntlzwx}, // cntlzwx + {922, &Jit64::extsXx}, // extshx + {954, &Jit64::extsXx}, // extsbx + {536, &Jit64::srwx}, // srwx + {792, &Jit64::srawx}, // srawx + {824, &Jit64::srawix}, // srawix + {24, &Jit64::slwx}, // slwx - {54, &Jit64::FallBackToInterpreter}, //"dcbst", OPTYPE_DCACHE, 0, 4}}, - {86, &Jit64::FallBackToInterpreter}, //"dcbf", OPTYPE_DCACHE, 0, 4}}, - {246, &Jit64::dcbt }, //"dcbtst", OPTYPE_DCACHE, 0, 1}}, - {278, &Jit64::dcbt }, //"dcbt", OPTYPE_DCACHE, 0, 1}}, - {470, &Jit64::FallBackToInterpreter}, //"dcbi", OPTYPE_DCACHE, 0, 4}}, - {758, &Jit64::DoNothing}, //"dcba", OPTYPE_DCACHE, 0, 4}}, - {1014, &Jit64::dcbz}, //"dcbz", OPTYPE_DCACHE, 0, 4}}, + {54, &Jit64::FallBackToInterpreter}, // dcbst + {86, &Jit64::FallBackToInterpreter}, // dcbf + {246, &Jit64::dcbt }, // dcbtst + {278, &Jit64::dcbt }, // dcbt + {470, &Jit64::FallBackToInterpreter}, // dcbi + {758, &Jit64::DoNothing}, // dcba + {1014, &Jit64::dcbz}, // dcbz //load word - {23, &Jit64::lXXx}, //"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {55, &Jit64::lXXx}, //"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {23, &Jit64::lXXx}, // lwzx + {55, &Jit64::lXXx}, // lwzux //load halfword - {279, &Jit64::lXXx}, //"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {311, &Jit64::lXXx}, //"lhzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {279, &Jit64::lXXx}, // lhzx + {311, &Jit64::lXXx}, // lhzux //load halfword signextend - {343, &Jit64::lXXx}, //"lhax", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {375, &Jit64::lXXx}, //"lhaux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {343, &Jit64::lXXx}, // lhax + {375, &Jit64::lXXx}, // lhaux //load byte - {87, &Jit64::lXXx}, //"lbzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {119, &Jit64::lXXx}, //"lbzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {87, &Jit64::lXXx}, // lbzx + {119, &Jit64::lXXx}, // lbzux //load byte reverse - {534, &Jit64::lXXx}, //"lwbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {790, &Jit64::lXXx}, //"lhbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {534, &Jit64::lXXx}, // lwbrx + {790, &Jit64::lXXx}, // lhbrx // Conditional load/store (Wii SMP) - {150, &Jit64::FallBackToInterpreter}, //"stwcxd", OPTYPE_STORE, FL_EVIL | FL_SET_CR0}}, - {20, &Jit64::FallBackToInterpreter}, //"lwarx", OPTYPE_LOAD, FL_EVIL | FL_OUT_D | FL_IN_A0B | FL_SET_CR0}}, + {150, &Jit64::FallBackToInterpreter}, // stwcxd + {20, &Jit64::FallBackToInterpreter}, // lwarx //load string (interpret these) - {533, &Jit64::FallBackToInterpreter}, //"lswx", OPTYPE_LOAD, FL_EVIL | FL_IN_A | FL_OUT_D}}, - {597, &Jit64::FallBackToInterpreter}, //"lswi", OPTYPE_LOAD, FL_EVIL | FL_IN_AB | FL_OUT_D}}, + {533, &Jit64::FallBackToInterpreter}, // lswx + {597, &Jit64::FallBackToInterpreter}, // lswi //store word - {151, &Jit64::stXx}, //"stwx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {183, &Jit64::stXx}, //"stwux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + {151, &Jit64::stXx}, // stwx + {183, &Jit64::stXx}, // stwux //store halfword - {407, &Jit64::stXx}, //"sthx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {439, &Jit64::stXx}, //"sthux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + {407, &Jit64::stXx}, // sthx + {439, &Jit64::stXx}, // sthux //store byte - {215, &Jit64::stXx}, //"stbx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {247, &Jit64::stXx}, //"stbux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + {215, &Jit64::stXx}, // stbx + {247, &Jit64::stXx}, // stbux //store bytereverse - {662, &Jit64::stXx}, //"stwbrx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {918, &Jit64::stXx}, //"sthbrx", OPTYPE_STORE, FL_IN_A | FL_IN_B}}, + {662, &Jit64::stXx}, // stwbrx + {918, &Jit64::stXx}, // sthbrx - {661, &Jit64::FallBackToInterpreter}, //"stswx", OPTYPE_STORE, FL_EVIL}}, - {725, &Jit64::FallBackToInterpreter}, //"stswi", OPTYPE_STORE, FL_EVIL}}, + {661, &Jit64::FallBackToInterpreter}, // stswx + {725, &Jit64::FallBackToInterpreter}, // stswi // fp load/store - {535, &Jit64::lfXXX}, //"lfsx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}}, - {567, &Jit64::lfXXX}, //"lfsux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}}, - {599, &Jit64::lfXXX}, //"lfdx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}}, - {631, &Jit64::lfXXX}, //"lfdux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}}, + {535, &Jit64::lfXXX}, // lfsx + {567, &Jit64::lfXXX}, // lfsux + {599, &Jit64::lfXXX}, // lfdx + {631, &Jit64::lfXXX}, // lfdux - {663, &Jit64::stfXXX}, //"stfsx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, - {695, &Jit64::stfXXX}, //"stfsux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}}, - {727, &Jit64::stfXXX}, //"stfdx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, - {759, &Jit64::stfXXX}, //"stfdux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}}, - {983, &Jit64::stfiwx}, //"stfiwx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, + {663, &Jit64::stfXXX}, // stfsx + {695, &Jit64::stfXXX}, // stfsux + {727, &Jit64::stfXXX}, // stfdx + {759, &Jit64::stfXXX}, // stfdux + {983, &Jit64::stfiwx}, // stfiwx - {19, &Jit64::mfcr}, //"mfcr", OPTYPE_SYSTEM, FL_OUT_D}}, - {83, &Jit64::mfmsr}, //"mfmsr", OPTYPE_SYSTEM, FL_OUT_D}}, - {144, &Jit64::mtcrf}, //"mtcrf", OPTYPE_SYSTEM, 0}}, - {146, &Jit64::mtmsr}, //"mtmsr", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {210, &Jit64::FallBackToInterpreter}, //"mtsr", OPTYPE_SYSTEM, 0}}, - {242, &Jit64::FallBackToInterpreter}, //"mtsrin", OPTYPE_SYSTEM, 0}}, - {339, &Jit64::mfspr}, //"mfspr", OPTYPE_SPR, FL_OUT_D}}, - {467, &Jit64::mtspr}, //"mtspr", OPTYPE_SPR, 0, 2}}, - {371, &Jit64::mftb}, //"mftb", OPTYPE_SYSTEM, FL_OUT_D | FL_TIMER}}, - {512, &Jit64::mcrxr}, //"mcrxr", OPTYPE_SYSTEM, FL_READ_CA | FL_SET_CA}}, - {595, &Jit64::FallBackToInterpreter}, //"mfsr", OPTYPE_SYSTEM, FL_OUT_D, 2}}, - {659, &Jit64::FallBackToInterpreter}, //"mfsrin", OPTYPE_SYSTEM, FL_OUT_D, 2}}, + {19, &Jit64::mfcr}, // mfcr + {83, &Jit64::mfmsr}, // mfmsr + {144, &Jit64::mtcrf}, // mtcrf + {146, &Jit64::mtmsr}, // mtmsr + {210, &Jit64::FallBackToInterpreter}, // mtsr + {242, &Jit64::FallBackToInterpreter}, // mtsrin + {339, &Jit64::mfspr}, // mfspr + {467, &Jit64::mtspr}, // mtspr + {371, &Jit64::mftb}, // mftb + {512, &Jit64::mcrxr}, // mcrxr + {595, &Jit64::FallBackToInterpreter}, // mfsr + {659, &Jit64::FallBackToInterpreter}, // mfsrin - {4, &Jit64::twX}, //"tw", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, - {598, &Jit64::DoNothing}, //"sync", OPTYPE_SYSTEM, 0, 2}}, - {982, &Jit64::icbi}, //"icbi", OPTYPE_SYSTEM, FL_ENDBLOCK, 3}}, + {4, &Jit64::twX}, // tw + {598, &Jit64::DoNothing}, // sync + {982, &Jit64::icbi}, // icbi // Unused instructions on GC - {310, &Jit64::FallBackToInterpreter}, //"eciwx", OPTYPE_INTEGER, FL_RC_BIT}}, - {438, &Jit64::FallBackToInterpreter}, //"ecowx", OPTYPE_INTEGER, FL_RC_BIT}}, - {854, &Jit64::DoNothing}, //"eieio", OPTYPE_INTEGER, FL_RC_BIT}}, - {306, &Jit64::FallBackToInterpreter}, //"tlbie", OPTYPE_SYSTEM, 0}}, - {370, &Jit64::FallBackToInterpreter}, //"tlbia", OPTYPE_SYSTEM, 0}}, - {566, &Jit64::DoNothing}, //"tlbsync", OPTYPE_SYSTEM, 0}}, + {310, &Jit64::FallBackToInterpreter}, // eciwx + {438, &Jit64::FallBackToInterpreter}, // ecowx + {854, &Jit64::DoNothing}, // eieio + {306, &Jit64::FallBackToInterpreter}, // tlbie + {370, &Jit64::FallBackToInterpreter}, // tlbia + {566, &Jit64::DoNothing}, // tlbsync }; static GekkoOPTemplate table59[] = { - {18, &Jit64::fp_arith}, //{"fdivsx", OPTYPE_FPU, FL_RC_BIT_F, 16}}, - {20, &Jit64::fp_arith}, //"fsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {21, &Jit64::fp_arith}, //"faddsx", OPTYPE_FPU, FL_RC_BIT_F}}, -// {22, &Jit64::FallBackToInterpreter}, //"fsqrtsx", OPTYPE_FPU, FL_RC_BIT_F}}, // Not implemented on gekko - {24, &Jit64::fresx}, //"fresx", OPTYPE_FPU, FL_RC_BIT_F}}, - {25, &Jit64::fp_arith}, //"fmulsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {28, &Jit64::fmaddXX}, //"fmsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {29, &Jit64::fmaddXX}, //"fmaddsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {30, &Jit64::fmaddXX}, //"fnmsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {31, &Jit64::fmaddXX}, //"fnmaddsx", OPTYPE_FPU, FL_RC_BIT_F}}, + {18, &Jit64::fp_arith}, // fdivsx + {20, &Jit64::fp_arith}, // fsubsx + {21, &Jit64::fp_arith}, // faddsx +// {22, &Jit64::FallBackToInterpreter}, // fsqrtsx + {24, &Jit64::fresx}, // fresx + {25, &Jit64::fp_arith}, // fmulsx + {28, &Jit64::fmaddXX}, // fmsubsx + {29, &Jit64::fmaddXX}, // fmaddsx + {30, &Jit64::fmaddXX}, // fnmsubsx + {31, &Jit64::fmaddXX}, // fnmaddsx }; static GekkoOPTemplate table63[] = { - {264, &Jit64::fsign}, //"fabsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {32, &Jit64::fcmpx}, //"fcmpo", OPTYPE_FPU, FL_RC_BIT_F}}, - {0, &Jit64::fcmpx}, //"fcmpu", OPTYPE_FPU, FL_RC_BIT_F}}, - {14, &Jit64::fctiwx}, //"fctiwx", OPTYPE_FPU, FL_RC_BIT_F}}, - {15, &Jit64::fctiwx}, //"fctiwzx", OPTYPE_FPU, FL_RC_BIT_F}}, - {72, &Jit64::fmrx}, //"fmrx", OPTYPE_FPU, FL_RC_BIT_F}}, - {136, &Jit64::fsign}, //"fnabsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {40, &Jit64::fsign}, //"fnegx", OPTYPE_FPU, FL_RC_BIT_F}}, - {12, &Jit64::frspx}, //"frspx", OPTYPE_FPU, FL_RC_BIT_F}}, + {264, &Jit64::fsign}, // fabsx + {32, &Jit64::fcmpx}, // fcmpo + {0, &Jit64::fcmpx}, // fcmpu + {14, &Jit64::fctiwx}, // fctiwx + {15, &Jit64::fctiwx}, // fctiwzx + {72, &Jit64::fmrx}, // fmrx + {136, &Jit64::fsign}, // fnabsx + {40, &Jit64::fsign}, // fnegx + {12, &Jit64::frspx}, // frspx - {64, &Jit64::FallBackToInterpreter}, //"mcrfs", OPTYPE_SYSTEMFP, 0}}, - {583, &Jit64::FallBackToInterpreter}, //"mffsx", OPTYPE_SYSTEMFP, 0}}, - {70, &Jit64::FallBackToInterpreter}, //"mtfsb0x", OPTYPE_SYSTEMFP, 0, 2}}, - {38, &Jit64::FallBackToInterpreter}, //"mtfsb1x", OPTYPE_SYSTEMFP, 0, 2}}, - {134, &Jit64::FallBackToInterpreter}, //"mtfsfix", OPTYPE_SYSTEMFP, 0, 2}}, - {711, &Jit64::FallBackToInterpreter}, //"mtfsfx", OPTYPE_SYSTEMFP, 0, 2}}, + {64, &Jit64::FallBackToInterpreter}, // mcrfs + {583, &Jit64::FallBackToInterpreter}, // mffsx + {70, &Jit64::FallBackToInterpreter}, // mtfsb0x + {38, &Jit64::FallBackToInterpreter}, // mtfsb1x + {134, &Jit64::FallBackToInterpreter}, // mtfsfix + {711, &Jit64::FallBackToInterpreter}, // mtfsfx }; static GekkoOPTemplate table63_2[] = { - {18, &Jit64::fp_arith}, //"fdivx", OPTYPE_FPU, FL_RC_BIT_F, 30}}, - {20, &Jit64::fp_arith}, //"fsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {21, &Jit64::fp_arith}, //"faddx", OPTYPE_FPU, FL_RC_BIT_F}}, - {22, &Jit64::FallBackToInterpreter}, //"fsqrtx", OPTYPE_FPU, FL_RC_BIT_F}}, - {23, &Jit64::fselx}, //"fselx", OPTYPE_FPU, FL_RC_BIT_F}}, - {25, &Jit64::fp_arith}, //"fmulx", OPTYPE_FPU, FL_RC_BIT_F}}, - {26, &Jit64::frsqrtex}, //"frsqrtex", OPTYPE_FPU, FL_RC_BIT_F}}, - {28, &Jit64::fmaddXX}, //"fmsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {29, &Jit64::fmaddXX}, //"fmaddx", OPTYPE_FPU, FL_RC_BIT_F}}, - {30, &Jit64::fmaddXX}, //"fnmsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {31, &Jit64::fmaddXX}, //"fnmaddx", OPTYPE_FPU, FL_RC_BIT_F}}, + {18, &Jit64::fp_arith}, // fdivx + {20, &Jit64::fp_arith}, // fsubx + {21, &Jit64::fp_arith}, // faddx + {22, &Jit64::FallBackToInterpreter}, // fsqrtx + {23, &Jit64::fselx}, // fselx + {25, &Jit64::fp_arith}, // fmulx + {26, &Jit64::frsqrtex}, // frsqrtex + {28, &Jit64::fmaddXX}, // fmsubx + {29, &Jit64::fmaddXX}, // fmaddx + {30, &Jit64::fmaddXX}, // fnmsubx + {31, &Jit64::fmaddXX}, // fnmaddx }; namespace Jit64Tables diff --git a/Source/Core/Core/PowerPC/JitArm32/JitArm_Tables.cpp b/Source/Core/Core/PowerPC/JitArm32/JitArm_Tables.cpp index 95841b7ee4..b422c1c297 100644 --- a/Source/Core/Core/PowerPC/JitArm32/JitArm_Tables.cpp +++ b/Source/Core/Core/PowerPC/JitArm32/JitArm_Tables.cpp @@ -31,335 +31,335 @@ struct GekkoOPTemplate static GekkoOPTemplate primarytable[] = { - {4, &JitArm::DynaRunTable4}, //"RunTable4", OPTYPE_SUBTABLE | (4<<24), 0}}, - {19, &JitArm::DynaRunTable19}, //"RunTable19", OPTYPE_SUBTABLE | (19<<24), 0}}, - {31, &JitArm::DynaRunTable31}, //"RunTable31", OPTYPE_SUBTABLE | (31<<24), 0}}, - {59, &JitArm::DynaRunTable59}, //"RunTable59", OPTYPE_SUBTABLE | (59<<24), 0}}, - {63, &JitArm::DynaRunTable63}, //"RunTable63", OPTYPE_SUBTABLE | (63<<24), 0}}, + {4, &JitArm::DynaRunTable4}, // RunTable4 + {19, &JitArm::DynaRunTable19}, // RunTable19 + {31, &JitArm::DynaRunTable31}, // RunTable31 + {59, &JitArm::DynaRunTable59}, // RunTable59 + {63, &JitArm::DynaRunTable63}, // RunTable63 - {16, &JitArm::bcx}, //"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {18, &JitArm::bx}, //"bx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, + {16, &JitArm::bcx}, // bcx + {18, &JitArm::bx}, // bx - {3, &JitArm::twx}, //"twi", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {17, &JitArm::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, + {3, &JitArm::twx}, // twi + {17, &JitArm::sc}, // sc - {7, &JitArm::arith}, //"mulli", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_RC_BIT, 2}}, - {8, &JitArm::subfic}, //"subfic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}}, - {10, &JitArm::cmpli}, //"cmpli", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}}, - {11, &JitArm::cmpi}, //"cmpi", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}}, - {12, &JitArm::arith}, //"addic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}}, - {13, &JitArm::arith}, //"addic_rc", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CR0}}, - {14, &JitArm::arith}, //"addi", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}}, - {15, &JitArm::arith}, //"addis", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}}, + {7, &JitArm::arith}, // mulli + {8, &JitArm::subfic}, // subfic + {10, &JitArm::cmpli}, // cmpli + {11, &JitArm::cmpi}, // cmpi + {12, &JitArm::arith}, // addic + {13, &JitArm::arith}, // addic_rc + {14, &JitArm::arith}, // addi + {15, &JitArm::arith}, // addis - {20, &JitArm::rlwimix}, //"rlwimix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_A | FL_IN_S | FL_RC_BIT}}, - {21, &JitArm::rlwinmx}, //"rlwinmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {23, &JitArm::rlwnmx}, //"rlwnmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_IN_B | FL_RC_BIT}}, + {20, &JitArm::rlwimix}, // rlwimix + {21, &JitArm::rlwinmx}, // rlwinmx + {23, &JitArm::rlwnmx}, // rlwnmx - {24, &JitArm::arith}, //"ori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {25, &JitArm::arith}, //"oris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {26, &JitArm::arith}, //"xori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {27, &JitArm::arith}, //"xoris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {28, &JitArm::arith}, //"andi_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}}, - {29, &JitArm::arith}, //"andis_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}}, + {24, &JitArm::arith}, // ori + {25, &JitArm::arith}, // oris + {26, &JitArm::arith}, // xori + {27, &JitArm::arith}, // xoris + {28, &JitArm::arith}, // andi_rc + {29, &JitArm::arith}, // andis_rc - {32, &JitArm::lXX}, //"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {33, &JitArm::lXX}, //"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {34, &JitArm::lXX}, //"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {35, &JitArm::lXX}, //"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {40, &JitArm::lXX}, //"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {41, &JitArm::lXX}, //"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {42, &JitArm::lXX}, //"lha", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {43, &JitArm::lXX}, //"lhau", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, + {32, &JitArm::lXX}, // lwz + {33, &JitArm::lXX}, // lwzu + {34, &JitArm::lXX}, // lbz + {35, &JitArm::lXX}, // lbzu + {40, &JitArm::lXX}, // lhz + {41, &JitArm::lXX}, // lhzu + {42, &JitArm::lXX}, // lha + {43, &JitArm::lXX}, // lhau - {44, &JitArm::stX}, //"sth", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {45, &JitArm::stX}, //"sthu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, - {36, &JitArm::stX}, //"stw", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {37, &JitArm::stX}, //"stwu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, - {38, &JitArm::stX}, //"stb", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {39, &JitArm::stX}, //"stbu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, + {44, &JitArm::stX}, // sth + {45, &JitArm::stX}, // sthu + {36, &JitArm::stX}, // stw + {37, &JitArm::stX}, // stwu + {38, &JitArm::stX}, // stb + {39, &JitArm::stX}, // stbu - {46, &JitArm::lmw}, //"lmw", OPTYPE_SYSTEM, FL_EVIL, 10}}, - {47, &JitArm::stmw}, //"stmw", OPTYPE_SYSTEM, FL_EVIL, 10}}, + {46, &JitArm::lmw}, // lmw + {47, &JitArm::stmw}, // stmw - {48, &JitArm::lfXX}, //"lfs", OPTYPE_LOADFP, FL_IN_A}}, - {49, &JitArm::lfXX}, //"lfsu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}}, - {50, &JitArm::lfXX}, //"lfd", OPTYPE_LOADFP, FL_IN_A}}, - {51, &JitArm::lfXX}, //"lfdu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}}, + {48, &JitArm::lfXX}, // lfs + {49, &JitArm::lfXX}, // lfsu + {50, &JitArm::lfXX}, // lfd + {51, &JitArm::lfXX}, // lfdu - {52, &JitArm::stfXX}, //"stfs", OPTYPE_STOREFP, FL_IN_A}}, - {53, &JitArm::stfXX}, //"stfsu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}}, - {54, &JitArm::stfXX}, //"stfd", OPTYPE_STOREFP, FL_IN_A}}, - {55, &JitArm::stfXX}, //"stfdu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}}, + {52, &JitArm::stfXX}, // stfs + {53, &JitArm::stfXX}, // stfsu + {54, &JitArm::stfXX}, // stfd + {55, &JitArm::stfXX}, // stfdu - {56, &JitArm::psq_l}, //"psq_l", OPTYPE_PS, FL_IN_A}}, - {57, &JitArm::psq_l}, //"psq_lu", OPTYPE_PS, FL_OUT_A | FL_IN_A}}, - {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}}, + {56, &JitArm::psq_l}, // psq_l + {57, &JitArm::psq_l}, // psq_lu + {60, &JitArm::psq_st}, // psq_st + {61, &JitArm::psq_st}, // psq_stu //missing: 0, 1, 2, 5, 6, 9, 22, 30, 62, 58 }; static GekkoOPTemplate table4[] = { //SUBOP10 - {0, &JitArm::FallBackToInterpreter}, //"ps_cmpu0", OPTYPE_PS, FL_SET_CRn}}, - {32, &JitArm::FallBackToInterpreter}, //"ps_cmpo0", OPTYPE_PS, FL_SET_CRn}}, - {40, &JitArm::ps_neg}, //"ps_neg", OPTYPE_PS, FL_RC_BIT}}, - {136, &JitArm::ps_nabs}, //"ps_nabs", OPTYPE_PS, FL_RC_BIT}}, - {264, &JitArm::ps_abs}, //"ps_abs", OPTYPE_PS, FL_RC_BIT}}, - {64, &JitArm::FallBackToInterpreter}, //"ps_cmpu1", OPTYPE_PS, FL_RC_BIT}}, - {72, &JitArm::ps_mr}, //"ps_mr", OPTYPE_PS, FL_RC_BIT}}, - {96, &JitArm::FallBackToInterpreter}, //"ps_cmpo1", OPTYPE_PS, FL_RC_BIT}}, - {528, &JitArm::ps_merge00}, //"ps_merge00", OPTYPE_PS, FL_RC_BIT}}, - {560, &JitArm::ps_merge01}, //"ps_merge01", OPTYPE_PS, FL_RC_BIT}}, - {592, &JitArm::ps_merge10}, //"ps_merge10", OPTYPE_PS, FL_RC_BIT}}, - {624, &JitArm::ps_merge11}, //"ps_merge11", OPTYPE_PS, FL_RC_BIT}}, + {0, &JitArm::FallBackToInterpreter}, // ps_cmpu0 + {32, &JitArm::FallBackToInterpreter}, // ps_cmpo0 + {40, &JitArm::ps_neg}, // ps_neg + {136, &JitArm::ps_nabs}, // ps_nabs + {264, &JitArm::ps_abs}, // ps_abs + {64, &JitArm::FallBackToInterpreter}, // ps_cmpu1 + {72, &JitArm::ps_mr}, // ps_mr + {96, &JitArm::FallBackToInterpreter}, // ps_cmpo1 + {528, &JitArm::ps_merge00}, // ps_merge00 + {560, &JitArm::ps_merge01}, // ps_merge01 + {592, &JitArm::ps_merge10}, // ps_merge10 + {624, &JitArm::ps_merge11}, // ps_merge11 - {1014, &JitArm::FallBackToInterpreter}, //"dcbz_l", OPTYPE_SYSTEM, 0}}, + {1014, &JitArm::FallBackToInterpreter}, // dcbz_l }; static GekkoOPTemplate table4_2[] = { - {10, &JitArm::ps_sum0}, //"ps_sum0", OPTYPE_PS, 0}}, - {11, &JitArm::ps_sum1}, //"ps_sum1", OPTYPE_PS, 0}}, - {12, &JitArm::ps_muls0}, //"ps_muls0", OPTYPE_PS, 0}}, - {13, &JitArm::ps_muls1}, //"ps_muls1", OPTYPE_PS, 0}}, - {14, &JitArm::ps_madds0}, //"ps_madds0", OPTYPE_PS, 0}}, - {15, &JitArm::ps_madds1}, //"ps_madds1", OPTYPE_PS, 0}}, - {18, &JitArm::ps_div}, //"ps_div", OPTYPE_PS, 0, 16}}, - {20, &JitArm::ps_sub}, //"ps_sub", OPTYPE_PS, 0}}, - {21, &JitArm::ps_add}, //"ps_add", OPTYPE_PS, 0}}, - {23, &JitArm::ps_sel}, //"ps_sel", OPTYPE_PS, 0}}, - {24, &JitArm::ps_res}, //"ps_res", OPTYPE_PS, 0}}, - {25, &JitArm::ps_mul}, //"ps_mul", OPTYPE_PS, 0}}, - {26, &JitArm::ps_rsqrte}, //"ps_rsqrte", OPTYPE_PS, 0, 1}}, - {28, &JitArm::ps_msub}, //"ps_msub", OPTYPE_PS, 0}}, - {29, &JitArm::ps_madd}, //"ps_madd", OPTYPE_PS, 0}}, - {30, &JitArm::ps_nmsub}, //"ps_nmsub", OPTYPE_PS, 0}}, - {31, &JitArm::ps_nmadd}, //"ps_nmadd", OPTYPE_PS, 0}}, + {10, &JitArm::ps_sum0}, // ps_sum0 + {11, &JitArm::ps_sum1}, // ps_sum1 + {12, &JitArm::ps_muls0}, // ps_muls0 + {13, &JitArm::ps_muls1}, // ps_muls1 + {14, &JitArm::ps_madds0}, // ps_madds0 + {15, &JitArm::ps_madds1}, // ps_madds1 + {18, &JitArm::ps_div}, // ps_div + {20, &JitArm::ps_sub}, // ps_sub + {21, &JitArm::ps_add}, // ps_add + {23, &JitArm::ps_sel}, // ps_sel + {24, &JitArm::ps_res}, // ps_res + {25, &JitArm::ps_mul}, // ps_mul + {26, &JitArm::ps_rsqrte}, // ps_rsqrte + {28, &JitArm::ps_msub}, // ps_msub + {29, &JitArm::ps_madd}, // ps_madd + {30, &JitArm::ps_nmsub}, // ps_nmsub + {31, &JitArm::ps_nmadd}, // ps_nmadd }; static GekkoOPTemplate table4_3[] = { - {6, &JitArm::psq_lx}, //"psq_lx", OPTYPE_PS, 0}}, - {7, &JitArm::psq_stx}, //"psq_stx", OPTYPE_PS, 0}}, - {38, &JitArm::psq_lx}, //"psq_lux", OPTYPE_PS, 0}}, - {39, &JitArm::psq_stx}, //"psq_stux", OPTYPE_PS, 0}}, + {6, &JitArm::psq_lx}, // psq_lx + {7, &JitArm::psq_stx}, // psq_stx + {38, &JitArm::psq_lx}, // psq_lux + {39, &JitArm::psq_stx}, // psq_stux }; static GekkoOPTemplate table19[] = { - {528, &JitArm::bcctrx}, //"bcctrx", OPTYPE_BRANCH, FL_ENDBLOCK}}, - {16, &JitArm::bclrx}, //"bclrx", OPTYPE_BRANCH, FL_ENDBLOCK}}, - {257, &JitArm::FallBackToInterpreter}, //"crand", OPTYPE_CR, FL_EVIL}}, - {129, &JitArm::FallBackToInterpreter}, //"crandc", OPTYPE_CR, FL_EVIL}}, - {289, &JitArm::FallBackToInterpreter}, //"creqv", OPTYPE_CR, FL_EVIL}}, - {225, &JitArm::FallBackToInterpreter}, //"crnand", OPTYPE_CR, FL_EVIL}}, - {33, &JitArm::FallBackToInterpreter}, //"crnor", OPTYPE_CR, FL_EVIL}}, - {449, &JitArm::FallBackToInterpreter}, //"cror", OPTYPE_CR, FL_EVIL}}, - {417, &JitArm::FallBackToInterpreter}, //"crorc", OPTYPE_CR, FL_EVIL}}, - {193, &JitArm::FallBackToInterpreter}, //"crxor", OPTYPE_CR, FL_EVIL}}, + {528, &JitArm::bcctrx}, // bcctrx + {16, &JitArm::bclrx}, // bclrx + {257, &JitArm::FallBackToInterpreter}, // crand + {129, &JitArm::FallBackToInterpreter}, // crandc + {289, &JitArm::FallBackToInterpreter}, // creqv + {225, &JitArm::FallBackToInterpreter}, // crnand + {33, &JitArm::FallBackToInterpreter}, // crnor + {449, &JitArm::FallBackToInterpreter}, // cror + {417, &JitArm::FallBackToInterpreter}, // crorc + {193, &JitArm::FallBackToInterpreter}, // crxor - {150, &JitArm::DoNothing}, //"isync", OPTYPE_ICACHE, FL_EVIL}}, - {0, &JitArm::mcrf}, //"mcrf", OPTYPE_SYSTEM, FL_EVIL}}, + {150, &JitArm::DoNothing}, // isync + {0, &JitArm::mcrf}, // mcrf - {50, &JitArm::rfi}, //"rfi", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS, 1}}, - {18, &JitArm::Break}, //"rfid", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS}} + {50, &JitArm::rfi}, // rfi + {18, &JitArm::Break}, // rfid }; static GekkoOPTemplate table31[] = { - {266, &JitArm::arith}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {778, &JitArm::arith}, //"addox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {10, &JitArm::arith}, //"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {522, &JitArm::arith}, //"addcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {138, &JitArm::addex}, //"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {650, &JitArm::addex}, //"addeox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {234, &JitArm::FallBackToInterpreter}, //"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {746, &JitArm::FallBackToInterpreter}, //"addmeox" - {202, &JitArm::FallBackToInterpreter}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {714, &JitArm::FallBackToInterpreter}, //"addzeox" - {491, &JitArm::FallBackToInterpreter}, //"divwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {1003, &JitArm::FallBackToInterpreter}, //"divwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {459, &JitArm::FallBackToInterpreter}, //"divwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {971, &JitArm::FallBackToInterpreter}, //"divwuox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {75, &JitArm::FallBackToInterpreter}, //"mulhwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {11, &JitArm::mulhwux}, //"mulhwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {235, &JitArm::arith}, //"mullwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {747, &JitArm::arith}, //"mullwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {104, &JitArm::negx}, //"negx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {616, &JitArm::negx}, //"negox" - {40, &JitArm::arith}, //"subfx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {552, &JitArm::arith}, //"subfox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {8, &JitArm::FallBackToInterpreter}, //"subfcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {520, &JitArm::FallBackToInterpreter}, //"subfcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {136, &JitArm::FallBackToInterpreter}, //"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {648, &JitArm::FallBackToInterpreter}, //"subfeox" - {232, &JitArm::FallBackToInterpreter}, //"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {744, &JitArm::FallBackToInterpreter}, //"subfmeox" - {200, &JitArm::FallBackToInterpreter}, //"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {712, &JitArm::FallBackToInterpreter}, //"subfzeox" + {266, &JitArm::arith}, // addx + {778, &JitArm::arith}, // addox + {10, &JitArm::arith}, // addcx + {522, &JitArm::arith}, // addcox + {138, &JitArm::addex}, // addex + {650, &JitArm::addex}, // addeox + {234, &JitArm::FallBackToInterpreter}, // addmex + {746, &JitArm::FallBackToInterpreter}, // addmeox + {202, &JitArm::FallBackToInterpreter}, // addzex + {714, &JitArm::FallBackToInterpreter}, // addzeox + {491, &JitArm::FallBackToInterpreter}, // divwx + {1003, &JitArm::FallBackToInterpreter}, // divwox + {459, &JitArm::FallBackToInterpreter}, // divwux + {971, &JitArm::FallBackToInterpreter}, // divwuox + {75, &JitArm::FallBackToInterpreter}, // mulhwx + {11, &JitArm::mulhwux}, // mulhwux + {235, &JitArm::arith}, // mullwx + {747, &JitArm::arith}, // mullwox + {104, &JitArm::negx}, // negx + {616, &JitArm::negx}, // negox + {40, &JitArm::arith}, // subfx + {552, &JitArm::arith}, // subfox + {8, &JitArm::FallBackToInterpreter}, // subfcx + {520, &JitArm::FallBackToInterpreter}, // subfcox + {136, &JitArm::FallBackToInterpreter}, // subfex + {648, &JitArm::FallBackToInterpreter}, // subfeox + {232, &JitArm::FallBackToInterpreter}, // subfmex + {744, &JitArm::FallBackToInterpreter}, // subfmeox + {200, &JitArm::FallBackToInterpreter}, // subfzex + {712, &JitArm::FallBackToInterpreter}, // subfzeox - {28, &JitArm::arith}, //"andx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {60, &JitArm::arith}, //"andcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {444, &JitArm::arith}, //"orx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {124, &JitArm::arith}, //"norx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {316, &JitArm::arith}, //"xorx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {412, &JitArm::arith}, //"orcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {476, &JitArm::arith}, //"nandx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {284, &JitArm::arith}, //"eqvx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {0, &JitArm::cmp}, //"cmp", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}}, - {32, &JitArm::cmpl}, //"cmpl", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}}, - {26, &JitArm::cntlzwx}, //"cntlzwx",OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {922, &JitArm::extshx}, //"extshx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {954, &JitArm::extsbx}, //"extsbx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {536, &JitArm::arith}, //"srwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, - {792, &JitArm::arith}, //"srawx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, - {824, &JitArm::srawix}, //"srawix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, - {24, &JitArm::arith}, //"slwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, + {28, &JitArm::arith}, // andx + {60, &JitArm::arith}, // andcx + {444, &JitArm::arith}, // orx + {124, &JitArm::arith}, // norx + {316, &JitArm::arith}, // xorx + {412, &JitArm::arith}, // orcx + {476, &JitArm::arith}, // nandx + {284, &JitArm::arith}, // eqvx + {0, &JitArm::cmp}, // cmp + {32, &JitArm::cmpl}, // cmpl + {26, &JitArm::cntlzwx}, // cntlzwx + {922, &JitArm::extshx}, // extshx + {954, &JitArm::extsbx}, // extsbx + {536, &JitArm::arith}, // srwx + {792, &JitArm::arith}, // srawx + {824, &JitArm::srawix}, // srawix + {24, &JitArm::arith}, // slwx - {54, &JitArm::dcbst}, //"dcbst", OPTYPE_DCACHE, 0, 4}}, - {86, &JitArm::FallBackToInterpreter}, //"dcbf", OPTYPE_DCACHE, 0, 4}}, - {246, &JitArm::DoNothing}, //"dcbtst", OPTYPE_DCACHE, 0, 1}}, - {278, &JitArm::DoNothing}, //"dcbt", OPTYPE_DCACHE, 0, 1}}, - {470, &JitArm::FallBackToInterpreter}, //"dcbi", OPTYPE_DCACHE, 0, 4}}, - {758, &JitArm::DoNothing}, //"dcba", OPTYPE_DCACHE, 0, 4}}, - {1014, &JitArm::FallBackToInterpreter}, //"dcbz", OPTYPE_DCACHE, 0, 4}}, + {54, &JitArm::dcbst}, // dcbst + {86, &JitArm::FallBackToInterpreter}, // dcbf + {246, &JitArm::DoNothing}, // dcbtst + {278, &JitArm::DoNothing}, // dcbt + {470, &JitArm::FallBackToInterpreter}, // dcbi + {758, &JitArm::DoNothing}, // dcba + {1014, &JitArm::FallBackToInterpreter}, // dcbz //load word - {23, &JitArm::lXX}, //"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {55, &JitArm::FallBackToInterpreter}, //"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {23, &JitArm::lXX}, // lwzx + {55, &JitArm::FallBackToInterpreter}, // lwzux //load halfword - {279, &JitArm::lXX}, //"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {311, &JitArm::lXX}, //"lhzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {279, &JitArm::lXX}, // lhzx + {311, &JitArm::lXX}, // lhzux //load halfword signextend - {343, &JitArm::lXX}, //"lhax", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {375, &JitArm::lXX}, //"lhaux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {343, &JitArm::lXX}, // lhax + {375, &JitArm::lXX}, // lhaux //load byte - {87, &JitArm::lXX}, //"lbzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {119, &JitArm::lXX}, //"lbzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {87, &JitArm::lXX}, // lbzx + {119, &JitArm::lXX}, // lbzux //load byte reverse - {534, &JitArm::lXX}, //"lwbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {790, &JitArm::lXX}, //"lhbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {534, &JitArm::lXX}, // lwbrx + {790, &JitArm::lXX}, // lhbrx // Conditional load/store (Wii SMP) - {150, &JitArm::FallBackToInterpreter}, //"stwcxd", OPTYPE_STORE, FL_EVIL | FL_SET_CR0}}, - {20, &JitArm::FallBackToInterpreter}, //"lwarx", OPTYPE_LOAD, FL_EVIL | FL_OUT_D | FL_IN_A0B | FL_SET_CR0}}, + {150, &JitArm::FallBackToInterpreter}, // stwcxd + {20, &JitArm::FallBackToInterpreter}, // lwarx //load string (interpret these) - {533, &JitArm::FallBackToInterpreter}, //"lswx", OPTYPE_LOAD, FL_EVIL | FL_IN_A | FL_OUT_D}}, - {597, &JitArm::FallBackToInterpreter}, //"lswi", OPTYPE_LOAD, FL_EVIL | FL_IN_AB | FL_OUT_D}}, + {533, &JitArm::FallBackToInterpreter}, // lswx + {597, &JitArm::FallBackToInterpreter}, // lswi //store word - {151, &JitArm::stX}, //"stwx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {183, &JitArm::stX}, //"stwux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + {151, &JitArm::stX}, // stwx + {183, &JitArm::stX}, // stwux //store halfword - {407, &JitArm::stX}, //"sthx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {439, &JitArm::stX}, //"sthux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + {407, &JitArm::stX}, // sthx + {439, &JitArm::stX}, // sthux //store byte - {215, &JitArm::stX}, //"stbx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {247, &JitArm::stX}, //"stbux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + {215, &JitArm::stX}, // stbx + {247, &JitArm::stX}, // stbux //store bytereverse - {662, &JitArm::FallBackToInterpreter}, //"stwbrx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {918, &JitArm::FallBackToInterpreter}, //"sthbrx", OPTYPE_STORE, FL_IN_A | FL_IN_B}}, + {662, &JitArm::FallBackToInterpreter}, // stwbrx + {918, &JitArm::FallBackToInterpreter}, // sthbrx - {661, &JitArm::FallBackToInterpreter}, //"stswx", OPTYPE_STORE, FL_EVIL}}, - {725, &JitArm::FallBackToInterpreter}, //"stswi", OPTYPE_STORE, FL_EVIL}}, + {661, &JitArm::FallBackToInterpreter}, // stswx + {725, &JitArm::FallBackToInterpreter}, // stswi // fp load/store - {535, &JitArm::lfXX}, //"lfsx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}}, - {567, &JitArm::lfXX}, //"lfsux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}}, - {599, &JitArm::lfXX}, //"lfdx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}}, - {631, &JitArm::lfXX}, //"lfdux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}}, + {535, &JitArm::lfXX}, // lfsx + {567, &JitArm::lfXX}, // lfsux + {599, &JitArm::lfXX}, // lfdx + {631, &JitArm::lfXX}, // lfdux - {663, &JitArm::stfXX}, //"stfsx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, - {695, &JitArm::stfXX}, //"stfsux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}}, - {727, &JitArm::stfXX}, //"stfdx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, - {759, &JitArm::stfXX}, //"stfdux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}}, - {983, &JitArm::FallBackToInterpreter}, //"stfiwx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, + {663, &JitArm::stfXX}, // stfsx + {695, &JitArm::stfXX}, // stfsux + {727, &JitArm::stfXX}, // stfdx + {759, &JitArm::stfXX}, // stfdux + {983, &JitArm::FallBackToInterpreter}, // stfiwx - {19, &JitArm::FallBackToInterpreter}, //"mfcr", OPTYPE_SYSTEM, FL_OUT_D}}, - {83, &JitArm::mfmsr}, //"mfmsr", OPTYPE_SYSTEM, FL_OUT_D}}, - {144, &JitArm::FallBackToInterpreter}, //"mtcrf", OPTYPE_SYSTEM, 0}}, - {146, &JitArm::mtmsr}, //"mtmsr", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {210, &JitArm::mtsr}, //"mtsr", OPTYPE_SYSTEM, 0}}, - {242, &JitArm::FallBackToInterpreter}, //"mtsrin", OPTYPE_SYSTEM, 0}}, - {339, &JitArm::mfspr}, //"mfspr", OPTYPE_SPR, FL_OUT_D}}, - {467, &JitArm::mtspr}, //"mtspr", OPTYPE_SPR, 0, 2}}, - {371, &JitArm::mftb}, //"mftb", OPTYPE_SYSTEM, FL_OUT_D | FL_TIMER}}, - {512, &JitArm::FallBackToInterpreter}, //"mcrxr", OPTYPE_SYSTEM, 0}}, - {595, &JitArm::mfsr}, //"mfsr", OPTYPE_SYSTEM, FL_OUT_D, 2}}, - {659, &JitArm::FallBackToInterpreter}, //"mfsrin", OPTYPE_SYSTEM, FL_OUT_D, 2}}, + {19, &JitArm::FallBackToInterpreter}, // mfcr + {83, &JitArm::mfmsr}, // mfmsr + {144, &JitArm::FallBackToInterpreter}, // mtcrf + {146, &JitArm::mtmsr}, // mtmsr + {210, &JitArm::mtsr}, // mtsr + {242, &JitArm::FallBackToInterpreter}, // mtsrin + {339, &JitArm::mfspr}, // mfspr + {467, &JitArm::mtspr}, // mtspr + {371, &JitArm::mftb}, // mftb + {512, &JitArm::FallBackToInterpreter}, // mcrxr + {595, &JitArm::mfsr}, // mfsr + {659, &JitArm::FallBackToInterpreter}, // mfsrin - {4, &JitArm::twx}, //"tw", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, - {598, &JitArm::DoNothing}, //"sync", OPTYPE_SYSTEM, 0, 2}}, - {982, &JitArm::icbi}, //"icbi", OPTYPE_SYSTEM, FL_ENDBLOCK, 3}}, + {4, &JitArm::twx}, // tw + {598, &JitArm::DoNothing}, // sync + {982, &JitArm::icbi}, // icbi // Unused instructions on GC - {310, &JitArm::FallBackToInterpreter}, //"eciwx", OPTYPE_INTEGER, FL_RC_BIT}}, - {438, &JitArm::FallBackToInterpreter}, //"ecowx", OPTYPE_INTEGER, FL_RC_BIT}}, - {854, &JitArm::DoNothing}, //"eieio", OPTYPE_INTEGER, FL_RC_BIT}}, - {306, &JitArm::FallBackToInterpreter}, //"tlbie", OPTYPE_SYSTEM, 0}}, - {370, &JitArm::FallBackToInterpreter}, //"tlbia", OPTYPE_SYSTEM, 0}}, - {566, &JitArm::DoNothing}, //"tlbsync", OPTYPE_SYSTEM, 0}}, + {310, &JitArm::FallBackToInterpreter}, // eciwx + {438, &JitArm::FallBackToInterpreter}, // ecowx + {854, &JitArm::DoNothing}, // eieio + {306, &JitArm::FallBackToInterpreter}, // tlbie + {370, &JitArm::FallBackToInterpreter}, // tlbia + {566, &JitArm::DoNothing}, // tlbsync }; static GekkoOPTemplate table59[] = { - {18, &JitArm::FallBackToInterpreter}, //{"fdivsx", OPTYPE_FPU, FL_RC_BIT_F, 16}}, - {20, &JitArm::fsubsx}, //"fsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {21, &JitArm::faddsx}, //"faddsx", OPTYPE_FPU, FL_RC_BIT_F}}, -// {22, &JitArm::FallBackToInterpreter}, //"fsqrtsx", OPTYPE_FPU, FL_RC_BIT_F}}, // Not implemented on gekko - {24, &JitArm::fresx}, //"fresx", OPTYPE_FPU, FL_RC_BIT_F}}, - {25, &JitArm::fmulsx}, //"fmulsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {28, &JitArm::FallBackToInterpreter}, //"fmsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {29, &JitArm::fmaddsx}, //"fmaddsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {30, &JitArm::FallBackToInterpreter}, //"fnmsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {31, &JitArm::fnmaddsx}, //"fnmaddsx", OPTYPE_FPU, FL_RC_BIT_F}}, + {18, &JitArm::FallBackToInterpreter}, // fdivsx + {20, &JitArm::fsubsx}, // fsubsx + {21, &JitArm::faddsx}, // faddsx +// {22, &JitArm::FallBackToInterpreter}, // fsqrtsx + {24, &JitArm::fresx}, // fresx + {25, &JitArm::fmulsx}, // fmulsx + {28, &JitArm::FallBackToInterpreter}, // fmsubsx + {29, &JitArm::fmaddsx}, // fmaddsx + {30, &JitArm::FallBackToInterpreter}, // fnmsubsx + {31, &JitArm::fnmaddsx}, // fnmaddsx }; static GekkoOPTemplate table63[] = { - {264, &JitArm::fabsx}, //"fabsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {32, &JitArm::FallBackToInterpreter}, //"fcmpo", OPTYPE_FPU, FL_RC_BIT_F}}, - {0, &JitArm::FallBackToInterpreter}, //"fcmpu", OPTYPE_FPU, FL_RC_BIT_F}}, - {14, &JitArm::fctiwx}, //"fctiwx", OPTYPE_FPU, FL_RC_BIT_F}}, - {15, &JitArm::fctiwzx}, //"fctiwzx", OPTYPE_FPU, FL_RC_BIT_F}}, - {72, &JitArm::fmrx}, //"fmrx", OPTYPE_FPU, FL_RC_BIT_F}}, - {136, &JitArm::fnabsx}, //"fnabsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {40, &JitArm::fnegx}, //"fnegx", OPTYPE_FPU, FL_RC_BIT_F}}, - {12, &JitArm::FallBackToInterpreter}, //"frspx", OPTYPE_FPU, FL_RC_BIT_F}}, + {264, &JitArm::fabsx}, // fabsx + {32, &JitArm::FallBackToInterpreter}, // fcmpo + {0, &JitArm::FallBackToInterpreter}, // fcmpu + {14, &JitArm::fctiwx}, // fctiwx + {15, &JitArm::fctiwzx}, // fctiwzx + {72, &JitArm::fmrx}, // fmrx + {136, &JitArm::fnabsx}, // fnabsx + {40, &JitArm::fnegx}, // fnegx + {12, &JitArm::FallBackToInterpreter}, // frspx - {64, &JitArm::FallBackToInterpreter}, //"mcrfs", OPTYPE_SYSTEMFP, 0}}, - {583, &JitArm::FallBackToInterpreter}, //"mffsx", OPTYPE_SYSTEMFP, 0}}, - {70, &JitArm::FallBackToInterpreter}, //"mtfsb0x", OPTYPE_SYSTEMFP, 0, 2}}, - {38, &JitArm::FallBackToInterpreter}, //"mtfsb1x", OPTYPE_SYSTEMFP, 0, 2}}, - {134, &JitArm::FallBackToInterpreter}, //"mtfsfix", OPTYPE_SYSTEMFP, 0, 2}}, - {711, &JitArm::FallBackToInterpreter}, //"mtfsfx", OPTYPE_SYSTEMFP, 0, 2}}, + {64, &JitArm::FallBackToInterpreter}, // mcrfs + {583, &JitArm::FallBackToInterpreter}, // mffsx + {70, &JitArm::FallBackToInterpreter}, // mtfsb0x + {38, &JitArm::FallBackToInterpreter}, // mtfsb1x + {134, &JitArm::FallBackToInterpreter}, // mtfsfix + {711, &JitArm::FallBackToInterpreter}, // mtfsfx }; static GekkoOPTemplate table63_2[] = { - {18, &JitArm::FallBackToInterpreter}, //"fdivx", OPTYPE_FPU, FL_RC_BIT_F, 30}}, - {20, &JitArm::fsubx}, //"fsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {21, &JitArm::faddx}, //"faddx", OPTYPE_FPU, FL_RC_BIT_F}}, - {22, &JitArm::FallBackToInterpreter}, //"fsqrtx", OPTYPE_FPU, FL_RC_BIT_F}}, - {23, &JitArm::fselx}, //"fselx", OPTYPE_FPU, FL_RC_BIT_F}}, - {25, &JitArm::fmulx}, //"fmulx", OPTYPE_FPU, FL_RC_BIT_F}}, - {26, &JitArm::frsqrtex}, //"frsqrtex", OPTYPE_FPU, FL_RC_BIT_F}}, - {28, &JitArm::FallBackToInterpreter}, //"fmsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {29, &JitArm::fmaddx}, //"fmaddx", OPTYPE_FPU, FL_RC_BIT_F}}, - {30, &JitArm::FallBackToInterpreter}, //"fnmsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {31, &JitArm::fnmaddx}, //"fnmaddx", OPTYPE_FPU, FL_RC_BIT_F}}, + {18, &JitArm::FallBackToInterpreter}, // fdivx + {20, &JitArm::fsubx}, // fsubx + {21, &JitArm::faddx}, // faddx + {22, &JitArm::FallBackToInterpreter}, // fsqrtx + {23, &JitArm::fselx}, // fselx + {25, &JitArm::fmulx}, // fmulx + {26, &JitArm::frsqrtex}, // frsqrtex + {28, &JitArm::FallBackToInterpreter}, // fmsubx + {29, &JitArm::fmaddx}, // fmaddx + {30, &JitArm::FallBackToInterpreter}, // fnmsubx + {31, &JitArm::fnmaddx}, // fnmaddx }; diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp index 1468061980..8677d44337 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp @@ -31,335 +31,335 @@ struct GekkoOPTemplate static GekkoOPTemplate primarytable[] = { - {4, &JitArm64::DynaRunTable4}, //"RunTable4", OPTYPE_SUBTABLE | (4<<24), 0}}, - {19, &JitArm64::DynaRunTable19}, //"RunTable19", OPTYPE_SUBTABLE | (19<<24), 0}}, - {31, &JitArm64::DynaRunTable31}, //"RunTable31", OPTYPE_SUBTABLE | (31<<24), 0}}, - {59, &JitArm64::DynaRunTable59}, //"RunTable59", OPTYPE_SUBTABLE | (59<<24), 0}}, - {63, &JitArm64::DynaRunTable63}, //"RunTable63", OPTYPE_SUBTABLE | (63<<24), 0}}, + {4, &JitArm64::DynaRunTable4}, // RunTable4 + {19, &JitArm64::DynaRunTable19}, // RunTable19 + {31, &JitArm64::DynaRunTable31}, // RunTable31 + {59, &JitArm64::DynaRunTable59}, // RunTable59 + {63, &JitArm64::DynaRunTable63}, // RunTable63 - {16, &JitArm64::bcx}, //"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {18, &JitArm64::bx}, //"bx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, + {16, &JitArm64::bcx}, // bcx + {18, &JitArm64::bx}, // bx - {3, &JitArm64::twx}, //"twi", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {17, &JitArm64::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, + {3, &JitArm64::twx}, // twi + {17, &JitArm64::sc}, // sc - {7, &JitArm64::mulli}, //"mulli", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_RC_BIT, 2}}, - {8, &JitArm64::FallBackToInterpreter}, //"subfic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}}, - {10, &JitArm64::cmpli}, //"cmpli", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}}, - {11, &JitArm64::cmpi}, //"cmpi", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}}, - {12, &JitArm64::addic}, //"addic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}}, - {13, &JitArm64::addic}, //"addic_rc", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CR0}}, - {14, &JitArm64::arith_imm}, //"addi", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}}, - {15, &JitArm64::arith_imm}, //"addis", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}}, + {7, &JitArm64::mulli}, // mulli + {8, &JitArm64::FallBackToInterpreter}, // subfic + {10, &JitArm64::cmpli}, // cmpli + {11, &JitArm64::cmpi}, // cmpi + {12, &JitArm64::addic}, // addic + {13, &JitArm64::addic}, // addic_rc + {14, &JitArm64::arith_imm}, // addi + {15, &JitArm64::arith_imm}, // addis - {20, &JitArm64::FallBackToInterpreter}, //"rlwimix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_A | FL_IN_S | FL_RC_BIT}}, - {21, &JitArm64::rlwinmx}, //"rlwinmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {23, &JitArm64::FallBackToInterpreter}, //"rlwnmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_IN_B | FL_RC_BIT}}, + {20, &JitArm64::FallBackToInterpreter}, // rlwimix + {21, &JitArm64::rlwinmx}, // rlwinmx + {23, &JitArm64::FallBackToInterpreter}, // rlwnmx - {24, &JitArm64::arith_imm}, //"ori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {25, &JitArm64::arith_imm}, //"oris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {26, &JitArm64::arith_imm}, //"xori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {27, &JitArm64::arith_imm}, //"xoris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {28, &JitArm64::arith_imm}, //"andi_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}}, - {29, &JitArm64::arith_imm}, //"andis_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}}, + {24, &JitArm64::arith_imm}, // ori + {25, &JitArm64::arith_imm}, // oris + {26, &JitArm64::arith_imm}, // xori + {27, &JitArm64::arith_imm}, // xoris + {28, &JitArm64::arith_imm}, // andi_rc + {29, &JitArm64::arith_imm}, // andis_rc - {32, &JitArm64::lXX}, //"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {33, &JitArm64::lXX}, //"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {34, &JitArm64::lXX}, //"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {35, &JitArm64::lXX}, //"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {40, &JitArm64::lXX}, //"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {41, &JitArm64::lXX}, //"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {42, &JitArm64::lXX}, //"lha", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {43, &JitArm64::lXX}, //"lhau", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, + {32, &JitArm64::lXX}, // lwz + {33, &JitArm64::lXX}, // lwzu + {34, &JitArm64::lXX}, // lbz + {35, &JitArm64::lXX}, // lbzu + {40, &JitArm64::lXX}, // lhz + {41, &JitArm64::lXX}, // lhzu + {42, &JitArm64::lXX}, // lha + {43, &JitArm64::lXX}, // lhau - {44, &JitArm64::stX}, //"sth", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {45, &JitArm64::stX}, //"sthu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, - {36, &JitArm64::stX}, //"stw", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {37, &JitArm64::stX}, //"stwu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, - {38, &JitArm64::stX}, //"stb", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {39, &JitArm64::stX}, //"stbu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, + {44, &JitArm64::stX}, // sth + {45, &JitArm64::stX}, // sthu + {36, &JitArm64::stX}, // stw + {37, &JitArm64::stX}, // stwu + {38, &JitArm64::stX}, // stb + {39, &JitArm64::stX}, // stbu - {46, &JitArm64::FallBackToInterpreter}, //"lmw", OPTYPE_SYSTEM, FL_EVIL, 10}}, - {47, &JitArm64::FallBackToInterpreter}, //"stmw", OPTYPE_SYSTEM, FL_EVIL, 10}}, + {46, &JitArm64::FallBackToInterpreter}, // lmw + {47, &JitArm64::FallBackToInterpreter}, // stmw - {48, &JitArm64::lfXX}, //"lfs", OPTYPE_LOADFP, FL_IN_A}}, - {49, &JitArm64::lfXX}, //"lfsu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}}, - {50, &JitArm64::lfXX}, //"lfd", OPTYPE_LOADFP, FL_IN_A}}, - {51, &JitArm64::lfXX}, //"lfdu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}}, + {48, &JitArm64::lfXX}, // lfs + {49, &JitArm64::lfXX}, // lfsu + {50, &JitArm64::lfXX}, // lfd + {51, &JitArm64::lfXX}, // lfdu - {52, &JitArm64::stfXX}, //"stfs", OPTYPE_STOREFP, FL_IN_A}}, - {53, &JitArm64::stfXX}, //"stfsu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}}, - {54, &JitArm64::stfXX}, //"stfd", OPTYPE_STOREFP, FL_IN_A}}, - {55, &JitArm64::stfXX}, //"stfdu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}}, + {52, &JitArm64::stfXX}, // stfs + {53, &JitArm64::stfXX}, // stfsu + {54, &JitArm64::stfXX}, // stfd + {55, &JitArm64::stfXX}, // stfdu - {56, &JitArm64::psq_l}, //"psq_l", OPTYPE_PS, FL_IN_A}}, - {57, &JitArm64::psq_l}, //"psq_lu", OPTYPE_PS, FL_OUT_A | FL_IN_A}}, - {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}}, + {56, &JitArm64::psq_l}, // psq_l + {57, &JitArm64::psq_l}, // psq_lu + {60, &JitArm64::psq_st}, // psq_st + {61, &JitArm64::psq_st}, // psq_stu //missing: 0, 1, 2, 5, 6, 9, 22, 30, 62, 58 }; static GekkoOPTemplate table4[] = { //SUBOP10 - {0, &JitArm64::FallBackToInterpreter}, //"ps_cmpu0", OPTYPE_PS, FL_SET_CRn}}, - {32, &JitArm64::FallBackToInterpreter}, //"ps_cmpo0", OPTYPE_PS, FL_SET_CRn}}, - {40, &JitArm64::ps_neg}, //"ps_neg", OPTYPE_PS, FL_RC_BIT}}, - {136, &JitArm64::ps_nabs}, //"ps_nabs", OPTYPE_PS, FL_RC_BIT}}, - {264, &JitArm64::ps_abs}, //"ps_abs", OPTYPE_PS, FL_RC_BIT}}, - {64, &JitArm64::FallBackToInterpreter}, //"ps_cmpu1", OPTYPE_PS, FL_RC_BIT}}, - {72, &JitArm64::ps_mr}, //"ps_mr", OPTYPE_PS, FL_RC_BIT}}, - {96, &JitArm64::FallBackToInterpreter}, //"ps_cmpo1", OPTYPE_PS, FL_RC_BIT}}, - {528, &JitArm64::ps_merge00}, //"ps_merge00", OPTYPE_PS, FL_RC_BIT}}, - {560, &JitArm64::ps_merge01}, //"ps_merge01", OPTYPE_PS, FL_RC_BIT}}, - {592, &JitArm64::ps_merge10}, //"ps_merge10", OPTYPE_PS, FL_RC_BIT}}, - {624, &JitArm64::ps_merge11}, //"ps_merge11", OPTYPE_PS, FL_RC_BIT}}, + {0, &JitArm64::FallBackToInterpreter}, // ps_cmpu0 + {32, &JitArm64::FallBackToInterpreter}, // ps_cmpo0 + {40, &JitArm64::ps_neg}, // ps_neg + {136, &JitArm64::ps_nabs}, // ps_nabs + {264, &JitArm64::ps_abs}, // ps_abs + {64, &JitArm64::FallBackToInterpreter}, // ps_cmpu1 + {72, &JitArm64::ps_mr}, // ps_mr + {96, &JitArm64::FallBackToInterpreter}, // ps_cmpo1 + {528, &JitArm64::ps_merge00}, // ps_merge00 + {560, &JitArm64::ps_merge01}, // ps_merge01 + {592, &JitArm64::ps_merge10}, // ps_merge10 + {624, &JitArm64::ps_merge11}, // ps_merge11 - {1014, &JitArm64::FallBackToInterpreter}, //"dcbz_l", OPTYPE_SYSTEM, 0}}, + {1014, &JitArm64::FallBackToInterpreter}, // dcbz_l }; static GekkoOPTemplate table4_2[] = { - {10, &JitArm64::ps_sum0}, //"ps_sum0", OPTYPE_PS, 0}}, - {11, &JitArm64::ps_sum1}, //"ps_sum1", OPTYPE_PS, 0}}, - {12, &JitArm64::ps_muls0}, //"ps_muls0", OPTYPE_PS, 0}}, - {13, &JitArm64::ps_muls1}, //"ps_muls1", OPTYPE_PS, 0}}, - {14, &JitArm64::ps_madds0}, //"ps_madds0", OPTYPE_PS, 0}}, - {15, &JitArm64::ps_madds1}, //"ps_madds1", OPTYPE_PS, 0}}, - {18, &JitArm64::ps_div}, //"ps_div", OPTYPE_PS, 0, 16}}, - {20, &JitArm64::ps_sub}, //"ps_sub", OPTYPE_PS, 0}}, - {21, &JitArm64::ps_add}, //"ps_add", OPTYPE_PS, 0}}, - {23, &JitArm64::ps_sel}, //"ps_sel", OPTYPE_PS, 0}}, - {24, &JitArm64::ps_res}, //"ps_res", OPTYPE_PS, 0}}, - {25, &JitArm64::ps_mul}, //"ps_mul", OPTYPE_PS, 0}}, - {26, &JitArm64::FallBackToInterpreter}, //"ps_rsqrte", OPTYPE_PS, 0, 1}}, - {28, &JitArm64::ps_msub}, //"ps_msub", OPTYPE_PS, 0}}, - {29, &JitArm64::ps_madd}, //"ps_madd", OPTYPE_PS, 0}}, - {30, &JitArm64::ps_nmsub}, //"ps_nmsub", OPTYPE_PS, 0}}, - {31, &JitArm64::ps_nmadd}, //"ps_nmadd", OPTYPE_PS, 0}}, + {10, &JitArm64::ps_sum0}, // ps_sum0 + {11, &JitArm64::ps_sum1}, // ps_sum1 + {12, &JitArm64::ps_muls0}, // ps_muls0 + {13, &JitArm64::ps_muls1}, // ps_muls1 + {14, &JitArm64::ps_madds0}, // ps_madds0 + {15, &JitArm64::ps_madds1}, // ps_madds1 + {18, &JitArm64::ps_div}, // ps_div + {20, &JitArm64::ps_sub}, // ps_sub + {21, &JitArm64::ps_add}, // ps_add + {23, &JitArm64::ps_sel}, // ps_sel + {24, &JitArm64::ps_res}, // ps_res + {25, &JitArm64::ps_mul}, // ps_mul + {26, &JitArm64::FallBackToInterpreter}, // ps_rsqrte + {28, &JitArm64::ps_msub}, // ps_msub + {29, &JitArm64::ps_madd}, // ps_madd + {30, &JitArm64::ps_nmsub}, // ps_nmsub + {31, &JitArm64::ps_nmadd}, // ps_nmadd }; static GekkoOPTemplate table4_3[] = { - {6, &JitArm64::FallBackToInterpreter}, //"psq_lx", OPTYPE_PS, 0}}, - {7, &JitArm64::FallBackToInterpreter}, //"psq_stx", OPTYPE_PS, 0}}, - {38, &JitArm64::FallBackToInterpreter}, //"psq_lux", OPTYPE_PS, 0}}, - {39, &JitArm64::FallBackToInterpreter}, //"psq_stux", OPTYPE_PS, 0}}, + {6, &JitArm64::FallBackToInterpreter}, // psq_lx + {7, &JitArm64::FallBackToInterpreter}, // psq_stx + {38, &JitArm64::FallBackToInterpreter}, // psq_lux + {39, &JitArm64::FallBackToInterpreter}, // psq_stux }; static GekkoOPTemplate table19[] = { - {528, &JitArm64::bcctrx}, //"bcctrx", OPTYPE_BRANCH, FL_ENDBLOCK}}, - {16, &JitArm64::bclrx}, //"bclrx", OPTYPE_BRANCH, FL_ENDBLOCK}}, - {257, &JitArm64::FallBackToInterpreter}, //"crand", OPTYPE_CR, FL_EVIL}}, - {129, &JitArm64::FallBackToInterpreter}, //"crandc", OPTYPE_CR, FL_EVIL}}, - {289, &JitArm64::FallBackToInterpreter}, //"creqv", OPTYPE_CR, FL_EVIL}}, - {225, &JitArm64::FallBackToInterpreter}, //"crnand", OPTYPE_CR, FL_EVIL}}, - {33, &JitArm64::FallBackToInterpreter}, //"crnor", OPTYPE_CR, FL_EVIL}}, - {449, &JitArm64::FallBackToInterpreter}, //"cror", OPTYPE_CR, FL_EVIL}}, - {417, &JitArm64::FallBackToInterpreter}, //"crorc", OPTYPE_CR, FL_EVIL}}, - {193, &JitArm64::FallBackToInterpreter}, //"crxor", OPTYPE_CR, FL_EVIL}}, + {528, &JitArm64::bcctrx}, // bcctrx + {16, &JitArm64::bclrx}, // bclrx + {257, &JitArm64::FallBackToInterpreter}, // crand + {129, &JitArm64::FallBackToInterpreter}, // crandc + {289, &JitArm64::FallBackToInterpreter}, // creqv + {225, &JitArm64::FallBackToInterpreter}, // crnand + {33, &JitArm64::FallBackToInterpreter}, // crnor + {449, &JitArm64::FallBackToInterpreter}, // cror + {417, &JitArm64::FallBackToInterpreter}, // crorc + {193, &JitArm64::FallBackToInterpreter}, // crxor - {150, &JitArm64::DoNothing}, //"isync", OPTYPE_ICACHE, FL_EVIL}}, - {0, &JitArm64::mcrf}, //"mcrf", OPTYPE_SYSTEM, FL_EVIL}}, + {150, &JitArm64::DoNothing}, // isync + {0, &JitArm64::mcrf}, // mcrf - {50, &JitArm64::rfi}, //"rfi", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS, 1}}, - {18, &JitArm64::Break}, //"rfid", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS}} + {50, &JitArm64::rfi}, // rfi + {18, &JitArm64::Break}, // rfid }; static GekkoOPTemplate table31[] = { - {266, &JitArm64::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {778, &JitArm64::addx}, //"addox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {10, &JitArm64::addcx}, //"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {522, &JitArm64::addcx}, //"addcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {138, &JitArm64::FallBackToInterpreter}, //"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {650, &JitArm64::FallBackToInterpreter}, //"addeox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {234, &JitArm64::FallBackToInterpreter}, //"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {746, &JitArm64::FallBackToInterpreter}, //"addmeox" - {202, &JitArm64::addzex}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {714, &JitArm64::addzex}, //"addzeox" - {491, &JitArm64::FallBackToInterpreter}, //"divwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {1003, &JitArm64::FallBackToInterpreter}, //"divwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {459, &JitArm64::FallBackToInterpreter}, //"divwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {971, &JitArm64::FallBackToInterpreter}, //"divwuox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {75, &JitArm64::FallBackToInterpreter}, //"mulhwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {11, &JitArm64::FallBackToInterpreter}, //"mulhwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {235, &JitArm64::mullwx}, //"mullwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {747, &JitArm64::mullwx}, //"mullwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {104, &JitArm64::negx}, //"negx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {616, &JitArm64::negx}, //"negox" - {40, &JitArm64::subfx}, //"subfx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {552, &JitArm64::subfx}, //"subfox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {8, &JitArm64::FallBackToInterpreter}, //"subfcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {520, &JitArm64::FallBackToInterpreter}, //"subfcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {136, &JitArm64::FallBackToInterpreter}, //"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {648, &JitArm64::FallBackToInterpreter}, //"subfeox" - {232, &JitArm64::FallBackToInterpreter}, //"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {744, &JitArm64::FallBackToInterpreter}, //"subfmeox" - {200, &JitArm64::FallBackToInterpreter}, //"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {712, &JitArm64::FallBackToInterpreter}, //"subfzeox" + {266, &JitArm64::addx}, // addx + {778, &JitArm64::addx}, // addox + {10, &JitArm64::addcx}, // addcx + {522, &JitArm64::addcx}, // addcox + {138, &JitArm64::FallBackToInterpreter}, // addex + {650, &JitArm64::FallBackToInterpreter}, // addeox + {234, &JitArm64::FallBackToInterpreter}, // addmex + {746, &JitArm64::FallBackToInterpreter}, // addmeox + {202, &JitArm64::addzex}, // addzex + {714, &JitArm64::addzex}, // addzeox + {491, &JitArm64::FallBackToInterpreter}, // divwx + {1003, &JitArm64::FallBackToInterpreter}, // divwox + {459, &JitArm64::FallBackToInterpreter}, // divwux + {971, &JitArm64::FallBackToInterpreter}, // divwuox + {75, &JitArm64::FallBackToInterpreter}, // mulhwx + {11, &JitArm64::FallBackToInterpreter}, // mulhwux + {235, &JitArm64::mullwx}, // mullwx + {747, &JitArm64::mullwx}, // mullwox + {104, &JitArm64::negx}, // negx + {616, &JitArm64::negx}, // negox + {40, &JitArm64::subfx}, // subfx + {552, &JitArm64::subfx}, // subfox + {8, &JitArm64::FallBackToInterpreter}, // subfcx + {520, &JitArm64::FallBackToInterpreter}, // subfcox + {136, &JitArm64::FallBackToInterpreter}, // subfex + {648, &JitArm64::FallBackToInterpreter}, // subfeox + {232, &JitArm64::FallBackToInterpreter}, // subfmex + {744, &JitArm64::FallBackToInterpreter}, // subfmeox + {200, &JitArm64::FallBackToInterpreter}, // subfzex + {712, &JitArm64::FallBackToInterpreter}, // subfzeox - {28, &JitArm64::boolX}, //"andx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {60, &JitArm64::boolX}, //"andcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {444, &JitArm64::boolX}, //"orx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {124, &JitArm64::boolX}, //"norx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {316, &JitArm64::boolX}, //"xorx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {412, &JitArm64::boolX}, //"orcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {476, &JitArm64::boolX}, //"nandx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {284, &JitArm64::boolX}, //"eqvx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {0, &JitArm64::cmp}, //"cmp", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}}, - {32, &JitArm64::cmpl}, //"cmpl", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}}, - {26, &JitArm64::cntlzwx}, //"cntlzwx",OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {922, &JitArm64::extsXx}, //"extshx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {954, &JitArm64::extsXx}, //"extsbx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {536, &JitArm64::FallBackToInterpreter}, //"srwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, - {792, &JitArm64::FallBackToInterpreter}, //"srawx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, - {824, &JitArm64::srawix}, //"srawix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, - {24, &JitArm64::FallBackToInterpreter}, //"slwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, + {28, &JitArm64::boolX}, // andx + {60, &JitArm64::boolX}, // andcx + {444, &JitArm64::boolX}, // orx + {124, &JitArm64::boolX}, // norx + {316, &JitArm64::boolX}, // xorx + {412, &JitArm64::boolX}, // orcx + {476, &JitArm64::boolX}, // nandx + {284, &JitArm64::boolX}, // eqvx + {0, &JitArm64::cmp}, // cmp + {32, &JitArm64::cmpl}, // cmpl + {26, &JitArm64::cntlzwx}, // cntlzwx + {922, &JitArm64::extsXx}, // extshx + {954, &JitArm64::extsXx}, // extsbx + {536, &JitArm64::FallBackToInterpreter}, // srwx + {792, &JitArm64::FallBackToInterpreter}, // srawx + {824, &JitArm64::srawix}, // srawix + {24, &JitArm64::FallBackToInterpreter}, // slwx - {54, &JitArm64::FallBackToInterpreter}, //"dcbst", OPTYPE_DCACHE, 0, 4}}, - {86, &JitArm64::FallBackToInterpreter}, //"dcbf", OPTYPE_DCACHE, 0, 4}}, - {246, &JitArm64::DoNothing}, //"dcbtst", OPTYPE_DCACHE, 0, 1}}, - {278, &JitArm64::DoNothing}, //"dcbt", OPTYPE_DCACHE, 0, 1}}, - {470, &JitArm64::FallBackToInterpreter}, //"dcbi", OPTYPE_DCACHE, 0, 4}}, - {758, &JitArm64::DoNothing}, //"dcba", OPTYPE_DCACHE, 0, 4}}, - {1014, &JitArm64::FallBackToInterpreter}, //"dcbz", OPTYPE_DCACHE, 0, 4}}, + {54, &JitArm64::FallBackToInterpreter}, // dcbst + {86, &JitArm64::FallBackToInterpreter}, // dcbf + {246, &JitArm64::DoNothing}, // dcbtst + {278, &JitArm64::DoNothing}, // dcbt + {470, &JitArm64::FallBackToInterpreter}, // dcbi + {758, &JitArm64::DoNothing}, // dcba + {1014, &JitArm64::FallBackToInterpreter}, // dcbz //load word - {23, &JitArm64::lXX}, //"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {55, &JitArm64::lXX}, //"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {23, &JitArm64::lXX}, // lwzx + {55, &JitArm64::lXX}, // lwzux //load halfword - {279, &JitArm64::lXX}, //"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {311, &JitArm64::lXX}, //"lhzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {279, &JitArm64::lXX}, // lhzx + {311, &JitArm64::lXX}, // lhzux //load halfword signextend - {343, &JitArm64::lXX}, //"lhax", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {375, &JitArm64::lXX}, //"lhaux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {343, &JitArm64::lXX}, // lhax + {375, &JitArm64::lXX}, // lhaux //load byte - {87, &JitArm64::lXX}, //"lbzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {119, &JitArm64::lXX}, //"lbzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + {87, &JitArm64::lXX}, // lbzx + {119, &JitArm64::lXX}, // lbzux //load byte reverse - {534, &JitArm64::lXX}, //"lwbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {790, &JitArm64::lXX}, //"lhbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {534, &JitArm64::lXX}, // lwbrx + {790, &JitArm64::lXX}, // lhbrx // Conditional load/store (Wii SMP) - {150, &JitArm64::FallBackToInterpreter}, //"stwcxd", OPTYPE_STORE, FL_EVIL | FL_SET_CR0}}, - {20, &JitArm64::FallBackToInterpreter}, //"lwarx", OPTYPE_LOAD, FL_EVIL | FL_OUT_D | FL_IN_A0B | FL_SET_CR0}}, + {150, &JitArm64::FallBackToInterpreter}, // stwcxd + {20, &JitArm64::FallBackToInterpreter}, // lwarx //load string (interpret these) - {533, &JitArm64::FallBackToInterpreter}, //"lswx", OPTYPE_LOAD, FL_EVIL | FL_IN_A | FL_OUT_D}}, - {597, &JitArm64::FallBackToInterpreter}, //"lswi", OPTYPE_LOAD, FL_EVIL | FL_IN_AB | FL_OUT_D}}, + {533, &JitArm64::FallBackToInterpreter}, // lswx + {597, &JitArm64::FallBackToInterpreter}, // lswi //store word - {151, &JitArm64::stX}, //"stwx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {183, &JitArm64::stX}, //"stwux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + {151, &JitArm64::stX}, // stwx + {183, &JitArm64::stX}, // stwux //store halfword - {407, &JitArm64::stX}, //"sthx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {439, &JitArm64::stX}, //"sthux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + {407, &JitArm64::stX}, // sthx + {439, &JitArm64::stX}, // sthux //store byte - {215, &JitArm64::stX}, //"stbx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {247, &JitArm64::stX}, //"stbux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + {215, &JitArm64::stX}, // stbx + {247, &JitArm64::stX}, // stbux //store bytereverse - {662, &JitArm64::FallBackToInterpreter}, //"stwbrx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {918, &JitArm64::FallBackToInterpreter}, //"sthbrx", OPTYPE_STORE, FL_IN_A | FL_IN_B}}, + {662, &JitArm64::FallBackToInterpreter}, // stwbrx + {918, &JitArm64::FallBackToInterpreter}, // sthbrx - {661, &JitArm64::FallBackToInterpreter}, //"stswx", OPTYPE_STORE, FL_EVIL}}, - {725, &JitArm64::FallBackToInterpreter}, //"stswi", OPTYPE_STORE, FL_EVIL}}, + {661, &JitArm64::FallBackToInterpreter}, // stswx + {725, &JitArm64::FallBackToInterpreter}, // stswi // fp load/store - {535, &JitArm64::lfXX}, //"lfsx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}}, - {567, &JitArm64::lfXX}, //"lfsux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}}, - {599, &JitArm64::lfXX}, //"lfdx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}}, - {631, &JitArm64::lfXX}, //"lfdux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}}, + {535, &JitArm64::lfXX}, // lfsx + {567, &JitArm64::lfXX}, // lfsux + {599, &JitArm64::lfXX}, // lfdx + {631, &JitArm64::lfXX}, // lfdux - {663, &JitArm64::stfXX}, //"stfsx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, - {695, &JitArm64::stfXX}, //"stfsux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}}, - {727, &JitArm64::stfXX}, //"stfdx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, - {759, &JitArm64::stfXX}, //"stfdux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}}, - {983, &JitArm64::FallBackToInterpreter}, //"stfiwx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, + {663, &JitArm64::stfXX}, // stfsx + {695, &JitArm64::stfXX}, // stfsux + {727, &JitArm64::stfXX}, // stfdx + {759, &JitArm64::stfXX}, // stfdux + {983, &JitArm64::FallBackToInterpreter}, // stfiwx - {19, &JitArm64::FallBackToInterpreter}, //"mfcr", OPTYPE_SYSTEM, FL_OUT_D}}, - {83, &JitArm64::mfmsr}, //"mfmsr", OPTYPE_SYSTEM, FL_OUT_D}}, - {144, &JitArm64::FallBackToInterpreter}, //"mtcrf", OPTYPE_SYSTEM, 0}}, - {146, &JitArm64::mtmsr}, //"mtmsr", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {210, &JitArm64::mtsr}, //"mtsr", OPTYPE_SYSTEM, 0}}, - {242, &JitArm64::mtsrin}, //"mtsrin", OPTYPE_SYSTEM, 0}}, - {339, &JitArm64::mfspr}, //"mfspr", OPTYPE_SPR, FL_OUT_D}}, - {467, &JitArm64::mtspr}, //"mtspr", OPTYPE_SPR, 0, 2}}, - {371, &JitArm64::mftb}, //"mftb", OPTYPE_SYSTEM, FL_OUT_D | FL_TIMER}}, - {512, &JitArm64::FallBackToInterpreter}, //"mcrxr", OPTYPE_SYSTEM, 0}}, - {595, &JitArm64::mfsr}, //"mfsr", OPTYPE_SYSTEM, FL_OUT_D, 2}}, - {659, &JitArm64::mfsrin}, //"mfsrin", OPTYPE_SYSTEM, FL_OUT_D, 2}}, + {19, &JitArm64::FallBackToInterpreter}, // mfcr + {83, &JitArm64::mfmsr}, // mfmsr + {144, &JitArm64::FallBackToInterpreter}, // mtcrf + {146, &JitArm64::mtmsr}, // mtmsr + {210, &JitArm64::mtsr}, // mtsr + {242, &JitArm64::mtsrin}, // mtsrin + {339, &JitArm64::mfspr}, // mfspr + {467, &JitArm64::mtspr}, // mtspr + {371, &JitArm64::mftb}, // mftb + {512, &JitArm64::FallBackToInterpreter}, // mcrxr + {595, &JitArm64::mfsr}, // mfsr + {659, &JitArm64::mfsrin}, // mfsrin - {4, &JitArm64::twx}, //"tw", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, - {598, &JitArm64::DoNothing}, //"sync", OPTYPE_SYSTEM, 0, 2}}, - {982, &JitArm64::icbi}, //"icbi", OPTYPE_SYSTEM, FL_ENDBLOCK, 3}}, + {4, &JitArm64::twx}, // tw + {598, &JitArm64::DoNothing}, // sync + {982, &JitArm64::icbi}, // icbi // Unused instructions on GC - {310, &JitArm64::FallBackToInterpreter}, //"eciwx", OPTYPE_INTEGER, FL_RC_BIT}}, - {438, &JitArm64::FallBackToInterpreter}, //"ecowx", OPTYPE_INTEGER, FL_RC_BIT}}, - {854, &JitArm64::DoNothing}, //"eieio", OPTYPE_INTEGER, FL_RC_BIT}}, - {306, &JitArm64::FallBackToInterpreter}, //"tlbie", OPTYPE_SYSTEM, 0}}, - {370, &JitArm64::FallBackToInterpreter}, //"tlbia", OPTYPE_SYSTEM, 0}}, - {566, &JitArm64::DoNothing}, //"tlbsync", OPTYPE_SYSTEM, 0}}, + {310, &JitArm64::FallBackToInterpreter}, // eciwx + {438, &JitArm64::FallBackToInterpreter}, // ecowx + {854, &JitArm64::DoNothing}, // eieio + {306, &JitArm64::FallBackToInterpreter}, // tlbie + {370, &JitArm64::FallBackToInterpreter}, // tlbia + {566, &JitArm64::DoNothing}, // tlbsync }; static GekkoOPTemplate table59[] = { - {18, &JitArm64::FallBackToInterpreter}, //{"fdivsx", OPTYPE_FPU, FL_RC_BIT_F, 16}}, - {20, &JitArm64::fsubsx}, //"fsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {21, &JitArm64::faddsx}, //"faddsx", OPTYPE_FPU, FL_RC_BIT_F}}, -// {22, &JitArm64::FallBackToInterpreter}, //"fsqrtsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {24, &JitArm64::FallBackToInterpreter}, //"fresx", OPTYPE_FPU, FL_RC_BIT_F}}, - {25, &JitArm64::fmulsx}, //"fmulsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {28, &JitArm64::fmsubsx}, //"fmsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {29, &JitArm64::fmaddsx}, //"fmaddsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {30, &JitArm64::fnmsubsx}, //"fnmsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {31, &JitArm64::fnmaddsx}, //"fnmaddsx", OPTYPE_FPU, FL_RC_BIT_F}}, + {18, &JitArm64::FallBackToInterpreter}, // fdivsx + {20, &JitArm64::fsubsx}, // fsubsx + {21, &JitArm64::faddsx}, // faddsx +// {22, &JitArm64::FallBackToInterpreter}, // fsqrtsx + {24, &JitArm64::FallBackToInterpreter}, // fresx + {25, &JitArm64::fmulsx}, // fmulsx + {28, &JitArm64::fmsubsx}, // fmsubsx + {29, &JitArm64::fmaddsx}, // fmaddsx + {30, &JitArm64::fnmsubsx}, // fnmsubsx + {31, &JitArm64::fnmaddsx}, // fnmaddsx }; static GekkoOPTemplate table63[] = { - {264, &JitArm64::fabsx}, //"fabsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {32, &JitArm64::FallBackToInterpreter}, //"fcmpo", OPTYPE_FPU, FL_RC_BIT_F}}, - {0, &JitArm64::FallBackToInterpreter}, //"fcmpu", OPTYPE_FPU, FL_RC_BIT_F}}, - {14, &JitArm64::FallBackToInterpreter}, //"fctiwx", OPTYPE_FPU, FL_RC_BIT_F}}, - {15, &JitArm64::FallBackToInterpreter}, //"fctiwzx", OPTYPE_FPU, FL_RC_BIT_F}}, - {72, &JitArm64::fmrx}, //"fmrx", OPTYPE_FPU, FL_RC_BIT_F}}, - {136, &JitArm64::fnabsx}, //"fnabsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {40, &JitArm64::fnegx}, //"fnegx", OPTYPE_FPU, FL_RC_BIT_F}}, - {12, &JitArm64::FallBackToInterpreter}, //"frspx", OPTYPE_FPU, FL_RC_BIT_F}}, + {264, &JitArm64::fabsx}, // fabsx + {32, &JitArm64::FallBackToInterpreter}, // fcmpo + {0, &JitArm64::FallBackToInterpreter}, // fcmpu + {14, &JitArm64::FallBackToInterpreter}, // fctiwx + {15, &JitArm64::FallBackToInterpreter}, // fctiwzx + {72, &JitArm64::fmrx}, // fmrx + {136, &JitArm64::fnabsx}, // fnabsx + {40, &JitArm64::fnegx}, // fnegx + {12, &JitArm64::FallBackToInterpreter}, // frspx - {64, &JitArm64::FallBackToInterpreter}, //"mcrfs", OPTYPE_SYSTEMFP, 0}}, - {583, &JitArm64::FallBackToInterpreter}, //"mffsx", OPTYPE_SYSTEMFP, 0}}, - {70, &JitArm64::FallBackToInterpreter}, //"mtfsb0x", OPTYPE_SYSTEMFP, 0, 2}}, - {38, &JitArm64::FallBackToInterpreter}, //"mtfsb1x", OPTYPE_SYSTEMFP, 0, 2}}, - {134, &JitArm64::FallBackToInterpreter}, //"mtfsfix", OPTYPE_SYSTEMFP, 0, 2}}, - {711, &JitArm64::FallBackToInterpreter}, //"mtfsfx", OPTYPE_SYSTEMFP, 0, 2}}, + {64, &JitArm64::FallBackToInterpreter}, // mcrfs + {583, &JitArm64::FallBackToInterpreter}, // mffsx + {70, &JitArm64::FallBackToInterpreter}, // mtfsb0x + {38, &JitArm64::FallBackToInterpreter}, // mtfsb1x + {134, &JitArm64::FallBackToInterpreter}, // mtfsfix + {711, &JitArm64::FallBackToInterpreter}, // mtfsfx }; static GekkoOPTemplate table63_2[] = { - {18, &JitArm64::FallBackToInterpreter}, //"fdivx", OPTYPE_FPU, FL_RC_BIT_F, 30}}, - {20, &JitArm64::fsubx}, //"fsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {21, &JitArm64::faddx}, //"faddx", OPTYPE_FPU, FL_RC_BIT_F}}, - {22, &JitArm64::FallBackToInterpreter}, //"fsqrtx", OPTYPE_FPU, FL_RC_BIT_F}}, - {23, &JitArm64::fselx}, //"fselx", OPTYPE_FPU, FL_RC_BIT_F}}, - {25, &JitArm64::fmulx}, //"fmulx", OPTYPE_FPU, FL_RC_BIT_F}}, - {26, &JitArm64::FallBackToInterpreter}, //"frsqrtex", OPTYPE_FPU, FL_RC_BIT_F}}, - {28, &JitArm64::fmsubx}, //"fmsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {29, &JitArm64::fmaddx}, //"fmaddx", OPTYPE_FPU, FL_RC_BIT_F}}, - {30, &JitArm64::fnmsubx}, //"fnmsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {31, &JitArm64::fnmaddx}, //"fnmaddx", OPTYPE_FPU, FL_RC_BIT_F}}, + {18, &JitArm64::FallBackToInterpreter}, // fdivx + {20, &JitArm64::fsubx}, // fsubx + {21, &JitArm64::faddx}, // faddx + {22, &JitArm64::FallBackToInterpreter}, // fsqrtx + {23, &JitArm64::fselx}, // fselx + {25, &JitArm64::fmulx}, // fmulx + {26, &JitArm64::FallBackToInterpreter}, // frsqrtex + {28, &JitArm64::fmsubx}, // fmsubx + {29, &JitArm64::fmaddx}, // fmaddx + {30, &JitArm64::fnmsubx}, // fnmsubx + {31, &JitArm64::fnmaddx}, // fnmaddx }; diff --git a/Source/Core/Core/PowerPC/PPCTables.h b/Source/Core/Core/PowerPC/PPCTables.h index 06e50b8022..937efac0e5 100644 --- a/Source/Core/Core/PowerPC/PPCTables.h +++ b/Source/Core/Core/PowerPC/PPCTables.h @@ -71,7 +71,6 @@ enum OPTYPE_SINGLEFP, OPTYPE_LOADPS , OPTYPE_STOREPS , - OPTYPE_FPU , OPTYPE_PS , OPTYPE_DCACHE , OPTYPE_ICACHE , From 1b01911c01484ec2e2d00e6b28e63b48c99404c0 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Thu, 14 May 2015 18:57:54 +0200 Subject: [PATCH 6/6] Jit64: indent far code because it looks nice --- Source/Core/Core/PowerPC/Jit64/Jit.cpp | 96 ++++++++++--------- .../Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp | 16 ++-- .../Core/Core/PowerPC/JitCommon/Jit_Util.cpp | 40 ++++---- 3 files changed, 78 insertions(+), 74 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index 4ebd633331..736855826e 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -623,12 +623,13 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc CMP(32, PPCSTATE(spr[SPR_GQR0 + gqr]), Imm8(0)); FixupBranch failure = J_CC(CC_NZ, true); SwitchToFarCode(); - SetJumpTarget(failure); - MOV(32, PPCSTATE(pc), Imm32(js.blockStart)); - ABI_PushRegistersAndAdjustStack({}, 0); - ABI_CallFunctionC((void *)&JitInterface::CompileExceptionCheck, (u32)JitInterface::ExceptionType::EXCEPTIONS_PAIRED_QUANTIZE); - ABI_PopRegistersAndAdjustStack({}, 0); - JMP(asm_routines.dispatcher, true); + SetJumpTarget(failure); + MOV(32, PPCSTATE(pc), Imm32(js.blockStart)); + ABI_PushRegistersAndAdjustStack({}, 0); + ABI_CallFunctionC((void *)&JitInterface::CompileExceptionCheck, + (u32)JitInterface::ExceptionType::EXCEPTIONS_PAIRED_QUANTIZE); + ABI_PopRegistersAndAdjustStack({}, 0); + JMP(asm_routines.dispatcher, true); SwitchToNearCode(); js.assumeNoPairedQuantize = true; } @@ -684,19 +685,21 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc { TEST(32, PPCSTATE(Exceptions), Imm32(EXCEPTION_EXTERNAL_INT)); FixupBranch extException = J_CC(CC_NZ, true); + SwitchToFarCode(); - SetJumpTarget(extException); - TEST(32, PPCSTATE(msr), Imm32(0x0008000)); - FixupBranch noExtIntEnable = J_CC(CC_Z, true); - TEST(32, M(&ProcessorInterface::m_InterruptCause), Imm32(ProcessorInterface::INT_CAUSE_CP | ProcessorInterface::INT_CAUSE_PE_TOKEN | ProcessorInterface::INT_CAUSE_PE_FINISH)); - FixupBranch noCPInt = J_CC(CC_Z, true); + SetJumpTarget(extException); + TEST(32, PPCSTATE(msr), Imm32(0x0008000)); + FixupBranch noExtIntEnable = J_CC(CC_Z, true); + TEST(32, M(&ProcessorInterface::m_InterruptCause), Imm32(ProcessorInterface::INT_CAUSE_CP | + ProcessorInterface::INT_CAUSE_PE_TOKEN | + ProcessorInterface::INT_CAUSE_PE_FINISH)); + FixupBranch noCPInt = J_CC(CC_Z, true); - gpr.Flush(FLUSH_MAINTAIN_STATE); - fpr.Flush(FLUSH_MAINTAIN_STATE); - - MOV(32, PPCSTATE(pc), Imm32(ops[i].address)); - WriteExternalExceptionExit(); + gpr.Flush(FLUSH_MAINTAIN_STATE); + fpr.Flush(FLUSH_MAINTAIN_STATE); + MOV(32, PPCSTATE(pc), Imm32(ops[i].address)); + WriteExternalExceptionExit(); SwitchToNearCode(); SetJumpTarget(noCPInt); @@ -731,18 +734,19 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc //This instruction uses FPU - needs to add FP exception bailout TEST(32, PPCSTATE(msr), Imm32(1 << 13)); // Test FP enabled bit FixupBranch b1 = J_CC(CC_Z, true); + SwitchToFarCode(); - SetJumpTarget(b1); - gpr.Flush(FLUSH_MAINTAIN_STATE); - fpr.Flush(FLUSH_MAINTAIN_STATE); - - // If a FPU exception occurs, the exception handler will read - // from PC. Update PC with the latest value in case that happens. - MOV(32, PPCSTATE(pc), Imm32(ops[i].address)); - OR(32, PPCSTATE(Exceptions), Imm32(EXCEPTION_FPU_UNAVAILABLE)); - WriteExceptionExit(); + SetJumpTarget(b1); + gpr.Flush(FLUSH_MAINTAIN_STATE); + fpr.Flush(FLUSH_MAINTAIN_STATE); + // If a FPU exception occurs, the exception handler will read + // from PC. Update PC with the latest value in case that happens. + MOV(32, PPCSTATE(pc), Imm32(ops[i].address)); + OR(32, PPCSTATE(Exceptions), Imm32(EXCEPTION_FPU_UNAVAILABLE)); + WriteExceptionExit(); SwitchToNearCode(); + js.firstFPInstructionFound = true; } @@ -802,29 +806,29 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc } SwitchToFarCode(); - if (!js.fastmemLoadStore) - { - exceptionHandlerAtLoc[js.fastmemLoadStore] = nullptr; - SetJumpTarget(js.fixupExceptionHandler ? js.exceptionHandler : memException); - } - else - { - exceptionHandlerAtLoc[js.fastmemLoadStore] = GetWritableCodePtr(); - } + if (!js.fastmemLoadStore) + { + exceptionHandlerAtLoc[js.fastmemLoadStore] = nullptr; + SetJumpTarget(js.fixupExceptionHandler ? js.exceptionHandler : memException); + } + else + { + exceptionHandlerAtLoc[js.fastmemLoadStore] = GetWritableCodePtr(); + } - BitSet32 gprToFlush = BitSet32::AllTrue(32); - BitSet32 fprToFlush = BitSet32::AllTrue(32); - if (js.revertGprLoad >= 0) - gprToFlush[js.revertGprLoad] = false; - if (js.revertFprLoad >= 0) - fprToFlush[js.revertFprLoad] = false; - gpr.Flush(FLUSH_MAINTAIN_STATE, gprToFlush); - fpr.Flush(FLUSH_MAINTAIN_STATE, fprToFlush); + BitSet32 gprToFlush = BitSet32::AllTrue(32); + BitSet32 fprToFlush = BitSet32::AllTrue(32); + if (js.revertGprLoad >= 0) + gprToFlush[js.revertGprLoad] = false; + if (js.revertFprLoad >= 0) + fprToFlush[js.revertFprLoad] = false; + gpr.Flush(FLUSH_MAINTAIN_STATE, gprToFlush); + fpr.Flush(FLUSH_MAINTAIN_STATE, fprToFlush); - // If a memory exception occurs, the exception handler will read - // from PC. Update PC with the latest value in case that happens. - MOV(32, PPCSTATE(pc), Imm32(ops[i].address)); - WriteExceptionExit(); + // If a memory exception occurs, the exception handler will read + // from PC. Update PC with the latest value in case that happens. + MOV(32, PPCSTATE(pc), Imm32(ops[i].address)); + WriteExceptionExit(); SwitchToNearCode(); } diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp index d1d89dcea8..e1e476a50d 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp @@ -336,15 +336,15 @@ void Jit64::dcbz(UGeckoInstruction inst) // Should this code ever run? I can't find any games that use DCBZ on non-physical addresses, but // supposedly there are, at least for some MMU titles. Let's be careful and support it to be sure. SwitchToFarCode(); - SetJumpTarget(slow); - MOV(32, M(&PC), Imm32(jit->js.compilerPC)); - BitSet32 registersInUse = CallerSavedRegistersInUse(); - ABI_PushRegistersAndAdjustStack(registersInUse, 0); - ABI_CallFunctionR((void *)&PowerPC::ClearCacheLine, RSCRATCH); - ABI_PopRegistersAndAdjustStack(registersInUse, 0); - FixupBranch exit = J(true); - + SetJumpTarget(slow); + MOV(32, M(&PC), Imm32(jit->js.compilerPC)); + BitSet32 registersInUse = CallerSavedRegistersInUse(); + ABI_PushRegistersAndAdjustStack(registersInUse, 0); + ABI_CallFunctionR((void *)&PowerPC::ClearCacheLine, RSCRATCH); + ABI_PopRegistersAndAdjustStack(registersInUse, 0); + FixupBranch exit = J(true); SwitchToNearCode(); + // Mask out the address so we don't write to MEM1 out of bounds // FIXME: Work out why the AGP disc writes out of bounds if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) diff --git a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp index a0a86faf50..8d0f917ac5 100644 --- a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp @@ -895,22 +895,22 @@ void EmuCodeBlock::ConvertDoubleToSingle(X64Reg dst, X64Reg src) CVTSD2SS(dst, R(src)); SwitchToFarCode(); - SetJumpTarget(nanConversion); - MOVQ_xmm(R(RSCRATCH), src); - // Put the quiet bit into CF. - BT(64, R(RSCRATCH), Imm8(51)); - CVTSD2SS(dst, R(src)); - FixupBranch continue1 = J_CC(CC_C, true); - // Clear the quiet bit of the SNaN, which was 0 (signalling) but got set to 1 (quiet) by conversion. - ANDPS(dst, M(&single_qnan_bit)); - FixupBranch continue2 = J(true); + SetJumpTarget(nanConversion); + MOVQ_xmm(R(RSCRATCH), src); + // Put the quiet bit into CF. + BT(64, R(RSCRATCH), Imm8(51)); + CVTSD2SS(dst, R(src)); + FixupBranch continue1 = J_CC(CC_C, true); + // Clear the quiet bit of the SNaN, which was 0 (signalling) but got set to 1 (quiet) by conversion. + ANDPS(dst, M(&single_qnan_bit)); + FixupBranch continue2 = J(true); - SetJumpTarget(denormalConversion); - MOVSD(M(&temp64), src); - FLD(64, M(&temp64)); - FSTP(32, M(&temp32)); - MOVSS(dst, M(&temp32)); - FixupBranch continue3 = J(true); + SetJumpTarget(denormalConversion); + MOVSD(M(&temp64), src); + FLD(64, M(&temp64)); + FSTP(32, M(&temp32)); + MOVSS(dst, M(&temp32)); + FixupBranch continue3 = J(true); SwitchToNearCode(); SetJumpTarget(continue1); @@ -941,11 +941,11 @@ void EmuCodeBlock::ConvertSingleToDouble(X64Reg dst, X64Reg src, bool src_is_gpr FixupBranch nanConversion = J_CC(CC_P, true); SwitchToFarCode(); - SetJumpTarget(nanConversion); - TEST(32, R(gprsrc), Imm32(0x00400000)); - FixupBranch continue1 = J_CC(CC_NZ, true); - ANDPD(dst, M(&double_qnan_bit)); - FixupBranch continue2 = J(true); + SetJumpTarget(nanConversion); + TEST(32, R(gprsrc), Imm32(0x00400000)); + FixupBranch continue1 = J_CC(CC_NZ, true); + ANDPD(dst, M(&double_qnan_bit)); + FixupBranch continue2 = J(true); SwitchToNearCode(); SetJumpTarget(continue1);