diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-26 21:48:27 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-26 21:48:27 +0000 |
commit | df1680c83ab28b632d1a8cb6c2fc107113379671 (patch) | |
tree | 17b613fdfa5fcce54d686ed0d50230a877200c9b /gcc/c-family/c-cppbuiltin.c | |
parent | ea17dfa70dc38f3570e63c1a4995161224e01add (diff) | |
download | gcc-df1680c83ab28b632d1a8cb6c2fc107113379671.tar.gz |
Define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL
* target.def (TARGET_ATOMIC_TEST_AND_SET_TRUEVAL): New.
* c-cppbuiltin.c (cpp_atomic_builtins): Define
__GCC_ATOMIC_TEST_AND_SET_TRUEVAL.
* doc/tm.texi.in (TARGET_ATOMIC_TEST_AND_SET_TRUEVAL): Add doc hook.
* doc/tm.texi: Rebuild.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183581 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-cppbuiltin.c')
-rw-r--r-- | gcc/c-family/c-cppbuiltin.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 7e7b9c15876..608dba6ecd4 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -670,6 +670,11 @@ cpp_atomic_builtins (cpp_reader *pfile) builtin_define_with_int_value ("__GCC_ATOMIC_LLONG_LOCK_FREE", (have_swap[SWAP_INDEX (long_long_integer_type_node)]? 2 : 1)); + /* If we're dealing with a "set" value that doesn't exactly correspond + to a boolean truth value, let the library work around that. */ + builtin_define_with_int_value ("__GCC_ATOMIC_TEST_AND_SET_TRUEVAL", + targetm.atomic_test_and_set_trueval); + /* ptr_type_node can't be used here since ptr_mode is only set when toplev calls backend_init which is not done with -E or pch. */ psize = POINTER_SIZE / BITS_PER_UNIT; |