summaryrefslogtreecommitdiffstats
path: root/unix/configure
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-02 21:39:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-02 21:39:10 (GMT)
commita7601d1ea7a091b57a4caec5e64ec43b3a660724 (patch)
tree8835c59d6164b82f15ea847bacc04e7a074b666c /unix/configure
parent5098f5307b77d3fec508f0cfe9e24e867120b4bf (diff)
parent65478b5874aec3cbe6f044dd9c35efa54df06e16 (diff)
downloadtcl-a7601d1ea7a091b57a4caec5e64ec43b3a660724.zip
tcl-a7601d1ea7a091b57a4caec5e64ec43b3a660724.tar.gz
tcl-a7601d1ea7a091b57a4caec5e64ec43b3a660724.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/configure14
1 files changed, 9 insertions, 5 deletions
diff --git a/unix/configure b/unix/configure
index 1a0d882..4898cfb 100755
--- a/unix/configure
+++ b/unix/configure
@@ -9339,13 +9339,17 @@ else
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; }
EOF
-if { (eval echo configure:9349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
tcl_cv_cpuid=yes
else
@@ -9394,7 +9398,7 @@ if test "`uname -s`" = "Darwin" ; then
if test "`uname -s`" = "Darwin" ; then
echo $ac_n "checking how to package libraries""... $ac_c" 1>&6
-echo "configure:9398: checking how to package libraries" >&5
+echo "configure:9402: checking how to package libraries" >&5
# Check whether --enable-framework or --disable-framework was given.
if test "${enable_framework+set}" = set; then
enableval="$enable_framework"