mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-29 00:00:57 +01:00
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
This commit is contained in:
1 parent
2cb8db0abb
commit
5bd02fb003
1 file changed
+2
-2
@@ -472,7 +472,7 @@ void InterpreterCore::ExecuteCode(FEXCore::Core::InternalThreadState *Thread) {
|
||||
case 4: {
|
||||
std::atomic<uint64_t> *Data = {};
|
||||
if (Thread->CTX->Config.UnifiedMemory) {
|
||||
Data = GetSrc<std::atomic<uint64_t> *>(SSAData, Op->Header.Args[2]);
|
||||
Data = *GetSrc<std::atomic<uint64_t> **>(SSAData, Op->Header.Args[2]);
|
||||
}
|
||||
else {
|
||||
Data = Thread->CTX->MemoryMapper.GetPointer<std::atomic<uint64_t> *>(*GetSrc<uint64_t*>(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<std::atomic<__uint128_t> *>(SSAData, Op->Header.Args[2]);
|
||||
Data = *GetSrc<std::atomic<__uint128_t> **>(SSAData, Op->Header.Args[2]);
|
||||
}
|
||||
else {
|
||||
Data = Thread->CTX->MemoryMapper.GetPointer<std::atomic<__uint128_t> *>(*GetSrc<uint64_t*>(SSAData, Op->Header.Args[2]));
|
||||
|
||||
Reference in new issue
Block a user