diff --git a/FEXCore/Source/Interface/Context/Context.h b/FEXCore/Source/Interface/Context/Context.h index f7ef33bfa..14cd44822 100644 --- a/FEXCore/Source/Interface/Context/Context.h +++ b/FEXCore/Source/Interface/Context/Context.h @@ -373,7 +373,12 @@ private: std::shared_mutex CustomIRMutex; std::atomic HasCustomIRHandlers {}; - fextl::unordered_map> CustomIRHandlers; + struct CustomIRHandlerEntry final { + CustomIREntrypointHandler Handler; + void *Creator; + void *Data; + }; + fextl::unordered_map CustomIRHandlers; IntervalList ForceTSOValidRanges; // The ranges for which ForceTSOInstructions has populated data fextl::set ForceTSOInstructions; }; diff --git a/FEXCore/Source/Interface/Core/Core.cpp b/FEXCore/Source/Interface/Core/Core.cpp index ee2a861bf..ca6219b50 100644 --- a/FEXCore/Source/Interface/Core/Core.cpp +++ b/FEXCore/Source/Interface/Core/Core.cpp @@ -545,7 +545,7 @@ ContextImpl::GenerateIR(FEXCore::Core::InternalThreadState* Thread, uint64_t Gue if (Handler != CustomIRHandlers.end()) { TotalInstructions = 1; TotalInstructionsLength = 1; - std::get<0>(Handler->second)(GuestRIP, Thread->OpDispatcher.get()); + Handler->second.Handler(GuestRIP, Thread->OpDispatcher.get()); HasCustomIR = true; } } @@ -991,7 +991,7 @@ ContextImpl::AddCustomIREntrypoint(uintptr_t Entrypoint, CustomIREntrypointHandl std::unique_lock lk(CustomIRMutex); - auto InsertedIterator = CustomIRHandlers.emplace(Entrypoint, std::tuple(Handler, Creator, Data)); + auto InsertedIterator = CustomIRHandlers.emplace(Entrypoint, CustomIRHandlerEntry {Handler, Creator, Data}); HasCustomIRHandlers = true; if (!InsertedIterator.second) {