From e4ea9f7ace685402016721ad8a6190c597c071ca Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 17 Jan 2017 22:06:52 -0500 Subject: [PATCH] Interpreter: Use std::array for instruction tables --- .../Core/Core/PowerPC/Interpreter/Interpreter.cpp | 12 ++++++------ Source/Core/Core/PowerPC/Interpreter/Interpreter.h | 14 ++++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp index 047db068af..955f939d63 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp @@ -33,12 +33,12 @@ u32 last_pc; bool Interpreter::m_end_block; // function tables -Interpreter::Instruction Interpreter::m_op_table[64]; -Interpreter::Instruction Interpreter::m_op_table4[1024]; -Interpreter::Instruction Interpreter::m_op_table19[1024]; -Interpreter::Instruction Interpreter::m_op_table31[1024]; -Interpreter::Instruction Interpreter::m_op_table59[32]; -Interpreter::Instruction Interpreter::m_op_table63[1024]; +std::array Interpreter::m_op_table; +std::array Interpreter::m_op_table4; +std::array Interpreter::m_op_table19; +std::array Interpreter::m_op_table31; +std::array Interpreter::m_op_table59; +std::array Interpreter::m_op_table63; void Interpreter::RunTable4(UGeckoInstruction _inst) { diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.h b/Source/Core/Core/PowerPC/Interpreter/Interpreter.h index dd1907116e..4715572689 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.h +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.h @@ -4,6 +4,8 @@ #pragma once +#include + #include "Common/CommonTypes.h" #include "Core/PowerPC/CPUCoreBase.h" #include "Core/PowerPC/Gekko.h" @@ -261,12 +263,12 @@ public: static void isync(UGeckoInstruction _inst); using Instruction = void (*)(UGeckoInstruction instCode); - static Instruction m_op_table[64]; - static Instruction m_op_table4[1024]; - static Instruction m_op_table19[1024]; - static Instruction m_op_table31[1024]; - static Instruction m_op_table59[32]; - static Instruction m_op_table63[1024]; + static std::array m_op_table; + static std::array m_op_table4; + static std::array m_op_table19; + static std::array m_op_table31; + static std::array m_op_table59; + static std::array m_op_table63; // singleton static Interpreter* getInstance();