mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Core: Shorten the _interpreterInstruction typedef
The class itself already acts as a namespace trailer, so '_interpreter' isn't necessary. This also gets rid of a duplicate typedef in the Interpreter_Tables.
This commit is contained in:
@ -26,12 +26,12 @@ namespace
|
|||||||
bool Interpreter::m_EndBlock;
|
bool Interpreter::m_EndBlock;
|
||||||
|
|
||||||
// function tables
|
// function tables
|
||||||
Interpreter::_interpreterInstruction Interpreter::m_opTable[64];
|
Interpreter::Instruction Interpreter::m_opTable[64];
|
||||||
Interpreter::_interpreterInstruction Interpreter::m_opTable4[1024];
|
Interpreter::Instruction Interpreter::m_opTable4[1024];
|
||||||
Interpreter::_interpreterInstruction Interpreter::m_opTable19[1024];
|
Interpreter::Instruction Interpreter::m_opTable19[1024];
|
||||||
Interpreter::_interpreterInstruction Interpreter::m_opTable31[1024];
|
Interpreter::Instruction Interpreter::m_opTable31[1024];
|
||||||
Interpreter::_interpreterInstruction Interpreter::m_opTable59[32];
|
Interpreter::Instruction Interpreter::m_opTable59[32];
|
||||||
Interpreter::_interpreterInstruction Interpreter::m_opTable63[1024];
|
Interpreter::Instruction Interpreter::m_opTable63[1024];
|
||||||
|
|
||||||
void Interpreter::RunTable4(UGeckoInstruction _inst) { m_opTable4 [_inst.SUBOP10](_inst); }
|
void Interpreter::RunTable4(UGeckoInstruction _inst) { m_opTable4 [_inst.SUBOP10](_inst); }
|
||||||
void Interpreter::RunTable19(UGeckoInstruction _inst) { m_opTable19[_inst.SUBOP10](_inst); }
|
void Interpreter::RunTable19(UGeckoInstruction _inst) { m_opTable19[_inst.SUBOP10](_inst); }
|
||||||
|
@ -273,13 +273,13 @@ public:
|
|||||||
static void sync(UGeckoInstruction _inst);
|
static void sync(UGeckoInstruction _inst);
|
||||||
static void isync(UGeckoInstruction _inst);
|
static void isync(UGeckoInstruction _inst);
|
||||||
|
|
||||||
typedef void(*_interpreterInstruction)(UGeckoInstruction instCode);
|
using Instruction = void (*)(UGeckoInstruction instCode);
|
||||||
static _interpreterInstruction m_opTable[64];
|
static Instruction m_opTable[64];
|
||||||
static _interpreterInstruction m_opTable4[1024];
|
static Instruction m_opTable4[1024];
|
||||||
static _interpreterInstruction m_opTable19[1024];
|
static Instruction m_opTable19[1024];
|
||||||
static _interpreterInstruction m_opTable31[1024];
|
static Instruction m_opTable31[1024];
|
||||||
static _interpreterInstruction m_opTable59[32];
|
static Instruction m_opTable59[32];
|
||||||
static _interpreterInstruction m_opTable63[1024];
|
static Instruction m_opTable63[1024];
|
||||||
|
|
||||||
// singleton
|
// singleton
|
||||||
static Interpreter* getInstance();
|
static Interpreter* getInstance();
|
||||||
|
@ -4,12 +4,10 @@
|
|||||||
|
|
||||||
#include "Core/PowerPC/Interpreter/Interpreter_Tables.h"
|
#include "Core/PowerPC/Interpreter/Interpreter_Tables.h"
|
||||||
|
|
||||||
typedef void (*_Instruction) (UGeckoInstruction instCode);
|
|
||||||
|
|
||||||
struct GekkoOPTemplate
|
struct GekkoOPTemplate
|
||||||
{
|
{
|
||||||
int opcode;
|
int opcode;
|
||||||
_Instruction Inst;
|
Interpreter::Instruction Inst;
|
||||||
GekkoOPInfo opinfo;
|
GekkoOPInfo opinfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ void Jit64::FallBackToInterpreter(UGeckoInstruction inst)
|
|||||||
MOV(32, PPCSTATE(pc), Imm32(js.compilerPC));
|
MOV(32, PPCSTATE(pc), Imm32(js.compilerPC));
|
||||||
MOV(32, PPCSTATE(npc), Imm32(js.compilerPC + 4));
|
MOV(32, PPCSTATE(npc), Imm32(js.compilerPC + 4));
|
||||||
}
|
}
|
||||||
Interpreter::_interpreterInstruction instr = GetInterpreterOp(inst);
|
Interpreter::Instruction instr = GetInterpreterOp(inst);
|
||||||
ABI_PushRegistersAndAdjustStack({}, 0);
|
ABI_PushRegistersAndAdjustStack({}, 0);
|
||||||
ABI_CallFunctionC((void*)instr, inst.hex);
|
ABI_CallFunctionC((void*)instr, inst.hex);
|
||||||
ABI_PopRegistersAndAdjustStack({}, 0);
|
ABI_PopRegistersAndAdjustStack({}, 0);
|
||||||
|
@ -70,7 +70,7 @@ void JitArm64::FallBackToInterpreter(UGeckoInstruction inst)
|
|||||||
gpr.Unlock(WA);
|
gpr.Unlock(WA);
|
||||||
}
|
}
|
||||||
|
|
||||||
Interpreter::_interpreterInstruction instr = GetInterpreterOp(inst);
|
Interpreter::Instruction instr = GetInterpreterOp(inst);
|
||||||
MOVI2R(W0, inst.hex);
|
MOVI2R(W0, inst.hex);
|
||||||
MOVI2R(X30, (u64)instr);
|
MOVI2R(X30, (u64)instr);
|
||||||
BLR(X30);
|
BLR(X30);
|
||||||
|
@ -63,7 +63,7 @@ GekkoOPInfo *GetOpInfo(UGeckoInstruction _inst)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Interpreter::_interpreterInstruction GetInterpreterOp(UGeckoInstruction _inst)
|
Interpreter::Instruction GetInterpreterOp(UGeckoInstruction _inst)
|
||||||
{
|
{
|
||||||
const GekkoOPInfo *info = m_infoTable[_inst.OPCD];
|
const GekkoOPInfo *info = m_infoTable[_inst.OPCD];
|
||||||
if ((info->type & 0xFFFFFF) == OPTYPE_SUBTABLE)
|
if ((info->type & 0xFFFFFF) == OPTYPE_SUBTABLE)
|
||||||
|
@ -100,7 +100,7 @@ extern GekkoOPInfo *m_allInstructions[512];
|
|||||||
extern int m_numInstructions;
|
extern int m_numInstructions;
|
||||||
|
|
||||||
GekkoOPInfo *GetOpInfo(UGeckoInstruction _inst);
|
GekkoOPInfo *GetOpInfo(UGeckoInstruction _inst);
|
||||||
Interpreter::_interpreterInstruction GetInterpreterOp(UGeckoInstruction _inst);
|
Interpreter::Instruction GetInterpreterOp(UGeckoInstruction _inst);
|
||||||
|
|
||||||
namespace PPCTables
|
namespace PPCTables
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user