summaryrefslogtreecommitdiffstats
path: root/unix/configure
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-02 21:55:54 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-02 21:55:54 (GMT)
commit45592a8e8ead694e094089f8174258afb6de280d (patch)
tree43d2bfa84716bb6f21c91187e06224d7cd785f18 /unix/configure
parentdd7509394d75de72ef1663a2d35377506f23d00d (diff)
parent67e7ec069710c2b524e0466502b0e9f14769b439 (diff)
downloadtcl-45592a8e8ead694e094089f8174258afb6de280d.zip
tcl-45592a8e8ead694e094089f8174258afb6de280d.tar.gz
tcl-45592a8e8ead694e094089f8174258afb6de280d.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-xunix/configure13
1 files changed, 9 insertions, 4 deletions
diff --git a/unix/configure b/unix/configure
index cb4f9f1..f763eeb 100755
--- a/unix/configure
+++ b/unix/configure
@@ -19360,9 +19360,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;
@@ -19403,7 +19407,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