parent
1fc5d37fd2
commit
e1dbea3658
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/GeckoCode.h"
|
||||
#include "Core/HLE/HLE_Misc.h"
|
||||
#include "Core/HLE/HLE_OS.h"
|
||||
|
@ -165,6 +166,13 @@ void Execute(const Core::CPUThreadGuard& guard, u32 current_pc, u32 hook_index)
|
|||
}
|
||||
}
|
||||
|
||||
void ExecuteFromJIT(u32 current_pc, u32 hook_index)
|
||||
{
|
||||
ASSERT(Core::IsCPUThread());
|
||||
Core::CPUThreadGuard guard;
|
||||
Execute(guard, current_pc, hook_index);
|
||||
}
|
||||
|
||||
u32 GetHookByAddress(u32 address)
|
||||
{
|
||||
auto iter = s_hooked_addresses.find(address);
|
||||
|
|
|
@ -48,6 +48,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);
|
||||
|
||||
// Returns the HLE hook index of the address
|
||||
u32 GetHookByAddress(u32 address);
|
||||
|
|
|
@ -483,7 +483,7 @@ void Jit64::HLEFunction(u32 hook_index)
|
|||
gpr.Flush();
|
||||
fpr.Flush();
|
||||
ABI_PushRegistersAndAdjustStack({}, 0);
|
||||
ABI_CallFunctionCC(HLE::Execute, js.compilerPC, hook_index);
|
||||
ABI_CallFunctionCC(HLE::ExecuteFromJIT, js.compilerPC, hook_index);
|
||||
ABI_PopRegistersAndAdjustStack({}, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ void JitArm64::HLEFunction(u32 hook_index)
|
|||
gpr.Flush(FlushMode::All, ARM64Reg::INVALID_REG);
|
||||
fpr.Flush(FlushMode::All, ARM64Reg::INVALID_REG);
|
||||
|
||||
MOVP2R(ARM64Reg::X8, &HLE::Execute);
|
||||
MOVP2R(ARM64Reg::X8, &HLE::ExecuteFromJIT);
|
||||
MOVI2R(ARM64Reg::W0, js.compilerPC);
|
||||
MOVI2R(ARM64Reg::W1, hook_index);
|
||||
BLR(ARM64Reg::X8);
|
||||
|
|
Loading…
Reference in New Issue