Commit 7a9d1e1a authored by Eddie Kohler's avatar Eddie Kohler

Add test for __has_trivial_copy compiler intrinsic.

parent b89b46da
...@@ -49,6 +49,9 @@ ...@@ -49,6 +49,9 @@
/* Define if you have the __builtin_ffsll function. */ /* Define if you have the __builtin_ffsll function. */
#undef HAVE___BUILTIN_FFSLL #undef HAVE___BUILTIN_FFSLL
/* Define if you have the __has_trivial_copy compiler intrinsic. */
#undef HAVE___HAS_TRIVIAL_COPY
/* Define if you have the __sync_synchronize function. */ /* Define if you have the __sync_synchronize function. */
#undef HAVE___SYNC_SYNCHRONIZE #undef HAVE___SYNC_SYNCHRONIZE
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -430,7 +430,7 @@ fi ...@@ -430,7 +430,7 @@ fi
CLICK_CHECK_ENDIAN CLICK_CHECK_ENDIAN
CLICK_CHECK_SIGNED_SHIFT CLICK_CHECK_SIGNED_SHIFT
CLICK_CHECK_ADDRESSABLE_VA_LIST CLICK_CHECK_ADDRESSABLE_VA_LIST
CLICK_CHECK_INTEGER_BUILTINS CLICK_CHECK_COMPILER_INTRINSICS
dnl dnl
......
...@@ -159,7 +159,7 @@ fi ...@@ -159,7 +159,7 @@ fi
CLICK_CHECK_ENDIAN CLICK_CHECK_ENDIAN
CLICK_CHECK_SIGNED_SHIFT CLICK_CHECK_SIGNED_SHIFT
CLICK_CHECK_ADDRESSABLE_VA_LIST CLICK_CHECK_ADDRESSABLE_VA_LIST
CLICK_CHECK_INTEGER_BUILTINS CLICK_CHECK_COMPILER_INTRINSICS
dnl dnl
......
...@@ -679,11 +679,11 @@ AC_DEFUN([CLICK_CHECK_SIGNED_SHIFT], [ ...@@ -679,11 +679,11 @@ AC_DEFUN([CLICK_CHECK_SIGNED_SHIFT], [
dnl dnl
dnl CLICK_CHECK_INTEGER_BUILTINS dnl CLICK_CHECK_COMPILER_INTRINSICS
dnl Checks for '__builtin_clz', '__builtin_clzll', and other builtins. dnl Checks for '__builtin_clz', '__builtin_clzll', and other intrinsics.
dnl dnl
AC_DEFUN([CLICK_CHECK_INTEGER_BUILTINS], [ AC_DEFUN([CLICK_CHECK_COMPILER_INTRINSICS], [
AC_CACHE_CHECK([for __builtin_clz], [ac_cv_have___builtin_clz], AC_CACHE_CHECK([for __builtin_clz], [ac_cv_have___builtin_clz],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[volatile int x = 11;]], [[int y = __builtin_clz(x);]])], [ac_cv_have___builtin_clz=yes], [ac_cv_have___builtin_clz=no])]) [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[volatile int x = 11;]], [[int y = __builtin_clz(x);]])], [ac_cv_have___builtin_clz=yes], [ac_cv_have___builtin_clz=no])])
if test $ac_cv_have___builtin_clz = yes; then if test $ac_cv_have___builtin_clz = yes; then
...@@ -727,6 +727,12 @@ AC_DEFUN([CLICK_CHECK_INTEGER_BUILTINS], [ ...@@ -727,6 +727,12 @@ AC_DEFUN([CLICK_CHECK_INTEGER_BUILTINS], [
AC_DEFINE([HAVE___SYNC_SYNCHRONIZE_ARGUMENTS], [1], [Define if the __sync_synchronize function supports arguments.]) AC_DEFINE([HAVE___SYNC_SYNCHRONIZE_ARGUMENTS], [1], [Define if the __sync_synchronize function supports arguments.])
fi fi
AC_CACHE_CHECK([for __has_trivial_copy], [ac_cv_have___has_trivial_copy],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[long x = 1; if (__has_trivial_copy(long)) x = 0;]])], [ac_cv_have___has_trivial_copy=yes], [ac_cv_have___has_trivial_copy=no])])
if test $ac_cv_have___has_trivial_copy = yes; then
AC_DEFINE([HAVE___HAS_TRIVIAL_COPY], [1], [Define if you have the __has_trivial_copy compiler intrinsic.])
fi
AC_CHECK_HEADERS(strings.h) AC_CHECK_HEADERS(strings.h)
AC_CHECK_FUNCS(ffs ffsl ffsll) AC_CHECK_FUNCS(ffs ffsl ffsll)
]) ])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment