summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2017-01-22 05:30:35 -0500
committerLioncash <mathew1800@gmail.com>2017-01-22 05:54:33 -0500
commitb4e00115c5f03edc745ea78d7aa8ae1bba3d35db (patch)
tree184609e6aa51ee69c38a007d3427be6d719c2ef9 /Source
parentb0605c24d36895460106eaad2ce8d9380430b227 (diff)
JitArm64_Tables: Eliminate usages of the JIT global
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/PowerPC/JitArm64/Jit.cpp2
-rw-r--r--Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp15
-rw-r--r--Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.h10
3 files changed, 17 insertions, 10 deletions
diff --git a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp
index a424166574..4d5aed0413 100644
--- a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp
+++ b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp
@@ -604,7 +604,7 @@ const u8* JitArm64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer* code_buf, JitB
js.firstFPInstructionFound = true;
}
- JitArm64Tables::CompileInstruction(ops[i]);
+ JitArm64Tables::CompileInstruction(*this, ops[i]);
if (!MergeAllowedNextInstructions(1) || js.op[1].opinfo->type != OPTYPE_INTEGER)
FlushCarry();
diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp
index bc742f62b5..85c0072fbd 100644
--- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp
+++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp
@@ -2,9 +2,13 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
-#include "Core/PowerPC/JitArm64/Jit.h"
#include "Core/PowerPC/JitArm64/JitArm64_Tables.h"
+
+#include "Core/PowerPC/Gekko.h"
+#include "Core/PowerPC/JitArm64/Jit.h"
#include "Core/PowerPC/JitInterface.h"
+#include "Core/PowerPC/PPCAnalyst.h"
+#include "Core/PowerPC/PPCTables.h"
// Should be moved in to the Jit class
typedef void (JitArm64::*_Instruction)(UGeckoInstruction instCode);
@@ -365,21 +369,20 @@ static GekkoOPTemplate table63_2[] = {
namespace JitArm64Tables
{
-void CompileInstruction(PPCAnalyst::CodeOp& op)
+void CompileInstruction(JitArm64& jit, PPCAnalyst::CodeOp& op)
{
- JitArm64* jitarm = (JitArm64*)g_jit;
- (jitarm->*dynaOpTable[op.inst.OPCD])(op.inst);
+ (jit.*dynaOpTable[op.inst.OPCD])(op.inst);
GekkoOPInfo* info = op.opinfo;
if (info)
{
#ifdef OPLOG
if (!strcmp(info->opname, OP_TO_LOG))
{ ///"mcrfs"
- rsplocations.push_back(g_jit.js.compilerPC);
+ rsplocations.push_back(jit.js.compilerPC);
}
#endif
info->compileCount++;
- info->lastUse = g_jit->js.compilerPC;
+ info->lastUse = jit.js.compilerPC;
}
}
diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.h b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.h
index c92f789a38..e351c01feb 100644
--- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.h
+++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.h
@@ -4,11 +4,15 @@
#pragma once
-#include "Core/PowerPC/Gekko.h"
-#include "Core/PowerPC/PPCTables.h"
+class JitArm64;
+
+namespace PPCAnalyst
+{
+struct CodeOp;
+}
namespace JitArm64Tables
{
-void CompileInstruction(PPCAnalyst::CodeOp& op);
+void CompileInstruction(JitArm64& jit, PPCAnalyst::CodeOp& op);
void InitTables();
}