pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
authorJohn David Anglin <danglin@gcc.gnu.org>
Sat, 11 Aug 2018 21:37:55 +0000 (21:37 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sat, 11 Aug 2018 21:37:55 +0000 (21:37 +0000)
commit2b1969f6355abca6017fc817524a7d3cbd07f923
treeb4b1cc592f57238dd537334771852b2a8d3c05eb
parent8be591a9cd557be85e591a0362d220d84c296bd4
pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.

gcc
* config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
Update comment for atomic instructions.
(atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
Remove.
(atomic_loaddi): Revise fence expansion to only emit fence prior to
load for __ATOMIC_SEQ_CST model.
(atomic_loaddi_1): Remove float register target.
(atomic_storedi): Handle CONST_INT values.
(atomic_storedi_1): Remove float register source.  Add special case
for zero value.
(memory_barrier): New expander and insn.

libgcc
* config/pa/linux-atomic.c: Update comment.
(FETCH_AND_OP_2, OP_AND_FETCH_2, FETCH_AND_OP_WORD, OP_AND_FETCH_WORD,
COMPARE_AND_SWAP_2, __sync_val_compare_and_swap_4,
SYNC_LOCK_TEST_AND_SET_2, __sync_lock_test_and_set_4): Use
__ATOMIC_RELAXED for atomic loads.
(SYNC_LOCK_RELEASE_1): New define.  Use __sync_synchronize() and
unordered store to release lock.
(__sync_lock_release_8): Likewise.
(SYNC_LOCK_RELEASE_2): Remove define.

From-SVN: r263488
gcc/ChangeLog
gcc/config/pa/pa.md
libgcc/ChangeLog
libgcc/config/pa/linux-atomic.c