summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixCompat.c
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2013-01-24 22:01:38 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2013-01-24 22:01:38 (GMT)
commitc6f76c3136ee2ee2e22a7c40b9418e9c7d881d83 (patch)
treefa3e3327688ed7e2d78e28d5952d276db4b6427c /unix/tclUnixCompat.c
parent6f93f9b36983282f6ba5c50d8dc9a6a87a501d0d (diff)
parentfe83e2cb1c99d6d4343e5925f71941913c0a220b (diff)
downloadtcl-c6f76c3136ee2ee2e22a7c40b9418e9c7d881d83.zip
tcl-c6f76c3136ee2ee2e22a7c40b9418e9c7d881d83.tar.gz
tcl-c6f76c3136ee2ee2e22a7c40b9418e9c7d881d83.tar.bz2
new version of cpuid, which doesn't use the edi register any more. Hopefully that works better on some Darwin.
Diffstat (limited to 'unix/tclUnixCompat.c')
-rw-r--r--unix/tclUnixCompat.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index 06c19b9..905bc10 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -987,12 +987,11 @@ TclWinCPUID(
/* See: <http://en.wikipedia.org/wiki/CPUID> */
#if defined(HAVE_CPUID)
- __asm__ __volatile__("mov %%ebx, %%edi \n\t" /* save %ebx */
+ __asm__ __volatile__("mov %%ebx, %%esi \n\t" /* save %ebx */
"cpuid \n\t"
- "mov %%ebx, %%esi \n\t" /* save what cpuid just put in %ebx */
- "mov %%edi, %%ebx \n\t" /* restore the old %ebx */
+ "xchg %%esi, %%ebx \n\t" /* restore the old %ebx */
: "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3])
- : "a"(index) : "edi");
+ : "a"(index));
status = TCL_OK;
#endif
return status;