The BUILD_LZCNT_TESTS conditional is used in both
none/tests/x86/Makefile.am and none/tests/amd64/Makefile.am to check
whether to build the lzcnt32 and lzcnt64 test program. However the
configure test uses %rax which is only available on amd64. Use %eax
instead to make sure the configure test succeeds on both i386 and
amd64.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
do {
- __asm__ __volatile__("lzcnt %%rax,%%rax" : : : "rax");
+ __asm__ __volatile__("lzcnt %%eax,%%eax" : : : "eax");
} while (0)
]])], [
ac_have_as_lzcnt=yes