Re: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 not defined on aarch64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26/06/17 08:37, Toebs Douglass wrote:
> Hej all.
> 
> __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 is defined on x86_64 if and only if
> -mcx16 is given.
> 
> gcc version 4.9.2 (Debian 4.9.2-10)
> winterflaw@localhost:~$ gcc -march=native -dM -E - < /dev/null | sort |
> grep SYNC
> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
> 
> __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 is not defined at all on aarch64, as
> far as I can tell.
> 
> gcc version 4.9.2 (Debian/Linaro 4.9.2-10)
> debian@pine64:~$ gcc -march=armv8-a+crypto+crc -dM -E - < /dev/null |
> sort | grep SYNC
> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
> 
> Both are the OS provided GCCs (Debian 8 in both cases).
> 
> 

This is correct.  AArch64 cannot do the 16-byte atomic compare and swap
and needs lock operations.

R.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux