On Thu, Nov 26, 2020 at 7:35 AM Krunal Bauskar <krunalbaus...@gmail.com> wrote: > * x86 uses optimized xchg operation. > ARM too started supporting it (using Large System Extension) with > ARM-v8.1 but since it not supported with ARM-v8, GCC default tends > to roll more generic load-store assembly code. > > * gcc-9.4+ onwards there is support for outline-atomics that could emit > both the variants of the code (load-store and cas/swp) and based on > underlying supported architecture proper variant it used but still a lot > of distros don't support GCC-9.4 as the default compiler.
I've checked that gcc 9.3 with "-march=armv8-a+lse" option uses LSE atomics... ------ Regards, Alexander Korotkov