Author: tkreuzer
Date: Sun May 30 15:02:29 2010
New Revision: 47442
URL:
http://svn.reactos.org/svn/reactos?rev=47442&view=rev
Log:
[intrin_x86.h]
- cast return value of __sync_val_compare_and_swap to make clang happy
- add __cdecl to a number of intrinsics to make them (hopefully) compatible with crt
header declarations.
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 May 30 15:02:29 2010
@@ -114,7 +114,7 @@
__INTRIN_INLINE void * _InterlockedCompareExchangePointer(void * volatile * const
Destination, void * const Exchange, void * const Comperand)
{
- return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
+ return (void *)__sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
__INTRIN_INLINE long _InterlockedExchange(volatile long * const Target, const long
Value)
@@ -137,7 +137,7 @@
{
/* NOTE: ditto */
__sync_synchronize();
- return __sync_lock_test_and_set(Target, Value);
+ return (void *)__sync_lock_test_and_set(Target, Value);
}
__INTRIN_INLINE long _InterlockedExchangeAdd16(volatile short * const Addend, const short
Value)
@@ -879,14 +879,14 @@
return retval;
}
-__INTRIN_INLINE unsigned int _rotl(unsigned int value, int shift)
+__INTRIN_INLINE unsigned int __cdecl _rotl(unsigned int value, int shift)
{
unsigned long retval;
__asm__("roll %b[shift], %k[retval]" : [retval] "=rm" (retval) :
"[retval]" (value), [shift] "Nc" (shift));
return retval;
}
-__INTRIN_INLINE unsigned int _rotr(unsigned int value, int shift)
+__INTRIN_INLINE unsigned int __cdecl _rotr(unsigned int value, int shift)
{
unsigned long retval;
__asm__("rorl %b[shift], %k[retval]" : [retval] "=rm" (retval) :
"[retval]" (value), [shift] "Nc" (shift));
@@ -956,14 +956,14 @@
return retval;
}
-__INTRIN_INLINE unsigned short _byteswap_ushort(unsigned short value)
+__INTRIN_INLINE unsigned short __cdecl _byteswap_ushort(unsigned short value)
{
unsigned short retval;
__asm__("rorw $8, %w[retval]" : [retval] "=rm" (retval) :
"[retval]" (value));
return retval;
}
-__INTRIN_INLINE unsigned long _byteswap_ulong(unsigned long value)
+__INTRIN_INLINE unsigned long __cdecl _byteswap_ulong(unsigned long value)
{
unsigned long retval;
__asm__("bswapl %[retval]" : [retval] "=r" (retval) :
"[retval]" (value));
@@ -971,7 +971,7 @@
}
#ifdef _M_AMD64
-__INTRIN_INLINE unsigned __int64 _byteswap_uint64(unsigned __int64 value)
+__INTRIN_INLINE unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 value)
{
unsigned __int64 retval;
__asm__("bswapq %[retval]" : [retval] "=r" (retval) :
"[retval]" (value));