]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Older assemblers don't speak SSE3. Add a configure test for it.
authorJulian Seward <jseward@acm.org>
Thu, 22 Mar 2007 00:24:21 +0000 (00:24 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 22 Mar 2007 00:24:21 +0000 (00:24 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6655

configure.in

index d4aff7051f5700958006bc8151067091a3c1e3ba..5fcb8f66acf24f16601c30f92fa949b8e15c0b5c 100644 (file)
@@ -743,6 +743,26 @@ if test x$ac_have_as_ppc_mftocrf = xyes ; then
 fi
 
 
+# does the x86/amd64 assembler understand SSE3 instructions?
+AC_MSG_CHECKING([if x86/amd64 assembler speaks SSE3])
+
+AC_TRY_COMPILE(, [
+  do { long long int x; 
+     __asm__ __volatile__("fisttpq (%0)" : :"r"(&x) ); } 
+  while (0)
+],
+[
+ac_have_as_sse3=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_as_sse3=no
+AC_MSG_RESULT([no])
+])
+if test x$ac_have_as_sse3 = xyes ; then
+  AC_DEFINE(HAVE_AS_SSE3, 1, [Define to 1 if x86/amd64 as supports SSE3.])
+fi
+
+
 # Check for TLS support in the compiler and linker
 AC_CACHE_CHECK([for TLS support], vg_cv_tls,
               [AC_ARG_ENABLE(tls, [  --enable-tls            platform supports TLS],