git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11357
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.
bug127521-64 bug132813-amd64 bug132918 \
clc \
$(INSN_TESTS) \
- lzcnt64 \
rcl-amd64 \
redundantRexW \
smc1 \
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
jcxz \
lahf \
looper \
- lzcnt32 \
movx \
pushpopseg \
sbbmisc \
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)