linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
authorJohn David Anglin <danglin@gcc.gnu.org>
Wed, 23 Sep 2015 23:27:15 +0000 (23:27 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Wed, 23 Sep 2015 23:27:15 +0000 (23:27 +0000)
commitd572e4397d3615c8f85d67913cc7e072417b0b8d
tree449066e8134e9a201f20c520942ac5c696fd817a
parent9f59bddfbf2c345f831bc85dc6f28c894a3a1f0e
linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.

* config/pa/linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
(__sync_fetch_and_##OP##_##WIDTH): Change result to match type of
__kernel_cmpxchg2.
(__sync_##OP##_and_fetch_##WIDTH): Likewise.
(__sync_val_compare_and_swap_##WIDTH): Likewise.
(__sync_bool_compare_and_swap_##WIDTH): Likewise.
(__sync_lock_test_and_set_##WIDTH): Likewise.
(__sync_lock_release_##WIDTH): Likewise.
(__sync_fetch_and_##OP##_4): Change result to match type of
__kernel_cmpxchg.
(__sync_##OP##_and_fetch_4): Likewise.
(__sync_val_compare_and_swap_4): Likewise.
(__sync_bool_compare_and_swap_4): likewise.
(__sync_lock_test_and_set_4): Likewise.
(__sync_lock_release_4): Likewise.
(FETCH_AND_OP_2): Add long long variants.
(OP_AND_FETCH_2): Likewise.
(COMPARE_AND_SWAP_2 ): Likewise.
(SYNC_LOCK_TEST_AND_SET_2): Likewise.
(SYNC_LOCK_RELEASE_2): Likewise.
(__sync_bool_compare_and_swap_##WIDTH): Correct return.

From-SVN: r228065
libgcc/ChangeLog
libgcc/config/pa/linux-atomic.c