Diff
Not logged in

Differences From Artifact [8052981d21]:

To Artifact [c3a1f4e64c]:


689
690
691
692
693
694
695
696

697
698
699

700
701

702
703
704
705
706
707
708
689
690
691
692
693
694
695

696
697


698
699

700
701
702
703
704
705
706
707







-
+

-
-
+

-
+







    unsigned int index,		/* Which CPUID value to retrieve. */
    unsigned int *regsPtr)	/* Registers after the CPUID. */
{
    int status = TCL_ERROR;

    /* 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;
}

/*
 * Local Variables: