diff --git a/Source/Core/Core/Core.vcxproj b/Source/Core/Core/Core.vcxproj
index 60a6de3fd5..e9477f128b 100644
--- a/Source/Core/Core/Core.vcxproj
+++ b/Source/Core/Core/Core.vcxproj
@@ -459,13 +459,10 @@
-
-
-
diff --git a/Source/Core/Core/Core.vcxproj.filters b/Source/Core/Core/Core.vcxproj.filters
index b96b206c0f..2578f48fd3 100644
--- a/Source/Core/Core/Core.vcxproj.filters
+++ b/Source/Core/Core/Core.vcxproj.filters
@@ -931,15 +931,9 @@
PowerPC\Interpreter
-
- PowerPC\Interpreter
-
PowerPC\Jit64
-
- PowerPC\Jit64
-
HW %28Flipper/Hollywood%29\AI - Audio Interface
@@ -1252,9 +1246,6 @@
PowerPC\JitIL
-
- PowerPC\JitIL
-
PowerPC\Jit64
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp
index fe712ed043..fa08d55252 100644
--- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp
+++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp
@@ -63,6 +63,7 @@ void Interpreter::RunTable63(UGeckoInstruction inst)
void Interpreter::Init()
{
+ InitializeInstructionTables();
m_reserve = false;
m_end_block = false;
}
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.h b/Source/Core/Core/PowerPC/Interpreter/Interpreter.h
index 6f4de85371..0ce65ba149 100644
--- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.h
+++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.h
@@ -282,6 +282,8 @@ public:
static u32 Helper_Carry(u32 value1, u32 value2);
private:
+ static void InitializeInstructionTables();
+
// flag helper
static void Helper_UpdateCR0(u32 value);
static void Helper_UpdateCR1();
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp
index 29c41f73eb..4fb81d6e48 100644
--- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp
+++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp
@@ -6,7 +6,6 @@
#include "Core/PowerPC/Gekko.h"
#include "Core/PowerPC/Interpreter/Interpreter.h"
-#include "Core/PowerPC/Interpreter/Interpreter_Tables.h"
#include "Core/PowerPC/PPCTables.h"
struct GekkoOPTemplate
@@ -355,8 +354,6 @@ static std::array table63_2 =
}};
// clang-format on
-namespace InterpreterTables
-{
constexpr size_t TotalInstructionFunctionCount()
{
return primarytable.size() + table4_2.size() + table4_3.size() + table4.size() + table31.size() +
@@ -366,7 +363,7 @@ constexpr size_t TotalInstructionFunctionCount()
static_assert(TotalInstructionFunctionCount() < m_allInstructions.size(),
"m_allInstructions is too small");
-void InitTables()
+void Interpreter::InitializeInstructionTables()
{
// once initialized, tables are read-only
static bool initialized = false;
@@ -376,22 +373,22 @@ void InitTables()
// clear
for (int i = 0; i < 64; i++)
{
- Interpreter::m_op_table[i] = Interpreter::unknown_instruction;
+ m_op_table[i] = Interpreter::unknown_instruction;
m_infoTable[i] = &unknownopinfo;
}
for (int i = 0; i < 32; i++)
{
- Interpreter::m_op_table59[i] = Interpreter::unknown_instruction;
+ m_op_table59[i] = Interpreter::unknown_instruction;
m_infoTable59[i] = &unknownopinfo;
}
for (int i = 0; i < 1024; i++)
{
- Interpreter::m_op_table4[i] = Interpreter::unknown_instruction;
- Interpreter::m_op_table19[i] = Interpreter::unknown_instruction;
- Interpreter::m_op_table31[i] = Interpreter::unknown_instruction;
- Interpreter::m_op_table63[i] = Interpreter::unknown_instruction;
+ m_op_table4[i] = Interpreter::unknown_instruction;
+ m_op_table19[i] = Interpreter::unknown_instruction;
+ m_op_table31[i] = Interpreter::unknown_instruction;
+ m_op_table63[i] = Interpreter::unknown_instruction;
m_infoTable4[i] = &unknownopinfo;
m_infoTable19[i] = &unknownopinfo;
m_infoTable31[i] = &unknownopinfo;
@@ -400,7 +397,7 @@ void InitTables()
for (auto& tpl : primarytable)
{
- Interpreter::m_op_table[tpl.opcode] = tpl.Inst;
+ m_op_table[tpl.opcode] = tpl.Inst;
m_infoTable[tpl.opcode] = &tpl.opinfo;
}
@@ -410,7 +407,7 @@ void InitTables()
for (auto& tpl : table4_2)
{
int op = fill + tpl.opcode;
- Interpreter::m_op_table4[op] = tpl.Inst;
+ m_op_table4[op] = tpl.Inst;
m_infoTable4[op] = &tpl.opinfo;
}
}
@@ -421,7 +418,7 @@ void InitTables()
for (auto& tpl : table4_3)
{
int op = fill + tpl.opcode;
- Interpreter::m_op_table4[op] = tpl.Inst;
+ m_op_table4[op] = tpl.Inst;
m_infoTable4[op] = &tpl.opinfo;
}
}
@@ -429,35 +426,35 @@ void InitTables()
for (auto& tpl : table4)
{
int op = tpl.opcode;
- Interpreter::m_op_table4[op] = tpl.Inst;
+ m_op_table4[op] = tpl.Inst;
m_infoTable4[op] = &tpl.opinfo;
}
for (auto& tpl : table31)
{
int op = tpl.opcode;
- Interpreter::m_op_table31[op] = tpl.Inst;
+ m_op_table31[op] = tpl.Inst;
m_infoTable31[op] = &tpl.opinfo;
}
for (auto& tpl : table19)
{
int op = tpl.opcode;
- Interpreter::m_op_table19[op] = tpl.Inst;
+ m_op_table19[op] = tpl.Inst;
m_infoTable19[op] = &tpl.opinfo;
}
for (auto& tpl : table59)
{
int op = tpl.opcode;
- Interpreter::m_op_table59[op] = tpl.Inst;
+ m_op_table59[op] = tpl.Inst;
m_infoTable59[op] = &tpl.opinfo;
}
for (auto& tpl : table63)
{
int op = tpl.opcode;
- Interpreter::m_op_table63[op] = tpl.Inst;
+ m_op_table63[op] = tpl.Inst;
m_infoTable63[op] = &tpl.opinfo;
}
@@ -467,7 +464,7 @@ void InitTables()
for (auto& tpl : table63_2)
{
int op = fill + tpl.opcode;
- Interpreter::m_op_table63[op] = tpl.Inst;
+ m_op_table63[op] = tpl.Inst;
m_infoTable63[op] = &tpl.opinfo;
}
}
@@ -494,4 +491,3 @@ void InitTables()
initialized = true;
}
-} // namespace InterpreterTables
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.h b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.h
deleted file mode 100644
index ce7796bf2d..0000000000
--- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.h
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2008 Dolphin Emulator Project
-// Licensed under GPLv2+
-// Refer to the license.txt file included.
-
-#pragma once
-
-namespace InterpreterTables
-{
-void InitTables();
-}
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp
index 8a424ad805..83bfb5239c 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp
@@ -2,6 +2,8 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "Core/PowerPC/Jit64/Jit.h"
+
#include