From 05fe2893c723e89a319f859d3f21312550a82003 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Tue, 4 Nov 2025 17:53:38 +0100 Subject: [PATCH] JIT: Emit relocation from IROP_THUNK --- FEXCore/Source/Interface/Core/JIT/BranchOps.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/FEXCore/Source/Interface/Core/JIT/BranchOps.cpp b/FEXCore/Source/Interface/Core/JIT/BranchOps.cpp index b7e7723b1..a222684ec 100644 --- a/FEXCore/Source/Interface/Core/JIT/BranchOps.cpp +++ b/FEXCore/Source/Interface/Core/JIT/BranchOps.cpp @@ -328,8 +328,7 @@ DEF_OP(Thunk) { mov(ARMEmitter::Size::i64Bit, ARMEmitter::Reg::r0, GetReg(Op->ArgPtr)); - auto thunkFn = static_cast(ThreadState->CTX)->ThunkHandler->LookupThunk(Op->ThunkNameHash); - LoadConstant(ARMEmitter::Size::i64Bit, ARMEmitter::Reg::r2, (uintptr_t)thunkFn); + InsertNamedThunkRelocation(ARMEmitter::Reg::r2, Op->ThunkNameHash); if (!CTX->Config.DisableVixlIndirectCalls) [[unlikely]] { GenerateIndirectRuntimeCall(ARMEmitter::Reg::r2); } else {