mips.md (UNSPEC_COMPARE_AND_SWAP, [...]): New define_constants.
commit8d2fc1c4811796a55e43641d8f862a88b1e0eac5
authorDavid Daney <ddaney@avtrex.com>
Mon, 3 Sep 2007 05:34:30 +0000 (3 05:34 +0000)
committerDavid Daney <daney@gcc.gnu.org>
Mon, 3 Sep 2007 05:34:30 +0000 (3 05:34 +0000)
tree063226fe667696eeb8a1acd3ac8cb45ca0210bae
parent200c50363b13d9a46c0d94942cbfa34bfecec8ab
mips.md (UNSPEC_COMPARE_AND_SWAP, [...]): New define_constants.

2007-09-02  David Daney  <ddaney@avtrex.com>

* config/mips/mips.md (UNSPEC_COMPARE_AND_SWAP, UNSPEC_SYNC_OLD_OP,
UNSPEC_SYNC_NEW_OP, UNSPEC_SYNC_EXCHANGE): New define_constants.
(optab, insn): Add more attributes.
(fetchop_bit): New code macro.
(immediate_insn): New code macro attribute.
(sync): Change condition to ISA_HAS_SYNC.
(rdhwr): Change predicate for operand 0 to register_operand.
(memory_barrier): New expand.
(sync_compare_and_swap<mode>, sync_add<mode>, sync_sub<mode>,
sync_old_add<mode>, sync_old_sub<mode>, sync_new_add<mode>,
sync_new_sub<mode>, sync_<optab><mode>, sync_old_<optab><mode>,
sync_new_<optab><mode>, sync_nand<mode>, sync_old_nand<mode>,
sync_new_nand<mode>, sync_lock_test_and_set<mode>): New insns.
* config/mips/mips.h (ISA_HAS_SYNC, ISA_HAS_LL_SC): New ISA predicates.
(MIPS_COMPARE_AND_SWAP, MIPS_SYNC_OP, MIPS_SYNC_OLD_OP,
MIPS_SYNC_NEW_OP, MIPS_SYNC_NAND, MIPS_SYNC_OLD_NAND,
MIPS_SYNC_NEW_NAND, MIPS_SYNC_EXCHANGE): New Macros.

2007-09-02  David Daney  <ddaney@avtrex.com>
* gcc.target/mips/gcc-have-sync-compare-and-swap-1.c: New test.
* gcc.target/mips/gcc-have-sync-compare-and-swap-2.c: Ditto.
* gcc.target/mips/atomic-memory-1.c: Ditto.
* testsuite/gcc.target/mips/atomic-memory-2.c: Ditto.

From-SVN: r128037
gcc/ChangeLog
gcc/config/mips/mips.h
gcc/config/mips/mips.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/mips/atomic-memory-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/atomic-memory-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c [new file with mode: 0644]