X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=arch_atomic_ppc.h;h=d666230fea7a80b0ee495990ce2e661750ebd406;hp=587fb8bbcc112dd8a97ed13b278d95c3bd4df7eb;hb=6edb297e0e3be79bdf91f841879d3358454a6601;hpb=e7061ad2321fd7f553095c5c13319931d177494b diff --git a/arch_atomic_ppc.h b/arch_atomic_ppc.h index 587fb8b..d666230 100644 --- a/arch_atomic_ppc.h +++ b/arch_atomic_ppc.h @@ -20,6 +20,14 @@ * Boehm-Demers-Weiser conservative garbage collector. */ +#ifndef __SIZEOF_LONG__ +#ifdef __powerpc64__ +#define __SIZEOF_LONG__ 8 +#else +#define __SIZEOF_LONG__ 4 +#endif +#endif + #ifndef BITS_PER_LONG #define BITS_PER_LONG (__SIZEOF_LONG__ * 8) #endif @@ -67,7 +75,7 @@ unsigned long atomic_exchange_64(volatile unsigned long *addr, "stdcx. %2,0,%1\n" /* else store conditional */ "bne- 1b\n" /* retry if lost reservation */ "isync\n" - : "=&r"(result), + : "=&r"(result) : "r"(addr), "r"(val) : "memory", "cc");