diff --git a/FEXCore/Source/Interface/Context/Context.h b/FEXCore/Source/Interface/Context/Context.h index d477988452..ccf7df3d4f 100644 --- a/FEXCore/Source/Interface/Context/Context.h +++ b/FEXCore/Source/Interface/Context/Context.h @@ -440,6 +440,4 @@ namespace FEXCore::Context { fextl::unordered_map> CustomIRHandlers; FEXCore::CPU::DispatcherConfig DispatcherConfig; }; - - uint64_t HandleSyscall(FEXCore::HLE::SyscallHandler *Handler, FEXCore::Core::CpuStateFrame *Frame, FEXCore::HLE::SyscallArguments *Args); } diff --git a/FEXCore/Source/Interface/Core/Core.cpp b/FEXCore/Source/Interface/Core/Core.cpp index 45ba73008f..98225dca9f 100644 --- a/FEXCore/Source/Interface/Core/Core.cpp +++ b/FEXCore/Source/Interface/Core/Core.cpp @@ -1269,12 +1269,6 @@ namespace FEXCore::Context { }); } - uint64_t HandleSyscall(FEXCore::HLE::SyscallHandler *Handler, FEXCore::Core::CpuStateFrame *Frame, FEXCore::HLE::SyscallArguments *Args) { - uint64_t Result{}; - Result = Handler->HandleSyscall(Frame, Args); - return Result; - } - IR::AOTIRCacheEntry *ContextImpl::LoadAOTIRCacheEntry(const fextl::string &filename) { auto rv = IRCaptureCache.LoadAOTIRCacheEntry(filename); return rv; diff --git a/FEXCore/Source/Interface/Core/JIT/Arm64/JIT.cpp b/FEXCore/Source/Interface/Core/JIT/Arm64/JIT.cpp index fe3454b751..c886ed4ef4 100644 --- a/FEXCore/Source/Interface/Core/JIT/Arm64/JIT.cpp +++ b/FEXCore/Source/Interface/Core/JIT/Arm64/JIT.cpp @@ -29,6 +29,7 @@ desc: Main glue logic of the arm64 splatter backend #include #include #include +#include #include "Interface/Core/Interpreter/InterpreterOps.h" @@ -574,8 +575,11 @@ Arm64JITCore::Arm64JITCore(FEXCore::Context::ContextImpl *ctx, FEXCore::Core::In Common.XCRFunction = PMF.GetConvertedPointer(); } - Common.SyscallHandlerObj = reinterpret_cast(CTX->SyscallHandler); - Common.SyscallHandlerFunc = reinterpret_cast(FEXCore::Context::HandleSyscall); + { + FEXCore::Utils::MemberFunctionToPointerCast PMF(&FEXCore::HLE::SyscallHandler::HandleSyscall); + Common.SyscallHandlerObj = reinterpret_cast(CTX->SyscallHandler); + Common.SyscallHandlerFunc = PMF.GetVTableEntry(CTX->SyscallHandler); + } Common.ExitFunctionLink = reinterpret_cast(&Context::ContextImpl::ThreadExitFunctionLink); // Fill in the fallback handlers