diff options
Diffstat (limited to 'src/core/memory.cpp')
| -rw-r--r-- | src/core/memory.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 1c218566f..e10a4601e 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp | |||
| @@ -781,8 +781,7 @@ struct Memory::Impl { | |||
| 781 | }, | 781 | }, |
| 782 | [&]() { HandleRasterizerWrite(GetInteger(vaddr), sizeof(T)); }); | 782 | [&]() { HandleRasterizerWrite(GetInteger(vaddr), sizeof(T)); }); |
| 783 | if (ptr) { | 783 | if (ptr) { |
| 784 | const auto volatile_pointer = reinterpret_cast<volatile T*>(ptr); | 784 | return Common::AtomicCompareAndSwap(reinterpret_cast<T*>(ptr), data, expected); |
| 785 | return Common::AtomicCompareAndSwap(volatile_pointer, data, expected); | ||
| 786 | } | 785 | } |
| 787 | return true; | 786 | return true; |
| 788 | } | 787 | } |
| @@ -796,8 +795,7 @@ struct Memory::Impl { | |||
| 796 | }, | 795 | }, |
| 797 | [&]() { HandleRasterizerWrite(GetInteger(vaddr), sizeof(u128)); }); | 796 | [&]() { HandleRasterizerWrite(GetInteger(vaddr), sizeof(u128)); }); |
| 798 | if (ptr) { | 797 | if (ptr) { |
| 799 | const auto volatile_pointer = reinterpret_cast<volatile u64*>(ptr); | 798 | return Common::AtomicCompareAndSwap(reinterpret_cast<u64*>(ptr), data, expected); |
| 800 | return Common::AtomicCompareAndSwap(volatile_pointer, data, expected); | ||
| 801 | } | 799 | } |
| 802 | return true; | 800 | return true; |
| 803 | } | 801 | } |