From bb70f436d01788c7aa945a4848fc11f7540ae369 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 27 Apr 2013 14:07:39 -0700 Subject: [PATCH] Just check cpuid itself, don't clobber %ebx --- configure.ac | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 214c9a01..3b8494ff 100644 --- a/configure.ac +++ b/configure.ac @@ -241,13 +241,10 @@ AC_SUBST(HAVE_TI_MODE_V) AC_MSG_CHECKING(for cpuid instruction) HAVE_CPUID_V=0 -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -]], [[ -unsigned int level = 0; -unsigned int *eax = NULL, *ebx = NULL, *ecx = NULL, *edx = NULL; -__asm__("cpuid" : "=a"(*eax), "=b" (*ebx), "=c"(*ecx), "=d"(*edx) - : "0"(level)); +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ +__asm__("movl %ebx,%esi\n" + "cpuid\n" + "movl %esi,%ebx"); ]])], [AC_MSG_RESULT(yes) AC_DEFINE([HAVE_CPUID], [1], [cpuid instruction is available])