This is the mail archive of the gcc-help@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: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 not defined on aarch64


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]