OSDN Git Service

* cpu/hppa/atomicity.h (__exchange_and_add, __atomic_add): Add memory
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Aug 2004 16:08:49 +0000 (16:08 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Aug 2004 16:08:49 +0000 (16:08 +0000)
barrier to locking asm.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86328 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 3569d6c..40b3a95 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 48c8283..3f711d1 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.  */