diff options
author | bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2010-09-14 10:53:57 +0000 |
---|---|---|
committer | bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2010-09-14 10:53:57 +0000 |
commit | 55e438b24ef4fb7105f9bea85e6fc33b496e8f6c (patch) | |
tree | e028fc7ae87b92025d0cc78fc4c0d29d33098f33 /configure.in | |
parent | 231eb65ebc9bce36bde668ec1cb7e01d951a21ed (diff) |
Added configure test that checks whether the assembler supports the SSE4a instruction lzcnt.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11357 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.in b/configure.in index a47fede3..424a4047 100644 --- a/configure.in +++ b/configure.in @@ -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. |