about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc32/fpu/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc32/fpu/configure.ac')
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc32/fpu/configure.ac b/sysdeps/powerpc/powerpc32/fpu/configure.ac
index e596e793ae..1899705aab 100644
--- a/sysdeps/powerpc/powerpc32/fpu/configure.ac
+++ b/sysdeps/powerpc/powerpc32/fpu/configure.ac
@@ -16,3 +16,19 @@ rm -rf conftest*])
 if test $libc_cv_ppc_fcfid = yes; then
   AC_DEFINE([HAVE_PPC_FCFID])
 fi
+
+# Test whether floating point to long long conversions use fctidz.
+AC_CACHE_CHECK([for fctidz use], [libc_cv_ppc_fctidz], [dnl
+echo 'long long int foo (double x) { return (long long int) x; }' > conftest.c
+libc_cv_ppc_fctidz=no
+if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
+changequote(,)dnl
+  if grep '[ 	]fctidz' conftest.s > /dev/null 2>&1; then
+    libc_cv_ppc_fctidz=yes
+  fi
+changequote([,])dnl
+fi
+rm -rf conftest*])
+if test $libc_cv_ppc_fctidz = yes; then
+  AC_DEFINE([HAVE_PPC_FCTIDZ])
+fi