From 20efadbe66a3f57bfa11bfccc532f0f895ff0d27 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Thu, 17 Jul 2025 17:27:36 +0100 Subject: [PATCH] OpcodeDispatcher: Treat ThunkOp ExitFunction as a return ThunkOp acts as an implicit return, mark it as such so the call-ret stack entry from the caller is popped --- FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp b/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp index c16f22e53..c1e95e5ad 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp @@ -126,7 +126,7 @@ void OpDispatchBuilder::ThunkOp(OpcodeArgs) { auto NewRIP = Pop(GPRSize); // Store the new RIP - ExitFunction(NewRIP); + ExitFunction(NewRIP, BranchHint::Return); BlockSetRIP = true; }