Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-11-30 Thread Wilco Dijkstra
Hi Richard, Thanks for the review, now committed. > The new aarch64_split_compare_and_swap code looks a bit twisty. > The approach in lse.S seems more obvious.  But I'm guessing you > didn't want to spend any time restructuring the pre-LSE > -mno-outline-atomics code, and I agree the patch in its

Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-11-30 Thread Richard Sandiford
Wilco Dijkstra writes: > __sync_val_compare_and_swap may be used on 128-bit types and either calls the > outline atomic code or uses an inline loop. On AArch64 LDXP is only atomic if > the value is stored successfully using STXP, but the current implementations > do not perform the store if the c

Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-11-06 Thread Wilco Dijkstra
  ping   __sync_val_compare_and_swap may be used on 128-bit types and either calls the outline atomic code or uses an inline loop.  On AArch64 LDXP is only atomic if the value is stored successfully using STXP, but the current implementations do not perform the store if the comparison fails.  In

Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-10-16 Thread Wilco Dijkstra
Hi Ramana, > I remember this to be the previous discussions and common understanding. > > https://gcc.gnu.org/legacy-ml/gcc/2016-06/msg00017.html > > and here > > https://gcc.gnu.org/legacy-ml/gcc-patches/2017-02/msg00168.html > > Can you point any discussion recently that shows this has changed

Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-10-16 Thread Wilco Dijkstra
ping   __sync_val_compare_and_swap may be used on 128-bit types and either calls the outline atomic code or uses an inline loop.  On AArch64 LDXP is only atomic if the value is stored successfully using STXP, but the current implementations do not perform the store if the comparison fails.  In thi

Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-09-26 Thread Ramana Radhakrishnan
Hi Wilco, Thanks for your email. On Tue, Sep 26, 2023 at 12:07 AM Wilco Dijkstra wrote: > > Hi Ramana, > > >> __sync_val_compare_and_swap may be used on 128-bit types and either calls > >> the > >> outline atomic code or uses an inline loop. On AArch64 LDXP is only > >> atomic if > >> the val

Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-09-25 Thread Wilco Dijkstra
Hi Ramana, >> __sync_val_compare_and_swap may be used on 128-bit types and either calls the >> outline atomic code or uses an inline loop.  On AArch64 LDXP is only atomic >> if >> the value is stored successfully using STXP, but the current implementations >> do not perform the store if the compa

Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-09-25 Thread Ramana Radhakrishnan
On Wed, Sep 13, 2023 at 3:55 PM Wilco Dijkstra via Gcc-patches wrote: > > > __sync_val_compare_and_swap may be used on 128-bit types and either calls the > outline atomic code or uses an inline loop. On AArch64 LDXP is only atomic if > the value is stored successfully using STXP, but the current

[PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-09-13 Thread Wilco Dijkstra via Gcc-patches
__sync_val_compare_and_swap may be used on 128-bit types and either calls the outline atomic code or uses an inline loop. On AArch64 LDXP is only atomic if the value is stored successfully using STXP, but the current implementations do not perform the store if the comparison fails. In this case