Commit 3b9f6449 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

libport: Fix build on PowerPC.

parent ab22ea74
...@@ -181,6 +181,9 @@ __ASM_GLOBAL_FUNC(interlocked_cmpxchg128, ...@@ -181,6 +181,9 @@ __ASM_GLOBAL_FUNC(interlocked_cmpxchg128,
"ret") "ret")
#elif defined(__powerpc__) #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* interlocked_cmpxchg_ptr( void **dest, void* xchg, void* compare)
{ {
void *ret = 0; void *ret = 0;
...@@ -198,13 +201,17 @@ void* interlocked_cmpxchg_ptr( void **dest, void* xchg, void* compare) ...@@ -198,13 +201,17 @@ void* interlocked_cmpxchg_ptr( void **dest, void* xchg, void* compare)
: "cr0","memory"); : "cr0","memory");
return ret; return ret;
} }
#endif
#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
__int64 interlocked_cmpxchg64( __int64 *dest, __int64 xchg, __int64 compare) __int64 interlocked_cmpxchg64( __int64 *dest, __int64 xchg, __int64 compare)
{ {
/* FIXME: add code */ /* FIXME: add code */
assert(0); assert(0);
} }
#endif
#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
int interlocked_cmpxchg( int *dest, int xchg, int compare) int interlocked_cmpxchg( int *dest, int xchg, int compare)
{ {
int ret = 0; int ret = 0;
...@@ -222,7 +229,9 @@ int interlocked_cmpxchg( int *dest, int xchg, int compare) ...@@ -222,7 +229,9 @@ int interlocked_cmpxchg( int *dest, int xchg, int compare)
: "cr0","memory","r0"); : "cr0","memory","r0");
return ret; return ret;
} }
#endif
#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
int interlocked_xchg_add( int *dest, int incr ) int interlocked_xchg_add( int *dest, int incr )
{ {
int ret = 0; int ret = 0;
...@@ -239,7 +248,9 @@ int interlocked_xchg_add( int *dest, int incr ) ...@@ -239,7 +248,9 @@ int interlocked_xchg_add( int *dest, int incr )
); );
return ret-incr; return ret-incr;
} }
#endif
#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
int interlocked_xchg( int* dest, int val ) int interlocked_xchg( int* dest, int val )
{ {
int ret = 0; int ret = 0;
...@@ -253,7 +264,10 @@ int interlocked_xchg( int* dest, int val ) ...@@ -253,7 +264,10 @@ int interlocked_xchg( int* dest, int val )
: "cr0","memory","r0"); : "cr0","memory","r0");
return ret; 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* interlocked_xchg_ptr( void** dest, void* val )
{ {
void *ret = NULL; void *ret = NULL;
...@@ -267,6 +281,7 @@ void* interlocked_xchg_ptr( void** dest, void* val ) ...@@ -267,6 +281,7 @@ void* interlocked_xchg_ptr( void** dest, void* val )
: "cr0","memory","r0"); : "cr0","memory","r0");
return ret; return ret;
} }
#endif
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment