CPU Backends: Make each CPU backend responsible for initializing its own

instruction tables

Previously, all of the internals that handled how the instruction tables
are initialized were exposed externally. However, this can all be made
private to each CPU backend.

If each backend has an Init() function, then this is where the instruction
tables should be initialized, it shouldn't be the responsibility of
external code to ensure internal validity.

This allows for getting rid of all the table initialization shenanigans
within JitInterface and PPCTables.
This commit is contained in:
Lioncash
2017-02-08 04:27:04 -05:00
parent 5da7d700ca
commit 1ce1304d0f
23 changed files with 44 additions and 171 deletions

View File

@@ -2,6 +2,8 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "Core/PowerPC/PowerPC.h"
#include "Common/Assert.h"
#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
@@ -18,8 +20,6 @@
#include "Core/PowerPC/CPUCoreBase.h"
#include "Core/PowerPC/Interpreter/Interpreter.h"
#include "Core/PowerPC/JitInterface.h"
#include "Core/PowerPC/PPCTables.h"
#include "Core/PowerPC/PowerPC.h"
namespace PowerPC
{
@@ -148,8 +148,6 @@ static void ResetRegisters()
static void InitializeCPUCore(int cpu_core)
{
PPCTables::InitTables(cpu_core);
// We initialize the interpreter because
// it is used on boot and code window independently.
s_interpreter->Init();