diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-24 23:14:31 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-24 23:14:31 +0000 |
commit | 7821cde17c13b06463a34e7b6888ef168f38ee8d (patch) | |
tree | bf092826976e956804e16b109cecf1f0d3830700 /gcc/expr.h | |
parent | b5a229ff4f4b0943e3f38a8107df9e05285e3584 (diff) | |
download | gcc-7821cde17c13b06463a34e7b6888ef168f38ee8d.tar.gz |
2011-11-24 Andrew MacLeod <amacleod@redhat.com>
* optab.c (maybe_emit_atomic_exchange): New. Try to emit an
atomic_exchange pattern.
(maybe_emit_sync_lock_test_and_set): New. Try to emit an exchange
using __sync_lock_test_and_set.
(maybe_emit_compare_and_swap_exchange_loop): New. Try to emit an
exchange using a compare_and_swap loop.
(expand_sync_lock_test_and_set): New. Expand sync_lock_test_and_set.
(expand_atomic_test_and_set): New. Expand test_and_set operation.
(expand_atomic_exchange): Use new maybe_emit_* functions.
(expand_atomic_store): Use new maybe_emit_* functions.
* builtins.c (expand_builtin_sync_lock_test_and_set): Call
expand_sync_lock_test_and_set routine.
(expand_builtin_atomic_exchange): Remove parameter from call.
(expand_builtin_atomic_clear): Use atomic_clear pattern if present.
(expand_builtin_atomic_test_and_set): Add target and simply call
expand_atomic_test_and_set.
(expand_builtin): Add target to expand_builtin_atomic_test_and_set.
* expr.h (expand_atomic_exchange): Add parameter.
(expand_sync_lock_test_and_set): New prototype.
(expand_atomic_test_and_set, expand_atomic_clear): New prototypes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181702 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.h')
-rw-r--r-- | gcc/expr.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/expr.h b/gcc/expr.h index 4b923a53e66..7a323bacd6a 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -214,12 +214,15 @@ 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_sync_lock_test_and_set (rtx, rtx, rtx); -rtx expand_atomic_exchange (rtx, rtx, rtx, enum memmodel, bool); +rtx expand_atomic_exchange (rtx, rtx, rtx, enum memmodel); rtx expand_atomic_load (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); +rtx expand_atomic_test_and_set (rtx, rtx, enum memmodel); +rtx expand_atomic_clear (rtx, enum memmodel); void expand_atomic_thread_fence (enum memmodel); void expand_atomic_signal_fence (enum memmodel); |