From dd8b67a1a87d69e5204da7bb0cb8dabaea839650 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Fri, 20 Aug 2004 16:08:49 +0000 Subject: [PATCH] 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 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/config/cpu/hppa/atomicity.h | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3569d6c27c9..40b3a95dddf 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2004-08-20 John David Anglin + + * cpu/hppa/atomicity.h (__exchange_and_add, __atomic_add): Add memory + barrier to locking asm. + 2004-08-20 Paolo Carlini * include/c_std/cmath.tcc (__cmath_power): Revert previous commit: diff --git a/libstdc++-v3/config/cpu/hppa/atomicity.h b/libstdc++-v3/config/cpu/hppa/atomicity.h index 48c8283a544..3f711d13bbe 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. */ -- 2.30.2