This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/3][ARM][PR target/65697] Strengthen barriers for compare-and-swap builtin.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]