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: __sync_lock_test_and_set on ARM


David Daney wrote:
The proper symbol to test would be something like: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 or __GCC_HAVE_SYNC_LOCK_TEST_AND_SET_4 they are automatically set by GCC when the builtin functions are available.

$ /home/daney/gccsvn/mips64-trunk/gcc/xgcc -B/home/daney/gccsvn/mips64-trunk/gcc/ -E -dM st.c | grep SYNC
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1

Looking at http://gcc.gnu.org/viewcvs/trunk/gcc/c-cppbuiltin.c?revision=128218&view=markup
it seems that the __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n macros are explicitly defined if the machine supports them, but not any of the other __SYNC_something builtins. Unless they come from somewhere else.


It's a shame that the viewcvs web thing doesn't have a "grep -R" feature! Could someone with a source tree handly perhaps do a grep -R HAVE_SYNC and see whether it finds anything else?


Regards,


Phil.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]