diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2004-08-20 16:08:49 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2004-08-20 16:08:49 +0000 |
commit | dd8b67a1a87d69e5204da7bb0cb8dabaea839650 (patch) | |
tree | d49c3db59c0a81cf05aa432c6b0eddff7996ba1a /libstdc++-v3/config/cpu | |
parent | 6f4234e9d74648fb7d4a9a2dca67076454d07483 (diff) | |
download | gcc-dd8b67a1a87d69e5204da7bb0cb8dabaea839650.zip gcc-dd8b67a1a87d69e5204da7bb0cb8dabaea839650.tar.gz gcc-dd8b67a1a87d69e5204da7bb0cb8dabaea839650.tar.bz2 |
atomicity.h (__exchange_and_add, [...]): Add memory barrier to locking asm.
* cpu/hppa/atomicity.h (__exchange_and_add, __atomic_add): Add memory
barrier to locking asm.
From-SVN: r86328
Diffstat (limited to 'libstdc++-v3/config/cpu')
-rw-r--r-- | libstdc++-v3/config/cpu/hppa/atomicity.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libstdc++-v3/config/cpu/hppa/atomicity.h b/libstdc++-v3/config/cpu/hppa/atomicity.h index 48c8283..3f711d1 100644 --- a/libstdc++-v3/config/cpu/hppa/atomicity.h +++ b/libstdc++-v3/config/cpu/hppa/atomicity.h @@ -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. */ |