summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixCompat.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-02 14:37:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-02 14:37:55 (GMT)
commit99557b6c57a524f31c81cde6d39cc2a5e51983f3 (patch)
treeed9c39cddc7f1e2bf89be36562757c032f4f323e /unix/tclUnixCompat.c
parent6fd14b4021e31bbdbc45e5b767b50f05d4e55823 (diff)
downloadtcl-99557b6c57a524f31c81cde6d39cc2a5e51983f3.zip
tcl-99557b6c57a524f31c81cde6d39cc2a5e51983f3.tar.gz
tcl-99557b6c57a524f31c81cde6d39cc2a5e51983f3.tar.bz2
cpuid-on-unixcpuid_on_unix
Diffstat (limited to 'unix/tclUnixCompat.c')
-rw-r--r--unix/tclUnixCompat.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index a39dbbe..1424ab3 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -990,14 +990,13 @@ TclWinCPUID(
{
int status = TCL_ERROR;
-#if defined(HAVE_CPUID) && defined(__CYGWIN__)
- __asm__ __volatile__("pushl %%ebx \n\t" /* save %ebx */
+#if defined(HAVE_CPUID)
+ __asm__ __volatile__("mov %%ebx, %%edi \n\t" /* save %ebx */
"cpuid \n\t"
- "movl %%ebx, %1 \n\t" /* save what cpuid just put in %ebx */
- "popl %%ebx \n\t" /* restore the old %ebx */
- : "=a"(regsPtr[0]), "=r"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3])
- : "a"(index)
- : "cc");
+ "mov %%ebx, %%esi \n\t" /* save what cpuid just put in %ebx */
+ "mov %%edi, %%ebx \n\t" /* restore the old %ebx */
+ : "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3])
+ : "a"(index));
status = TCL_OK;
#endif
return status;