diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2013-01-24 22:00:50 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2013-01-24 22:00:50 (GMT) |
commit | 9442bb91b146a47cfc7ff32dd1f5cb9a3bda7de5 (patch) | |
tree | d1c33ddf2c08a8509c1fe55e28b748b2538a8cac /unix/tclUnixCompat.c | |
parent | 8b2e7e7328ac76c37e489e5669bda7d5da50fc3d (diff) | |
download | tcl-9442bb91b146a47cfc7ff32dd1f5cb9a3bda7de5.zip tcl-9442bb91b146a47cfc7ff32dd1f5cb9a3bda7de5.tar.gz tcl-9442bb91b146a47cfc7ff32dd1f5cb9a3bda7de5.tar.bz2 |
new version of cpuid, which doesn't use the edi register any more. Hopefully that works better on some Darwin.
FossilOrigin-Name: 2153733cd75dc123c2032445267cbc2ce1da89d9
Diffstat (limited to 'unix/tclUnixCompat.c')
-rw-r--r-- | unix/tclUnixCompat.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index 71bd846..5a3ccd4 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -693,12 +693,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; |