diff options
| author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-05-02 21:48:34 (GMT) |
|---|---|---|
| committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-05-02 21:48:34 (GMT) |
| commit | dcf22bf22697bd75efe65dffae8f9fe350cb1fe8 (patch) | |
| tree | 42c9366d016c3db0ca8640dc6d9bfd3de1dc0b47 /unix/configure | |
| parent | fc25e0942d66172e9e5a52730a377c27b60b9685 (diff) | |
| parent | 197d98cbfed32d739d52afb672a62fbbdd085008 (diff) | |
| download | tcl-dcf22bf22697bd75efe65dffae8f9fe350cb1fe8.zip tcl-dcf22bf22697bd75efe65dffae8f9fe350cb1fe8.tar.gz tcl-dcf22bf22697bd75efe65dffae8f9fe350cb1fe8.tar.bz2 | |
Better detection and implementation for cpuid instruction on Intel-derived processors, both 32-bit and 64-bit
Diffstat (limited to 'unix/configure')
| -rwxr-xr-x | unix/configure | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/unix/configure b/unix/configure index df67e5d..522828d 100755 --- a/unix/configure +++ b/unix/configure @@ -18925,9 +18925,13 @@ int main () { - int index,ax,bx,cx,dx; - __asm__ __volatile__ ("cpuid":\ - "=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "a" (index)); + int index,regsPtr[4]; + __asm__ __volatile__("mov %%ebx, %%edi \n\t" + "cpuid \n\t" + "mov %%ebx, %%esi \n\t" + "mov %%edi, %%ebx \n\t" + : "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3]) + : "a"(index)); ; return 0; @@ -18968,7 +18972,8 @@ fi echo "$as_me:$LINENO: result: $tcl_cv_cpuid" >&5 echo "${ECHO_T}$tcl_cv_cpuid" >&6 if test $tcl_cv_cpuid = yes; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_CPUID 1 _ACEOF |
