[AArch64] Use atomic load-operate instructions for update-fetch patterns.
authorMatthew Wahab <matthew.wahab@arm.com>
Tue, 22 Sep 2015 09:41:15 +0000 (09:41 +0000)
committerMatthew Wahab <mwahab@gcc.gnu.org>
Tue, 22 Sep 2015 09:41:15 +0000 (09:41 +0000)
commit68729b062d576417d74f9b807e2d9e8f659d2d06
tree59c5a33c77435f868488239bdf21d29239bee1be
parent641c2f8b69f799a00d0fda696d480e10505257c3
[AArch64] Use atomic load-operate instructions for update-fetch patterns.

2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* config/aarch64/aarch64-protos.h (aarch64_gen_atomic_ldop):
Adjust declaration.
* config/aarch64/aarch64.c (aarch64_emit_bic): New.
(aarch64_gen_atomic_ldop): Adjust comment.  Add parameter
out_result.  Update to support update-fetch operations.
* config/aarch64/atomics.md (aarch64_atomic_exchange<mode>_lse):
Adjust for change to aarch64_gen_atomic_ldop.
(aarch64_atomic_<atomic_optab><mode>_lse): Likewise.
(aarch64_atomic_fetch_<atomic_optab><mode>_lse): Likewise.
(atomic_<atomic_optab>_fetch<mode>): Change to an expander.
(aarch64_atomic_<atomic_optab>_fetch<mode>): New.
(aarch64_atomic_<atomic_optab>_fetch<mode>_lse): New.

gcc/testsuite
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* gcc.target/aarch64/atomic-inst-ldadd.c: Add tests for
update-fetch operations.
* gcc.target/aarch64/atomic-inst-ldlogic.c: Likewise.

From-SVN: r228002
gcc/ChangeLog
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/atomics.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/atomic-inst-ldadd.c
gcc/testsuite/gcc.target/aarch64/atomic-inst-ldlogic.c