mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Core/HLE/HLE: Remove global system accessor from ExecuteFromJIT()
We can just pass in our system instance via the ABI function helpers.
This commit is contained in:
parent
f4277a901a
commit
c0b7e9cd94
@ -166,10 +166,10 @@ void Execute(const Core::CPUThreadGuard& guard, u32 current_pc, u32 hook_index)
|
||||
}
|
||||
}
|
||||
|
||||
void ExecuteFromJIT(u32 current_pc, u32 hook_index)
|
||||
void ExecuteFromJIT(u32 current_pc, u32 hook_index, Core::System& system)
|
||||
{
|
||||
ASSERT(Core::IsCPUThread());
|
||||
Core::CPUThreadGuard guard(Core::System::GetInstance());
|
||||
Core::CPUThreadGuard guard(system);
|
||||
Execute(guard, current_pc, hook_index);
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ void Patch(Core::System& system, u32 pc, std::string_view func_name);
|
||||
u32 UnPatch(Core::System& system, std::string_view patch_name);
|
||||
u32 UnpatchRange(Core::System& system, u32 start_addr, u32 end_addr);
|
||||
void Execute(const Core::CPUThreadGuard& guard, u32 current_pc, u32 hook_index);
|
||||
void ExecuteFromJIT(u32 current_pc, u32 hook_index);
|
||||
void ExecuteFromJIT(u32 current_pc, u32 hook_index, Core::System& system);
|
||||
|
||||
// Returns the HLE hook index of the address
|
||||
u32 GetHookByAddress(u32 address);
|
||||
|
@ -396,7 +396,7 @@ void Jit64::HLEFunction(u32 hook_index)
|
||||
gpr.Flush();
|
||||
fpr.Flush();
|
||||
ABI_PushRegistersAndAdjustStack({}, 0);
|
||||
ABI_CallFunctionCC(HLE::ExecuteFromJIT, js.compilerPC, hook_index);
|
||||
ABI_CallFunctionCCP(HLE::ExecuteFromJIT, js.compilerPC, hook_index, &m_system);
|
||||
ABI_PopRegistersAndAdjustStack({}, 0);
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ void JitArm64::HLEFunction(u32 hook_index)
|
||||
gpr.Flush(FlushMode::All, ARM64Reg::INVALID_REG);
|
||||
fpr.Flush(FlushMode::All, ARM64Reg::INVALID_REG);
|
||||
|
||||
ABI_CallFunction(&HLE::ExecuteFromJIT, js.compilerPC, hook_index);
|
||||
ABI_CallFunction(&HLE::ExecuteFromJIT, js.compilerPC, hook_index, &m_system);
|
||||
}
|
||||
|
||||
void JitArm64::DoNothing(UGeckoInstruction inst)
|
||||
|
Loading…
Reference in New Issue
Block a user