diff options
author | Richard Henderson <rth@redhat.com> | 2005-04-19 21:54:11 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-04-19 21:54:11 -0700 |
commit | f12b785df384d2ffc150cd2f9b449aa4d8a54834 (patch) | |
tree | 4acdd6c4898d643fa0b840941a2d12315366ec66 /gcc/builtins.c | |
parent | f242e7690e6e838ec12e2d09fe1b5fc7929e20da (diff) | |
download | gcc-f12b785df384d2ffc150cd2f9b449aa4d8a54834.zip gcc-f12b785df384d2ffc150cd2f9b449aa4d8a54834.tar.gz gcc-f12b785df384d2ffc150cd2f9b449aa4d8a54834.tar.bz2 |
builtins.c (expand_builtin_sync_operation): Revert last change.
* builtins.c (expand_builtin_sync_operation): Revert last change.
* optabs.c (expand_bool_compare_and_swap): Compare vs old value,
not vs new value.
(expand_compare_and_swap_loop): Likewise.
(expand_sync_operation): Remove fallback from NAND to AND; invert
memory operand when expanding from cmpxchg.
(expand_sync_fetch_operation): Likewise.
* doc/extend.texi (Atomic Builtins): Fix docs for nand and
compare-and-swap.
* config/alpha/alpha.c (alpha_split_atomic_op): Invert memory operand
when implementing NAND. Fix double-add for AFTER.
* config/alpha/sync.md (sync_nand<I48MODE>): Invert memory operand.
(sync_old_nand<I48MODE>, sync_new_nand<I48MODE>): Likewise.
(sync_compare_and_swap<I48MODE>): Fix compare vs zero. Return old
memory value.
(sync_lock_test_and_set<I48MODE>): Remove extra label and last
memory barrier.
* config/i386/sync.md (sync_compare_and_swap<IMODE>): Fix pattern
to return old memory value.
(sync_compare_and_swap_cc<IMODE>): Likewise.
* config/ia64/ia64.c (ia64_dependencies_evaluation_hook): Early
return pre-reload. Don't consider output or anti dependencies.
* config/ia64/sync.md (IMODE): New.
(modesuffix): Add QI and HI.
(memory_barrier): Simplify expansion.
(sync_compare_and_swap<IMODE>): Use IMODE, not I48MODE.
(cmpxchg_acq_<IMODE>): Likewise.
(sync_lock_test_and_set<IMODE>): Likewise.
(sync_lock_release<IMODE>): Likewise.
From-SVN: r98436
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index e907752..33102e0 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -5255,20 +5255,13 @@ expand_builtin_sync_operation (tree arglist, enum rtx_code code, bool after, { enum machine_mode mode; rtx addr, val, mem; - tree valt; /* Expand the operands. */ addr = expand_expr (TREE_VALUE (arglist), NULL, Pmode, EXPAND_SUM); mode = TYPE_MODE (TREE_TYPE (TREE_TYPE (TREE_VALUE (arglist)))); arglist = TREE_CHAIN (arglist); - valt = TREE_VALUE (arglist); - if (code == NOT && TREE_CONSTANT (valt)) - { - valt = fold_build1 (BIT_NOT_EXPR, TREE_TYPE (valt), valt); - code = AND; - } - val = expand_expr (valt, NULL, mode, EXPAND_NORMAL); + val = expand_expr (TREE_VALUE (arglist), NULL, mode, EXPAND_NORMAL); /* Note that we explicitly do not want any alias information for this memory, so that we kill all other live memories. Otherwise we don't |