diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 88017f76182..1da793858dd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,13 @@ +2000-11-27 Franz Sirl + + * config/cpu/powerpc/bits/atomicity.h: Replace '__ATOMICITY_INLINE' + with 'inline'. + (__ex__atomic_add): Add __volatile__ to asm. + (__atomic_add): Likewise. + (__compare_and_swap): Likewise. + (__always_swap): Likewise. + (__test_and_set): Likewise. + 2000-11-27 Gabriel Dos Reis * tests_flags.in: Update documentation to reflect the change diff --git a/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h b/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h index 4cd9e0327fc..cd77f989c93 100644 --- a/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h +++ b/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h @@ -22,18 +22,12 @@ typedef int _Atomic_word; -#if BROKEN_PPC_ASM_CR0 -# define __ATOMICITY_INLINE /* nothing */ -#else -# define __ATOMICITY_INLINE inline -#endif - -static __ATOMICITY_INLINE _Atomic_word +static inline _Atomic_word __attribute__ ((__unused__)) __exchange_and_add (volatile _Atomic_word* __mem, int __val) { _Atomic_word __tmp, __res; - __asm__ ("\ + __asm__ __volatile__ ("\ 0: lwarx %0,0,%2 add%I3 %1,%0,%3 stwcx. %1,0,%2 @@ -42,12 +36,12 @@ __exchange_and_add (volatile _Atomic_word* __mem, int __val) return __res; } -static __ATOMICITY_INLINE void +static inline void __attribute__ ((__unused__)) __atomic_add (volatile _Atomic_word *__mem, int __val) { _Atomic_word __tmp; - __asm__ ("\ + __asm__ __volatile__ ("\ 0: lwarx %0,0,%1 add%I2 %0,%0,%2 stwcx. %0,0,%1 @@ -55,12 +49,12 @@ __atomic_add (volatile _Atomic_word *__mem, int __val) " : "=&b"(__tmp) : "r" (__mem), "Ir"(__val) : "cr0", "memory"); } -static __ATOMICITY_INLINE int +static inline int __attribute__ ((__unused__)) __compare_and_swap (volatile long *__p, long int __oldval, long int __newval) { int __res; - __asm__ ("\ + __asm__ __volatile__ ("\ 0: lwarx %0,0,%1 sub%I2c. %0,%0,%2 cntlzw %0,%0 @@ -72,12 +66,12 @@ __compare_and_swap (volatile long *__p, long int __oldval, long int __newval) return __res >> 5; } -static __ATOMICITY_INLINE long +static inline long __attribute__ ((__unused__)) __always_swap (volatile long *__p, long int __newval) { long __res; - __asm__ ("\ + __asm__ __volatile__ ("\ 0: lwarx %0,0,%1 stwcx. %2,0,%1 bne- 0b @@ -85,12 +79,12 @@ __always_swap (volatile long *__p, long int __newval) return __res; } -static __ATOMICITY_INLINE int +static inline int __attribute__ ((__unused__)) __test_and_set (volatile long *__p, long int __newval) { int __res; - __asm__ ("\ + __asm__ __volatile__ ("\ 0: lwarx %0,0,%1 cmpwi %0,0 bne- 1f @@ -102,3 +96,4 @@ __test_and_set (volatile long *__p, long int __newval) } #endif /* atomicity.h */ +