diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2011-11-07 20:06:39 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2011-11-07 20:06:39 +0000 |
commit | 0669295b1e7991bb5465267d4bd06576883e648b (patch) | |
tree | deab25b73551eb04852240c97020eb3e7a1060c6 /gcc/doc/extend.texi | |
parent | fd83db3d51f6379186a012f817d1f1ed003500b0 (diff) | |
download | gcc-0669295b1e7991bb5465267d4bd06576883e648b.zip gcc-0669295b1e7991bb5465267d4bd06576883e648b.tar.gz gcc-0669295b1e7991bb5465267d4bd06576883e648b.tar.bz2 |
atomic_base.h (atomic_thread_fence): Call builtin.
2011-11-07 Andrew MacLeod <amacleod@redhat.com>
libstdc++-v3
* include/bits/atomic_base.h (atomic_thread_fence): Call builtin.
(atomic_signal_fence): Call builtin.
(atomic_flag::test_and_set): Call __atomic_exchange when it is lockfree,
otherwise fall back to call __sync_lock_test_and_set.
(atomic_flag::clear): Call __atomic_store when it is lockfree,
otherwise fall back to call __sync_lock_release.
gcc
* doc/extend.texi: Docuemnt behaviour change for __atomic_exchange and
__atomic_store.
* optabs.c (expand_atomic_exchange): Expand to __sync_lock_test_and_set
only when originated from that builtin.
(expand_atomic_store): Expand to __sync_lock_release when originated
from that builtin.
* builtins.c (expand_builtin_sync_lock_test_and_set): Add flag that
expand_atomic_exchange call originated from here.
(expand_builtin_sync_lock_release): Add flag that expand_atomic_store
call originated from here.
(expand_builtin_atomic_exchange): Add origination flag.
(expand_builtin_atomic_store): Add origination flag.
* expr.h (expand_atomic_exchange, expand_atomic_store): Add boolean
parameters to indicate implementation fall back options.
From-SVN: r181111
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r-- | gcc/doc/extend.texi | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 91e4e32..c7e8ede 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -6910,9 +6910,7 @@ contents of @code{*@var{ptr}} in @code{*@var{ret}}. @deftypefn {Built-in Function} void __atomic_store_n (@var{type} *ptr, @var{type} val, int memmodel) This built-in function implements an atomic store operation. It writes -@code{@var{val}} into @code{*@var{ptr}}. On targets which are limited, -0 may be the only valid value. This mimics the behaviour of -@code{__sync_lock_release} on such hardware. +@code{@var{val}} into @code{*@var{ptr}}. The valid memory model variants are @code{__ATOMIC_RELAXED}, @code{__ATOMIC_SEQ_CST}, and @code{__ATOMIC_RELEASE}. @@ -6930,10 +6928,6 @@ This built-in function implements an atomic exchange operation. It writes @var{val} into @code{*@var{ptr}}, and returns the previous contents of @code{*@var{ptr}}. -On targets which are limited, a value of 1 may be the only valid value -written. This mimics the behaviour of @code{__sync_lock_test_and_set} on -such hardware. - The valid memory model variants are @code{__ATOMIC_RELAXED}, @code{__ATOMIC_SEQ_CST}, @code{__ATOMIC_ACQUIRE}, @code{__ATOMIC_RELEASE}, and @code{__ATOMIC_ACQ_REL}. |