[*] Clang Win32 compilation

This commit is contained in:
Reece Wilson 2023-12-19 01:25:18 +00:00
parent 28e7a20fe8
commit 9c8f07cb5d

View File

@ -443,35 +443,35 @@ inline auline T AuAtomicUtils<T>::Load(T *in)
#endif
if constexpr (AuIsSame_v<AuUInt8, T>)
{
return ATOMIC_PREFIX_HAX(atomic_load)((atomic_uint_fast8_t *)in, __ATOMIC_ACQUIRE);
return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuUInt8) *)(in), __ATOMIC_ACQUIRE);
}
else if constexpr (AuIsSame_v<AuInt8, T>)
{
return ATOMIC_PREFIX_HAX(atomic_load)((atomic_int_fast8_t *)in, __ATOMIC_ACQUIRE);
return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuInt8) *)(in), __ATOMIC_ACQUIRE);
}
else if constexpr (AuIsSame_v<AuUInt16, T>)
{
return ATOMIC_PREFIX_HAX(atomic_load)((atomic_uint_fast16_t *)in, __ATOMIC_ACQUIRE);
return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuUInt16) *)(in), __ATOMIC_ACQUIRE);
}
else if constexpr (AuIsSame_v<AuInt16, T>)
{
return ATOMIC_PREFIX_HAX(atomic_load)((atomic_int_fast16_t *)in, __ATOMIC_ACQUIRE);
return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuInt16) *)(in), __ATOMIC_ACQUIRE);
}
else if constexpr (AuIsSame_v<AuUInt32, T>)
{
return ATOMIC_PREFIX_HAX(atomic_load)((atomic_uint_fast32_t *)in, __ATOMIC_ACQUIRE);
return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuUInt32) *)(in), __ATOMIC_ACQUIRE);
}
else if constexpr (AuIsSame_v<AuInt32, T>)
{
return ATOMIC_PREFIX_HAX(atomic_load)((atomic_int_fast32_t *)in, __ATOMIC_ACQUIRE);
return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuInt32) *)(in), __ATOMIC_ACQUIRE);
}
else if constexpr (AuIsSame_v<AuUInt64, T>)
{
return ATOMIC_PREFIX_HAX(atomic_load)((atomic_uint_fast64_t *)in, __ATOMIC_ACQUIRE);
return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuUInt64) *)(in), __ATOMIC_ACQUIRE);
}
else if constexpr (AuIsSame_v<AuInt64, T>)
{
return ATOMIC_PREFIX_HAX(atomic_load)((atomic_int_fast64_t *)in, __ATOMIC_ACQUIRE);
return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuInt64) *)(in), __ATOMIC_ACQUIRE);
}
else
{
@ -533,35 +533,35 @@ inline auline void AuAtomicUtils<T>::Store(T *in, T val)
#else
if constexpr (AuIsSame_v<AuUInt8, T>)
{
ATOMIC_PREFIX_HAX(atomic_store)((atomic_uint_fast8_t *)in, val, __ATOMIC_RELEASE);
ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuUInt8) *)(in), val, __ATOMIC_RELEASE);
}
else if constexpr (AuIsSame_v<AuInt8, T>)
{
ATOMIC_PREFIX_HAX(atomic_store)((atomic_int_fast8_t *)in, val, __ATOMIC_RELEASE);
ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuInt8) *)(in), val, __ATOMIC_RELEASE);
}
else if constexpr (AuIsSame_v<AuUInt16, T>)
{
ATOMIC_PREFIX_HAX(atomic_store)((atomic_uint_fast16_t *)in, val, __ATOMIC_RELEASE);
ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuUInt16) *)(in), val, __ATOMIC_RELEASE);
}
else if constexpr (AuIsSame_v<AuInt16, T>)
{
ATOMIC_PREFIX_HAX(atomic_store)((atomic_int_fast16_t *)in, val, __ATOMIC_RELEASE);
ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuInt16) *)(in), val, __ATOMIC_RELEASE);
}
else if constexpr (AuIsSame_v<AuUInt32, T>)
{
ATOMIC_PREFIX_HAX(atomic_store)((atomic_uint_fast32_t *)in, val, __ATOMIC_RELEASE);
ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuUInt32) *)(in), val, __ATOMIC_RELEASE);
}
else if constexpr (AuIsSame_v<AuInt32, T>)
{
ATOMIC_PREFIX_HAX(atomic_store)((atomic_int_fast32_t *)in, val, __ATOMIC_RELEASE);
ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuInt32) *)(in), val, __ATOMIC_RELEASE);
}
else if constexpr (AuIsSame_v<AuUInt64, T>)
{
ATOMIC_PREFIX_HAX(atomic_store)((atomic_uint_fast64_t *)in, val, __ATOMIC_RELEASE);
ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuUInt64) *)(in), val, __ATOMIC_RELEASE);
}
else if constexpr (AuIsSame_v<AuInt64, T>)
{
ATOMIC_PREFIX_HAX(atomic_store)((atomic_int_fast64_t *)in, val, __ATOMIC_RELEASE);
ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuInt64) *)(in), val, __ATOMIC_RELEASE);
}
else
{
@ -585,7 +585,7 @@ void AuAtomicUtils<AuUInt8>::ClearU8Lock(AuUInt8 *in)
// i think this will work on aarch64 and most risc architectures
//InterlockedAndRelease((volatile LONG *)in, ~0xFF);
#else
ATOMIC_PREFIX_HAX(atomic_store)((atomic_uint_fast8_t *)in, 0, __ATOMIC_RELEASE);
ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuUInt8) *)(in), 0, __ATOMIC_RELEASE);
#if !(defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86))
__sync_synchronize();
#endif