atomicity.h (__exchange_and_add, [...]): Add memory barrier to locking asm.
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Fri, 20 Aug 2004 16:08:49 +0000 (16:08 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 20 Aug 2004 16:08:49 +0000 (16:08 +0000)
* cpu/hppa/atomicity.h (__exchange_and_add, __atomic_add): Add memory
barrier to locking asm.

From-SVN: r86328

libstdc++-v3/ChangeLog
libstdc++-v3/config/cpu/hppa/atomicity.h

index 3569d6c27c9e9a32ad427d0ed1677c14299b649e..40b3a95dddfb7f5ccf6c7ac5f9dde738cb29a784 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       * cpu/hppa/atomicity.h (__exchange_and_add, __atomic_add): Add memory
+       barrier to locking asm.
+
 2004-08-20  Paolo Carlini  <pcarlini@suse.de>
 
        * include/c_std/cmath.tcc (__cmath_power): Revert previous commit:
index 48c8283a544652c8f806797873d9be889edcd124..3f711d13bbe3439b6ba714ba881050f5fa635321 100644 (file)
@@ -61,7 +61,8 @@ namespace __gnu_cxx
                          "nop\n\t"
                          "b,n .-20"
                          : "=&r" (tmp)
-                         : "r" (&lock));
+                         : "r" (&lock)
+                         : "memory");
     
     result = *__mem;
     *__mem = result + __val;
@@ -85,7 +86,8 @@ namespace __gnu_cxx
                          "nop\n\t"
                          "b,n .-20"
                          : "=&r" (tmp)
-                         : "r" (&lock));
+                         : "r" (&lock)
+                         : "memory");
     
     *__mem += __val;
     /* Reset lock with PA 2.0 "ordered" store.  */