1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

atomic.hpp: revert Clang < 11 workaround for u128

This commit is contained in:
Jan Beich 2020-12-22 03:40:10 +00:00 committed by Ivan
parent 5cb70ddbd5
commit 96bde3df81

View File

@ -974,13 +974,13 @@ struct atomic_storage<T, 16> : atomic_storage<T, 0>
#else #else
static inline T load(const T& dest) static inline T load(const T& dest)
{ {
__m128i r; T r;
#ifdef __AVX__ #ifdef __AVX__
__asm__ volatile("vmovdqa %1, %0;" : "=x" (r) : "m" (dest) : "memory"); __asm__ volatile("vmovdqa %1, %0;" : "=x" (r) : "m" (dest) : "memory");
#else #else
__asm__ volatile("movdqa %1, %0;" : "=x" (r) : "m" (dest) : "memory"); __asm__ volatile("movdqa %1, %0;" : "=x" (r) : "m" (dest) : "memory");
#endif #endif
return std::bit_cast<T>(r); return r;
} }
static inline T observe(const T& dest) static inline T observe(const T& dest)
@ -1048,9 +1048,9 @@ struct atomic_storage<T, 16> : atomic_storage<T, 0>
static inline void release(T& dest, T value) static inline void release(T& dest, T value)
{ {
#ifdef __AVX__ #ifdef __AVX__
__asm__ volatile("vmovdqa %0, %1;" :: "x" (reinterpret_cast<__m128i&>(value)), "m" (dest) : "memory"); __asm__ volatile("vmovdqa %0, %1;" :: "x" (reinterpret_cast<u128&>(value)), "m" (dest) : "memory");
#else #else
__asm__ volatile("movdqa %0, %1;" :: "x" (reinterpret_cast<__m128i&>(value)), "m" (dest) : "memory"); __asm__ volatile("movdqa %0, %1;" :: "x" (reinterpret_cast<u128&>(value)), "m" (dest) : "memory");
#endif #endif
} }
#endif #endif