[ros-diffs] [ros-arm-bringup] 41868: Fix lack of casts in certain intrinsic functions, and add others that were being called but not yet implemented... hopefully 4.4 handles built-in intrinsics for ARM now (remains to be seen)

ros-arm-bringup at svn.reactos.org ros-arm-bringup at svn.reactos.org
Sat Jul 11 14:02:49 CEST 2009


Author: ros-arm-bringup
Date: Sat Jul 11 16:02:47 2009
New Revision: 41868

URL: http://svn.reactos.org/svn/reactos?rev=41868&view=rev
Log:
Fix lack of casts in certain intrinsic functions, and add others that were being called but not yet implemented... hopefully 4.4 handles built-in intrinsics for ARM now (remains to be seen)

Modified:
    trunk/reactos/include/crt/mingw32/intrin_arm.h

Modified: trunk/reactos/include/crt/mingw32/intrin_arm.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin_arm.h?rev=41868&r1=41867&r2=41868&view=diff
==============================================================================
--- trunk/reactos/include/crt/mingw32/intrin_arm.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/mingw32/intrin_arm.h [iso-8859-1] Sat Jul 11 16:02:47 2009
@@ -33,6 +33,21 @@
 #endif
 
 #define _ReadWriteBarrier() __sync_synchronize()
+
+__INTRIN_INLINE char _InterlockedCompareExchange8(volatile char * const Destination, const char Exchange, const char Comperand)
+{
+	return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
+}
+
+__INTRIN_INLINE short _InterlockedCompareExchange16(volatile short * const Destination, const short Exchange, const short Comperand)
+{
+	return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
+}
+
+__INTRIN_INLINE long _InterlockedExchangeAdd16(volatile short * const Addend, const short Value)
+{
+	return __sync_fetch_and_add(Addend, Value);
+}
 
 __INTRIN_INLINE long _InterlockedCompareExchange(volatile long * const dest, const long exch, const long comp)
 {
@@ -103,7 +118,7 @@
 
 __INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value)
 {
-    return _InterlockedExchange(Target, Value);
+    return (void *)_InterlockedExchange((volatile long * const)Target, (const long)Value);
 }
 
 __INTRIN_INLINE char _InterlockedAnd8(volatile char * const value, const char mask)



More information about the Ros-diffs mailing list