=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: libport: Fix build on PowerPC.

Alexandre Julliard julliard at wine.codeweavers.com
Wed May 27 09:30:57 CDT 2015


Module: wine
Branch: master
Commit: 3b9f6449cde8756f8aa179944bd226f1acd545c4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3b9f6449cde8756f8aa179944bd226f1acd545c4

Author: André Hentschel <nerv at dawncrow.de>
Date:   Tue May 26 22:16:23 2015 +0200

libport: Fix build on PowerPC.

---

 libs/port/interlocked.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/libs/port/interlocked.c b/libs/port/interlocked.c
index cd6201a..efdfd2a 100644
--- a/libs/port/interlocked.c
+++ b/libs/port/interlocked.c
@@ -181,6 +181,9 @@ __ASM_GLOBAL_FUNC(interlocked_cmpxchg128,
                   "ret")
 
 #elif defined(__powerpc__)
+
+#if !(defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) && __SIZEOF_POINTER__ == 4) \
+ && !(defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) && __SIZEOF_POINTER__ == 8)
 void* interlocked_cmpxchg_ptr( void **dest, void* xchg, void* compare)
 {
     void *ret = 0;
@@ -198,13 +201,17 @@ void* interlocked_cmpxchg_ptr( void **dest, void* xchg, void* compare)
         : "cr0","memory");
     return ret;
 }
+#endif
 
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
 __int64 interlocked_cmpxchg64( __int64 *dest, __int64 xchg, __int64 compare)
 {
     /* FIXME: add code */
     assert(0);
 }
+#endif
 
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
 int interlocked_cmpxchg( int *dest, int xchg, int compare)
 {
     int ret = 0;
@@ -222,7 +229,9 @@ int interlocked_cmpxchg( int *dest, int xchg, int compare)
         : "cr0","memory","r0");
     return ret;
 }
+#endif
 
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
 int interlocked_xchg_add( int *dest, int incr )
 {
     int ret = 0;
@@ -239,7 +248,9 @@ int interlocked_xchg_add( int *dest, int incr )
     );
     return ret-incr;
 }
+#endif
 
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
 int interlocked_xchg( int* dest, int val )
 {
     int ret = 0;
@@ -253,7 +264,10 @@ int interlocked_xchg( int* dest, int val )
         : "cr0","memory","r0");
     return ret;
 }
+#endif
 
+#if !(defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) && __SIZEOF_POINTER__ == 4) \
+ && !(defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) && __SIZEOF_POINTER__ == 8)
 void* interlocked_xchg_ptr( void** dest, void* val )
 {
     void *ret = NULL;
@@ -267,6 +281,7 @@ void* interlocked_xchg_ptr( void** dest, void* val )
         : "cr0","memory","r0");
     return ret;
 }
+#endif
 
 #else
 




More information about the wine-cvs mailing list