builtins.c (expand_builtin_sync_operation): Revert last change.
authorRichard Henderson <rth@redhat.com>
Wed, 20 Apr 2005 04:54:11 +0000 (21:54 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 20 Apr 2005 04:54:11 +0000 (21:54 -0700)
commitf12b785df384d2ffc150cd2f9b449aa4d8a54834
tree4acdd6c4898d643fa0b840941a2d12315366ec66
parentf242e7690e6e838ec12e2d09fe1b5fc7929e20da
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
15 files changed:
gcc/ChangeLog
gcc/builtins.c
gcc/config/alpha/alpha.c
gcc/config/alpha/sync.md
gcc/config/i386/sync.md
gcc/config/ia64/ia64.c
gcc/config/ia64/sync.md
gcc/doc/extend.texi
gcc/optabs.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ia64-sync-1.c
gcc/testsuite/gcc.dg/ia64-sync-2.c
gcc/testsuite/gcc.dg/ia64-sync-3.c
gcc/testsuite/gcc.dg/ia64-sync-4.c
gcc/testsuite/lib/target-supports.exp