mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
JitBase: Remove use of the JIT global in Dispatch() and JitTrampoline()
Trims down a few more uses of the global variable by just passing the JIT instance we're dispatching or trampolining with as a parameter.
This commit is contained in:
@ -12,9 +12,14 @@
|
||||
|
||||
JitBase* g_jit;
|
||||
|
||||
void JitTrampoline(u32 em_address)
|
||||
const u8* JitBase::Dispatch(JitBase& jit)
|
||||
{
|
||||
g_jit->Jit(em_address);
|
||||
return jit.GetBlockCache()->Dispatch();
|
||||
}
|
||||
|
||||
void JitTrampoline(JitBase& jit, u32 em_address)
|
||||
{
|
||||
jit.Jit(em_address);
|
||||
}
|
||||
|
||||
u32 Helper_Mask(u8 mb, u8 me)
|
||||
|
@ -116,7 +116,7 @@ public:
|
||||
JitBase();
|
||||
~JitBase() override;
|
||||
|
||||
static const u8* Dispatch() { return g_jit->GetBlockCache()->Dispatch(); }
|
||||
static const u8* Dispatch(JitBase& jit);
|
||||
virtual JitBaseBlockCache* GetBlockCache() = 0;
|
||||
|
||||
virtual void Jit(u32 em_address) = 0;
|
||||
@ -127,7 +127,7 @@ public:
|
||||
virtual bool HandleStackFault() { return false; }
|
||||
};
|
||||
|
||||
void JitTrampoline(u32 em_address);
|
||||
void JitTrampoline(JitBase& jit, u32 em_address);
|
||||
|
||||
// Merged routines that should be moved somewhere better
|
||||
u32 Helper_Mask(u8 mb, u8 me);
|
||||
|
Reference in New Issue
Block a user