aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2011-11-17 19:29:04 +0000
committerRichard Henderson <rth@redhat.com>2011-11-17 19:29:04 +0000
commit7e9bb5f6019de046c58219082ea803679967b9b1 (patch)
treec5fe338ba828667922ef001c6df7a932a78412e6 /gcc/optabs.h
parent2ba2a2fd4ff40997127b2d3115db8610b6567ab5 (diff)
Unify implementations of __builtin_mem_*_fence and __sync_synchronize.
* builtins.c (expand_builtin_mem_thread_fence): Remove. (expand_builtin_mem_signal_fence): Remove. (expand_builtin_atomic_thread_fence): Use expand_mem_thread_fence. (expand_builtin_sync_synchronize): Likewise. (expand_builtin_atomic_signal_fence): Use expand_mem_signal_fence. * optabs.c (expand_asm_memory_barrier): Split out from expand_builtin_mem_signal_fence. (expand_mem_thread_fence): New, a combination of code from expand_builtin_mem_thread_fence and expand_builtin_sync_synchronize. (expand_mem_signal_fence): Moved and renamed from expand_builtin_mem_signal_fence. (expand_atomic_exchange): Use expand_mem_thread_fence. (expand_atomic_load, expand_atomic_store): Likewise. * expr.h, optabs.h: Update decls. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@181451 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.h')
-rw-r--r--gcc/optabs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/optabs.h b/gcc/optabs.h
index 654d2766f40..ec13f6ff301 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -978,6 +978,10 @@ extern bool can_atomic_exchange_p (enum machine_mode, bool);
extern bool expand_atomic_compare_and_swap (rtx *, rtx *, rtx, rtx, rtx, bool,
enum memmodel, enum memmodel);
+/* Generate memory barriers. */
+extern void expand_mem_thread_fence (enum memmodel);
+extern void expand_mem_signal_fence (enum memmodel);
+
/* Check whether an operation represented by the code CODE is a
convert operation that is supported by the target platform in
vector form */