]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added configure test that checks whether the assembler supports the SSE4a instruction...
authorBart Van Assche <bvanassche@acm.org>
Tue, 14 Sep 2010 10:53:57 +0000 (10:53 +0000)
committerBart Van Assche <bvanassche@acm.org>
Tue, 14 Sep 2010 10:53:57 +0000 (10:53 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11357

configure.in
none/tests/amd64/Makefile.am
none/tests/x86/Makefile.am

index a47fede39f9f5f1bac7740b296d03ceaa1e0875b..424a4047d00964b89b02a72b29ad5c6357f9f931 100644 (file)
@@ -1410,6 +1410,24 @@ AC_MSG_RESULT([no])
 AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes)
 
 
+AC_MSG_CHECKING([if x86/amd64 assembler supports 'lzcnt'])
+
+AC_TRY_COMPILE([], [
+  do {                  
+      __asm__ __volatile__("lzcnt %rax,%rax");
+  } while (0)
+],
+[
+  ac_have_as_lzcnt=yes
+  AC_MSG_RESULT([yes])
+], [
+  ac_have_as_lzcnt=no
+  AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL([BUILD_LZCNT_TESTS], [test x$ac_have_as_lzcnt = xyes])
+
+
 # Check for TLS support in the compiler and linker
 if test "x${cross_compiling}" = "xno"; then
 # Native compilation: check whether running a program using TLS succeeds.
index 38e1ebbc3547b1312eef8fc69c4de9465ee3f0fa..bd1c8a7120703e38451a5967f6e5db3743778086 100644 (file)
@@ -60,7 +60,6 @@ check_PROGRAMS = \
        bug127521-64 bug132813-amd64 bug132918 \
        clc \
        $(INSN_TESTS) \
-       lzcnt64 \
        rcl-amd64 \
        redundantRexW \
        smc1 \
@@ -69,6 +68,9 @@ check_PROGRAMS = \
 if BUILD_SSSE3_TESTS
  check_PROGRAMS += ssse3_misaligned
 endif
+if BUILD_LZCNT_TESTS
+ check_PROGRAMS += lzcnt64
+endif
 
 # DDD: these need to be made to work on Darwin like the x86/ ones were.
 if ! VGCONF_OS_IS_DARWIN
index c0f0c08ae1fbb65a59ed454477279aa499f62c29..0fa2194c2e70a35f4fbeee87390e2efee25a66fd 100644 (file)
@@ -84,7 +84,6 @@ check_PROGRAMS = \
        jcxz \
        lahf \
        looper \
-       lzcnt32 \
        movx \
        pushpopseg \
        sbbmisc \
@@ -95,6 +94,9 @@ check_PROGRAMS = \
 if BUILD_SSSE3_TESTS
    check_PROGRAMS += ssse3_misaligned
 endif
+if BUILD_LZCNT_TESTS
+ check_PROGRAMS += lzcnt32
+endif
 
 
 AM_CFLAGS    += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)