Author: akhaldi
Date: Sun Sep 7 17:09:34 2014
New Revision: 64062
URL:
http://svn.reactos.org/svn/reactos?rev=64062&view=rev
Log:
[CRT/INTRIN_X86]
* Skip some intrinsics when compiling with Clang.
Modified:
trunk/reactos/include/crt/mingw32/intrin_x86.h
Modified: trunk/reactos/include/crt/mingw32/intrin_x86.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin…
==============================================================================
--- trunk/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] Sun Sep 7 17:09:34 2014
@@ -190,16 +190,18 @@
}
#ifndef __clang__
+
__INTRIN_INLINE long _InterlockedCompareExchange(volatile long * const Destination, const
long Exchange, const long Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
-#endif
__INTRIN_INLINE void * _InterlockedCompareExchangePointer(void * volatile * const
Destination, void * const Exchange, void * const Comperand)
{
return (void *)__sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
+
+#endif
__INTRIN_INLINE char _InterlockedExchange8(volatile char * const Target, const char
Value)
{
@@ -215,6 +217,8 @@
return __sync_lock_test_and_set(Target, Value);
}
+#ifndef __clang__
+
__INTRIN_INLINE long _InterlockedExchange(volatile long * const Target, const long
Value)
{
/* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full
barrier */
@@ -222,6 +226,15 @@
return __sync_lock_test_and_set(Target, Value);
}
+__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * const Target, void *
const Value)
+{
+ /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full
barrier */
+ __sync_synchronize();
+ return (void *)__sync_lock_test_and_set(Target, Value);
+}
+
+#endif
+
#if defined(_M_AMD64)
__INTRIN_INLINE long long _InterlockedExchange64(volatile long long * const Target, const
long long Value)
{
@@ -230,13 +243,6 @@
return __sync_lock_test_and_set(Target, Value);
}
#endif
-
-__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * const Target, void *
const Value)
-{
- /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full
barrier */
- __sync_synchronize();
- return (void *)__sync_lock_test_and_set(Target, Value);
-}
__INTRIN_INLINE long _InterlockedExchangeAdd16(volatile short * const Addend, const short
Value)
{