This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/3][ARM][PR target/65697] Strengthen barriers for compare-and-swap builtin.
- From: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>
- To: Matthew Wahab <matthew dot wahab at arm dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 29 Jun 2015 14:08:14 +0100
- Subject: Re: [PATCH 2/3][ARM][PR target/65697] Strengthen barriers for compare-and-swap builtin.
- Authentication-results: sourceware.org; auth=none
- References: <5587DA07 dot 10307 at arm dot com> <5587DA63 dot 4030500 at arm dot com>
- Reply-to: ramrad01 at arm dot com
On Mon, Jun 22, 2015 at 10:50 AM, Matthew Wahab <matthew.wahab@arm.com> wrote:
> This is the ARM version of the patches to strengthen memory barriers for the
> __sync builtins on ARMv8 targets
> (https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01989.html).
>
> This patch changes the code generated for __sync_type_compare_and_swap to
> remove
> the acquire-barrier from the load and end the operation with a fence. This
> also
> strengthens the acquire barrier generated for __sync_lock_test_and_set
> which,
> like compare-and-swap, is implemented as a form of atomic exchange.
>
> Tested as part of a series for arm-none-linux-gnueabihf with check-gcc.
>
> Ok for trunk?
> Matthew
>
> gcc/
> 2015-06-22 Matthew Wahab <matthew.wahab@arm.com>
>
> PR Target/65697
s/Target/target
> * config/armc/arm.c (arm_split_compare_and_swap): For ARMv8, replace
> an
> initial acquire barrier with a final full barrier.
>
OK.
Ramana