summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2005-12-04 18:51:55 +0000
committerDavid Schleef <ds@schleef.org>2005-12-04 18:51:55 +0000
commitc70a98bd041acca12dabc6eee5a7af391358ddd1 (patch)
treeb6960e4a1261a8e566a316c1a16af7ced31dc12c /m4
parent44f0dbc7be325b35b88fbae6063739f0b158c6cf (diff)
downloadliboil-c70a98bd041acca12dabc6eee5a7af391358ddd1.tar.gz
* configure.ac:
* m4/as-gcc-inline-assembly.m4: * liboil/powerpc/clip.c: * liboil/powerpc/conv.c: Add HAVE_GCC_ASM_POWERPC_FPU and use it if -fsoft-float is specified.
Diffstat (limited to 'm4')
-rw-r--r--m4/as-gcc-inline-assembly.m419
1 files changed, 18 insertions, 1 deletions
diff --git a/m4/as-gcc-inline-assembly.m4 b/m4/as-gcc-inline-assembly.m4
index 3c3cb84..8182f42 100644
--- a/m4/as-gcc-inline-assembly.m4
+++ b/m4/as-gcc-inline-assembly.m4
@@ -4,7 +4,7 @@ dnl autostars m4 macro for detection of gcc inline assembly
dnl David Schleef <ds@schleef.org>
-dnl $Id: as-gcc-inline-assembly.m4,v 1.1 2005-10-28 03:12:05 ds Exp $
+dnl $Id: as-gcc-inline-assembly.m4,v 1.2 2005-12-04 18:51:55 ds Exp $
dnl AS_COMPILER_FLAG(ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
dnl Tries to compile with the given CFLAGS.
@@ -27,3 +27,20 @@ AC_DEFUN([AS_GCC_INLINE_ASSEMBLY],
AC_MSG_RESULT([$flag_ok])
])
+
+AC_DEFUN([AS_GCC_ASM_POWERPC_FPU],
+[
+ AC_MSG_CHECKING([if compiler supports FPU instructions on PowerPC])
+
+ AC_TRY_COMPILE([], [__asm__ ("fadd 0,0,0"::) ], [flag_ok=yes], [flag_ok=no])
+
+ if test "X$flag_ok" = Xyes ; then
+ $1
+ true
+ else
+ $2
+ true
+ fi
+ AC_MSG_RESULT([$flag_ok])
+])
+