Sujet : Re: portable proxy collector test...
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : comp.archDate : 09. Dec 2024, 22:03:44
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vj7lvg$ij5s$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
On 12/9/2024 2:22 AM,
aph@littlepinkcloud.invalid wrote:
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
>
Which compiler did you choose.? armv8?? Try ARM64.
>
The newer arms have new atomics
cas and atomic fetch ops.
>
LDREX/STREX is the older load store reserved.
On the newer stuff it's ldxr/stxr not ldrex/strex.
>
Well, for a ARM64 gcc 14.2.0 a relaxed fetch_add I get
__aarch64_ldadd8_acq_rel in the asm.
For gcc 13.2.1 -O2 -march=armv8.1-a I see a mixture of acq/rel and
relaxed. Are you sure you're looking at the right one?
Andrew.
Ahhh! So, when I use -O2 -march=armv8.1-a, I get:
https://godbolt.org/z/KrGvodb51______________________
main:
sub sp, sp, #16
mov x0, 123
mov x1, 1
str x0, [sp, 8]
add x0, sp, 8
ldadd x1, x1, [x0]
add sp, sp, 16
mov w0, 0
ret
______________________
:^)