aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.h
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2011-11-07 20:06:39 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>2011-11-07 20:06:39 +0000
commit0669295b1e7991bb5465267d4bd06576883e648b (patch)
treedeab25b73551eb04852240c97020eb3e7a1060c6 /gcc/expr.h
parentfd83db3d51f6379186a012f817d1f1ed003500b0 (diff)
downloadgcc-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/expr.h')
-rw-r--r--gcc/expr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/expr.h b/gcc/expr.h
index 1623ad9..2cc8152 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -215,9 +215,9 @@ rtx emit_conditional_add (rtx, enum rtx_code, rtx, rtx, enum machine_mode,
rtx expand_sync_operation (rtx, rtx, enum rtx_code);
rtx expand_sync_fetch_operation (rtx, rtx, enum rtx_code, bool, rtx);
-rtx expand_atomic_exchange (rtx, rtx, rtx, enum memmodel);
+rtx expand_atomic_exchange (rtx, rtx, rtx, enum memmodel, bool);
rtx expand_atomic_load (rtx, rtx, enum memmodel);
-rtx expand_atomic_store (rtx, rtx, enum memmodel);
+rtx expand_atomic_store (rtx, rtx, enum memmodel, bool);
rtx expand_atomic_fetch_op (rtx, rtx, rtx, enum rtx_code, enum memmodel,
bool);
void expand_atomic_thread_fence (enum memmodel);