[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: configure check for SSE support in the assembler (#29700)
From: Malte Starostik <malte () kde ! org>
Date: 2001-07-27 12:52:21
[Download RAW message or body]
Please review, if it's okay, I'll do the same for kdemultimedia and where
it's used in noatun etc.
--
Malte Starostik
PGP: 1024D/D2F3C787 [C138-2121-FAF3-410A-1C2A-27CD-5431-7745-D2F3-C787]
["arts.diff" (text/x-diff)]
Index: configure.in.in
===================================================================
RCS file: /home/kde/kdelibs/arts/configure.in.in,v
retrieving revision 1.42
diff -u -3 -d -p -r1.42 configure.in.in
--- configure.in.in 2001/07/26 18:08:22 1.42
+++ configure.in.in 2001/07/27 12:38:36
@@ -191,6 +191,28 @@ if eval "test \"`echo `$ac_cv_x86_float_
fi
])
+dnl check if the assembler supports SSE instructions
+AC_DEFUN(AC_CHECK_X86_SSE,
+[
+AC_MSG_CHECKING([for x86 SSE instructions])
+AC_CACHE_VAL(ac_cv_x86_sse,
+[
+AC_TRY_COMPILE(,
+[
+#if defined(__GNUC__) && defined(__i386__)
+__asm__("movups %xmm0, (%esp)");
+#endif
+],
+ac_cv_x86_sse=yes,
+ac_cv_x86_sse=no)
+])
+AC_MSG_RESULT($ac_cv_x86_sse)
+if eval "test \"`echo `$ac_cv_x86_sse\" = yes"; then
+ AC_DEFINE(HAVE_X86_SSE,1,
+ [Define if your assembler supports x86 SSE instructions])
+fi
+])
+
dnl check whether we should try to emulate stdio fopen/fclose via
dnl glibc facilities (this *really* depends on glibc internals)
@@ -230,6 +252,7 @@ AC_CHECK_REALTIME_SCHED
AC_CHECK_GETDOMAINNAME
AC_CHECK_IOCTL_TYPE
AC_CHECK_X86_FLOAT_INT
+AC_CHECK_X86_SSE
AC_CHECK_ARTSDSP_STDIO_EMU
KDE_CHECK_THREADING
Index: flow/cpuinfo.cc
===================================================================
RCS file: /home/kde/kdelibs/arts/flow/cpuinfo.cc,v
retrieving revision 1.3
diff -u -3 -d -p -r1.3 cpuinfo.cc
--- flow/cpuinfo.cc 2001/06/24 20:53:43 1.3
+++ flow/cpuinfo.cc 2001/07/27 12:38:36
@@ -20,6 +20,7 @@
*/
+#include <config.h>
#include "startupmanager.h"
#include "cpuinfo.h"
@@ -52,7 +53,7 @@ void CpuInfoStartup::sseCheckHandler(int
void CpuInfoStartup::startup()
{
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && defined(__i386__) && defined(HAVE_X86_SSE)
/*
* Taken with thanks from mmx.h:
*
@@ -217,7 +218,7 @@ void CpuInfoStartup::startup()
}
signal(SIGILL, oldHandler);
}
-#endif /* GCC and x86 */
+#endif /* GCC and x86 and as supports SSE */
}
static CpuInfoStartup cpuInfoStartup;
_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic