Author: tfaber
Date: Tue May 1 15:45:49 2012
New Revision: 56467
URL:
http://svn.reactos.org/svn/reactos?rev=56467&view=rev
Log:
[CRT:INTRIN_X86]
- Use correct check for x64 architecture
- Fix Interlocked*64 return types
- Add _InterlockedXor64
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] Tue May 1 15:45:49 2012
@@ -75,7 +75,7 @@
/* TODO: __getcallerseflags but how??? */
/* Maybe the same for x86? */
-#ifdef _x86_64
+#ifdef __x86_64__
#define _alloca(s) __builtin_alloca(s)
#endif
@@ -109,10 +109,10 @@
_WriteBarrier();
}
-#ifdef _x86_64
+#ifdef __x86_64__
__INTRIN_INLINE void __faststorefence(void)
{
- long local;
+ long local;
__asm__ __volatile__("lock; orl $0, %0;" : : "m"(local));
}
#endif
@@ -198,7 +198,7 @@
}
#if defined(_M_AMD64)
-__INTRIN_INLINE long _InterlockedAnd64(volatile long long * const value, const long long
mask)
+__INTRIN_INLINE long long _InterlockedAnd64(volatile long long * const value, const long
long mask)
{
return __sync_fetch_and_and(value, mask);
}
@@ -220,7 +220,7 @@
}
#if defined(_M_AMD64)
-__INTRIN_INLINE long _InterlockedOr64(volatile long long * const value, const long long
mask)
+__INTRIN_INLINE long long _InterlockedOr64(volatile long long * const value, const long
long mask)
{
return __sync_fetch_and_or(value, mask);
}
@@ -240,6 +240,13 @@
{
return __sync_fetch_and_xor(value, mask);
}
+
+#if defined(_M_AMD64)
+__INTRIN_INLINE long long _InterlockedXor64(volatile long long * const value, const long
long mask)
+{
+ return __sync_fetch_and_xor(value, mask);
+}
+#endif
#else