From 5b5b3a99798e06261e6ac9856758a3d9a8aae339 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 30 Dec 2020 19:28:34 -0500 Subject: [PATCH] JitArm64_Tables: Move Instruction alias to the JIT class Does what the comment says I should do :p --- Source/Core/Core/PowerPC/JitArm64/Jit.h | 2 ++ .../Core/PowerPC/JitArm64/JitArm64_Tables.cpp | 29 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitArm64/Jit.h b/Source/Core/Core/PowerPC/JitArm64/Jit.h index 193c73c77b..d6579811ac 100644 --- a/Source/Core/Core/PowerPC/JitArm64/Jit.h +++ b/Source/Core/Core/PowerPC/JitArm64/Jit.h @@ -43,7 +43,9 @@ public: void Jit(u32) override; const char* GetName() const override { return "JITARM64"; } + // OPCODES + using Instruction = void (JitArm64::*)(UGeckoInstruction); void FallBackToInterpreter(UGeckoInstruction inst); void DoNothing(UGeckoInstruction inst); void HLEFunction(u32 hook_index); diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp index abda230760..4d63101718 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp @@ -10,13 +10,10 @@ namespace { -// Should be moved in to the Jit class -using Instruction = void (JitArm64::*)(UGeckoInstruction); - struct GekkoOPTemplate { int opcode; - Instruction fn; + JitArm64::Instruction fn; // GekkoOPInfo opinfo; // Doesn't need opinfo, Interpreter fills it out }; @@ -339,8 +336,8 @@ constexpr std::array table63_2{{ {31, &JitArm64::fp_arith}, // fnmaddx }}; -constexpr std::array dynaOpTable = [] { - std::array table{}; +constexpr std::array dynaOpTable = [] { + std::array table{}; for (auto& tpl : table) { @@ -355,8 +352,8 @@ constexpr std::array dynaOpTable = [] { return table; }(); -constexpr std::array dynaOpTable4 = [] { - std::array table{}; +constexpr std::array dynaOpTable4 = [] { + std::array table{}; for (auto& entry : table) { @@ -391,8 +388,8 @@ constexpr std::array dynaOpTable4 = [] { return table; }(); -constexpr std::array dynaOpTable19 = [] { - std::array table{}; +constexpr std::array dynaOpTable19 = [] { + std::array table{}; for (auto& entry : table) { @@ -407,8 +404,8 @@ constexpr std::array dynaOpTable19 = [] { return table; }(); -constexpr std::array dynaOpTable31 = [] { - std::array table{}; +constexpr std::array dynaOpTable31 = [] { + std::array table{}; for (auto& entry : table) { @@ -423,8 +420,8 @@ constexpr std::array dynaOpTable31 = [] { return table; }(); -constexpr std::array dynaOpTable59 = [] { - std::array table{}; +constexpr std::array dynaOpTable59 = [] { + std::array table{}; for (auto& entry : table) { @@ -439,8 +436,8 @@ constexpr std::array dynaOpTable59 = [] { return table; }(); -constexpr std::array dynaOpTable63 = [] { - std::array table{}; +constexpr std::array dynaOpTable63 = [] { + std::array table{}; for (auto& entry : table) {