Interpreter: Use std::array for instruction tables
This commit is contained in:
parent
f0abdbdeb5
commit
e4ea9f7ace
|
@ -33,12 +33,12 @@ u32 last_pc;
|
||||||
bool Interpreter::m_end_block;
|
bool Interpreter::m_end_block;
|
||||||
|
|
||||||
// function tables
|
// function tables
|
||||||
Interpreter::Instruction Interpreter::m_op_table[64];
|
std::array<Interpreter::Instruction, 64> Interpreter::m_op_table;
|
||||||
Interpreter::Instruction Interpreter::m_op_table4[1024];
|
std::array<Interpreter::Instruction, 1024> Interpreter::m_op_table4;
|
||||||
Interpreter::Instruction Interpreter::m_op_table19[1024];
|
std::array<Interpreter::Instruction, 1024> Interpreter::m_op_table19;
|
||||||
Interpreter::Instruction Interpreter::m_op_table31[1024];
|
std::array<Interpreter::Instruction, 1024> Interpreter::m_op_table31;
|
||||||
Interpreter::Instruction Interpreter::m_op_table59[32];
|
std::array<Interpreter::Instruction, 32> Interpreter::m_op_table59;
|
||||||
Interpreter::Instruction Interpreter::m_op_table63[1024];
|
std::array<Interpreter::Instruction, 1024> Interpreter::m_op_table63;
|
||||||
|
|
||||||
void Interpreter::RunTable4(UGeckoInstruction _inst)
|
void Interpreter::RunTable4(UGeckoInstruction _inst)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Core/PowerPC/CPUCoreBase.h"
|
#include "Core/PowerPC/CPUCoreBase.h"
|
||||||
#include "Core/PowerPC/Gekko.h"
|
#include "Core/PowerPC/Gekko.h"
|
||||||
|
@ -261,12 +263,12 @@ public:
|
||||||
static void isync(UGeckoInstruction _inst);
|
static void isync(UGeckoInstruction _inst);
|
||||||
|
|
||||||
using Instruction = void (*)(UGeckoInstruction instCode);
|
using Instruction = void (*)(UGeckoInstruction instCode);
|
||||||
static Instruction m_op_table[64];
|
static std::array<Instruction, 64> m_op_table;
|
||||||
static Instruction m_op_table4[1024];
|
static std::array<Instruction, 1024> m_op_table4;
|
||||||
static Instruction m_op_table19[1024];
|
static std::array<Instruction, 1024> m_op_table19;
|
||||||
static Instruction m_op_table31[1024];
|
static std::array<Instruction, 1024> m_op_table31;
|
||||||
static Instruction m_op_table59[32];
|
static std::array<Instruction, 32> m_op_table59;
|
||||||
static Instruction m_op_table63[1024];
|
static std::array<Instruction, 1024> m_op_table63;
|
||||||
|
|
||||||
// singleton
|
// singleton
|
||||||
static Interpreter* getInstance();
|
static Interpreter* getInstance();
|
||||||
|
|
Loading…
Reference in New Issue