From 5bd02fb0033cfef3133a2250f41182e233124dad Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 17 Sep 2020 15:35:56 -0700 Subject: [PATCH] Fixes CASP IR op on interpreter when unified memory is enabled Noticed by Stef on 09/09/2020 as a curious code block that was failing Forgot about it until now since we couldn't see exactly where it was wrong Code block was mixing x87 (Which forces a fallback to Interpreter) and cmpxchg8b, which caused that code block to fail. Since this op was broken with Unified Memory + Interpreter it wasn't picked up by unit tests since those don't run in unified memory --- .../Source/Interface/Core/Interpreter/InterpreterCore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterCore.cpp b/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterCore.cpp index c9e3a1ea6..a867371b5 100644 --- a/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterCore.cpp +++ b/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterCore.cpp @@ -472,7 +472,7 @@ void InterpreterCore::ExecuteCode(FEXCore::Core::InternalThreadState *Thread) { case 4: { std::atomic *Data = {}; if (Thread->CTX->Config.UnifiedMemory) { - Data = GetSrc *>(SSAData, Op->Header.Args[2]); + Data = *GetSrc **>(SSAData, Op->Header.Args[2]); } else { Data = Thread->CTX->MemoryMapper.GetPointer *>(*GetSrc(SSAData, Op->Header.Args[2])); @@ -490,7 +490,7 @@ void InterpreterCore::ExecuteCode(FEXCore::Core::InternalThreadState *Thread) { case 8: { std::atomic<__uint128_t> *Data = {}; if (Thread->CTX->Config.UnifiedMemory) { - Data = GetSrc *>(SSAData, Op->Header.Args[2]); + Data = *GetSrc **>(SSAData, Op->Header.Args[2]); } else { Data = Thread->CTX->MemoryMapper.GetPointer *>(*GetSrc(SSAData, Op->Header.Args[2]));