Interpreter: Use std::array for instruction tables

This commit is contained in:
Lioncash 2017-01-17 22:06:52 -05:00
parent f0abdbdeb5
commit e4ea9f7ace
2 changed files with 14 additions and 12 deletions

View File

@ -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::Instruction, 64> Interpreter::m_op_table;
std::array<Interpreter::Instruction, 1024> Interpreter::m_op_table4;
std::array<Interpreter::Instruction, 1024> Interpreter::m_op_table19;
std::array<Interpreter::Instruction, 1024> Interpreter::m_op_table31;
std::array<Interpreter::Instruction, 32> Interpreter::m_op_table59;
std::array<Interpreter::Instruction, 1024> Interpreter::m_op_table63;
void Interpreter::RunTable4(UGeckoInstruction _inst)
{

View File

@ -4,6 +4,8 @@
#pragma once
#include <array>
#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<Instruction, 64> m_op_table;
static std::array<Instruction, 1024> m_op_table4;
static std::array<Instruction, 1024> m_op_table19;
static std::array<Instruction, 1024> m_op_table31;
static std::array<Instruction, 32> m_op_table59;
static std::array<Instruction, 1024> m_op_table63;
// singleton
static Interpreter* getInstance();