summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-27 18:17:40 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-27 18:17:40 +0000
commit91c56acf517454880a5cbc31d9b08c616ec9b2e5 (patch)
tree36185cf10da97c3c025f3c8ebf79e29fbf43f3f7
parentb2bbb6552cd35b778247d4a5fb88d7d55f297f59 (diff)
downloadppe42-gcc-91c56acf517454880a5cbc31d9b08c616ec9b2e5.tar.gz
ppe42-gcc-91c56acf517454880a5cbc31d9b08c616ec9b2e5.zip
2000-11-27 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37802 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog10
-rw-r--r--libstdc++-v3/config/cpu/powerpc/bits/atomicity.h27
2 files changed, 21 insertions, 16 deletions
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 <Franz.Sirl-kernel@lauterbach.com>
+
+ * 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 <gdr@codesourcery.com>
* 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 */
+
OpenPOWER on IntegriCloud