Jit64_Tables: Eliminate usages of the JIT global

This commit is contained in:
Lioncash 2017-01-22 05:14:19 -05:00
parent 46c33df485
commit 3ee31890d3
3 changed files with 8 additions and 7 deletions

View File

@ -857,7 +857,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer* code_buf, JitBloc
fpr.BindToRegister(reg, true, false); fpr.BindToRegister(reg, true, false);
} }
Jit64Tables::CompileInstruction(ops[i]); Jit64Tables::CompileInstruction(*this, ops[i]);
if (jo.memcheck && (opinfo->flags & FL_LOADSTORE)) if (jo.memcheck && (opinfo->flags & FL_LOADSTORE))
{ {

View File

@ -360,21 +360,20 @@ static GekkoOPTemplate table63_2[] = {
namespace Jit64Tables namespace Jit64Tables
{ {
void CompileInstruction(PPCAnalyst::CodeOp& op) void CompileInstruction(Jit64& jit, PPCAnalyst::CodeOp& op)
{ {
Jit64* jit64 = (Jit64*)g_jit; (jit.*dynaOpTable[op.inst.OPCD])(op.inst);
(jit64->*dynaOpTable[op.inst.OPCD])(op.inst);
GekkoOPInfo* info = op.opinfo; GekkoOPInfo* info = op.opinfo;
if (info) if (info)
{ {
#ifdef OPLOG #ifdef OPLOG
if (!strcmp(info->opname, OP_TO_LOG)) // "mcrfs" if (!strcmp(info->opname, OP_TO_LOG)) // "mcrfs"
{ {
rsplocations.push_back(g_jit.js.compilerPC); rsplocations.push_back(jit.js.compilerPC);
} }
#endif #endif
info->compileCount++; info->compileCount++;
info->lastUse = g_jit->js.compilerPC; info->lastUse = jit.js.compilerPC;
} }
} }

View File

@ -4,6 +4,8 @@
#pragma once #pragma once
class Jit64;
namespace PPCAnalyst namespace PPCAnalyst
{ {
struct CodeOp; struct CodeOp;
@ -11,6 +13,6 @@ struct CodeOp;
namespace Jit64Tables namespace Jit64Tables
{ {
void CompileInstruction(PPCAnalyst::CodeOp& op); void CompileInstruction(Jit64& jit, PPCAnalyst::CodeOp& op);
void InitTables(); void InitTables();
} }