aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/c-family/c-cppbuiltin.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/c-family/c-cppbuiltin.c')
-rw-r--r--gcc-4.9/gcc/c-family/c-cppbuiltin.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/c-family/c-cppbuiltin.c b/gcc-4.9/gcc/c-family/c-cppbuiltin.c
index 2f2e7bae8..6a697f666 100644
--- a/gcc-4.9/gcc/c-family/c-cppbuiltin.c
+++ b/gcc-4.9/gcc/c-family/c-cppbuiltin.c
@@ -969,6 +969,33 @@ c_cpp_builtins (cpp_reader *pfile)
if (c_dialect_cxx () && TYPE_UNSIGNED (wchar_type_node))
cpp_define (pfile, "__WCHAR_UNSIGNED__");
+ /* Tell source code if the compiler makes sync_compare_and_swap
+ builtins available. */
+#ifdef HAVE_sync_compare_and_swapqi
+ if (HAVE_sync_compare_and_swapqi)
+ cpp_define (pfile, "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
+#endif
+
+#ifdef HAVE_sync_compare_and_swaphi
+ if (HAVE_sync_compare_and_swaphi)
+ cpp_define (pfile, "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
+#endif
+
+#ifdef HAVE_sync_compare_and_swapsi
+ if (HAVE_sync_compare_and_swapsi)
+ cpp_define (pfile, "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
+#endif
+
+#ifdef HAVE_sync_compare_and_swapdi
+ if (HAVE_sync_compare_and_swapdi)
+ cpp_define (pfile, "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
+#endif
+
+#ifdef HAVE_sync_compare_and_swapti
+ if (HAVE_sync_compare_and_swapti)
+ cpp_define (pfile, "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16");
+#endif
+
cpp_atomic_builtins (pfile);
#ifdef DWARF2_UNWIND_INFO
@@ -1028,6 +1055,8 @@ c_cpp_builtins (cpp_reader *pfile)
format. */
if (ENABLE_DECIMAL_FLOAT && ENABLE_DECIMAL_BID_FORMAT)
cpp_define (pfile, "__DECIMAL_BID_FORMAT__");
+ if (c_dialect_cxx () && flag_sized_delete)
+ cpp_define (pfile, "__GXX_DELETE_WITH_SIZE__");
}
/* Pass an object-like macro. If it doesn't lie in the user's