diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-17 19:29:04 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-17 19:29:04 +0000 |
commit | fe54c06bb15e4aac831d34510f85ac60a05819a9 (patch) | |
tree | c5fe338ba828667922ef001c6df7a932a78412e6 /gcc/optabs.h | |
parent | 522983c25b6397988b0be1d3c76a57ba46aee9c7 (diff) | |
download | gcc-fe54c06bb15e4aac831d34510f85ac60a05819a9.tar.gz |
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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181451 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.h')
-rw-r--r-- | gcc/optabs.h | 4 |
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 */ |