diff options
| -rw-r--r-- | generic/tclTest.c | 6 | ||||
| -rw-r--r-- | unix/tclUnixCompat.c | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c index ee29cb1..0ce5e83 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -335,7 +335,7 @@ static Tcl_NRPostProc NREUnwind_callback; static Tcl_ObjCmdProc TestNREUnwind; static Tcl_ObjCmdProc TestNRELevels; static Tcl_ObjCmdProc TestInterpResolverCmd; -#if defined(HAVE_CPUID) +#if defined(HAVE_CPUID) && !defined(MAC_OSX_TCL) static Tcl_ObjCmdProc TestcpuidCmd; #endif @@ -695,7 +695,7 @@ Tcltest_Init( NULL, NULL); Tcl_CreateCommand(interp, "testexitmainloop", TestexitmainloopCmd, NULL, NULL); -#if defined(HAVE_CPUID) +#if defined(HAVE_CPUID) && !defined(MAC_OSX_TCL) Tcl_CreateObjCommand(interp, "testcpuid", TestcpuidCmd, NULL, NULL); #endif @@ -7159,7 +7159,7 @@ TestGetIntForIndexCmd( -#if defined(HAVE_CPUID) +#if defined(HAVE_CPUID) && !defined(MAC_OSX_TCL) /* *---------------------------------------------------------------------- * diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index 9e43c01..7bd840a 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -994,20 +994,19 @@ TclWinCPUID( int status = TCL_ERROR; /* See: <http://en.wikipedia.org/wiki/CPUID> */ -#if defined(HAVE_CPUID) #if defined(__x86_64__) || defined(_M_AMD64) || defined (_M_X64) __asm__ __volatile__("movq %%rbx, %%rsi \n\t" /* save %rbx */ "cpuid \n\t" "xchgq %%rsi, %%rbx \n\t" /* restore the old %rbx */ : "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3]) : "a"(index)); -#else + status = TCL_OK; +#elif defined(__i386__) || defined(_M_IX86) __asm__ __volatile__("mov %%ebx, %%esi \n\t" /* save %ebx */ "cpuid \n\t" "xchg %%esi, %%ebx \n\t" /* restore the old %ebx */ : "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3]) : "a"(index)); -#endif status = TCL_OK; #else (void)index; |
