X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Fuatomic_arch_ppc.h;h=710ce054e86514093f45024c573fdd3e33f58230;hb=2e6c64324e20fc31ccb6af3717e8d6b040869ed6;hp=39c4c2400113555519d8b3ce37d6db5cae710e4a;hpb=8760d94e0ef6d52260765a9246aaac073613055e;p=urcu.git diff --git a/urcu/uatomic_arch_ppc.h b/urcu/uatomic_arch_ppc.h index 39c4c24..710ce05 100644 --- a/urcu/uatomic_arch_ppc.h +++ b/urcu/uatomic_arch_ppc.h @@ -27,24 +27,12 @@ extern "C" { #endif -#ifndef __SIZEOF_LONG__ -#ifdef __powerpc64__ -#define __SIZEOF_LONG__ 8 -#else -#define __SIZEOF_LONG__ 4 -#endif -#endif - #ifdef __NO_LWSYNC__ #define LWSYNC_OPCODE "sync\n" #else #define LWSYNC_OPCODE "lwsync\n" #endif -#ifndef BITS_PER_LONG -#define BITS_PER_LONG (__SIZEOF_LONG__ * 8) -#endif - #define ILLEGAL_INSTR ".long 0xd00d00" /* @@ -118,7 +106,7 @@ unsigned long _uatomic_cmpxchg(void *addr, unsigned long old, __asm__ __volatile__( LWSYNC_OPCODE "1:\t" "lwarx %0,0,%1\n" /* load and reserve */ - "cmpd %0,%3\n" /* if load is not equal to */ + "cmpw %0,%3\n" /* if load is not equal to */ "bne 2f\n" /* old, fail */ "stwcx. %2,0,%1\n" /* else store conditional */ "bne- 1b\n" /* retry if lost reservation */