--- TOOLS/cpuinfo.c Fri Aug 6 13:13:37 2004 +++ TOOLS/cpuinfo.c Sat Sep 25 17:33:12 2004 @@ -17,6 +17,10 @@ #define sleep(t) _sleep(1000*t); #endif +#ifdef __BEOS__ +#define MISSING_USLEEP +#endif + #ifdef M_UNIX typedef long long int64_t; #define MISSING_USLEEP @@ -36,11 +40,13 @@ cpuid(int func) { cpuid_regs_t regs; #define CPUID ".byte 0x0f, 0xa2; " - asm("movl %4,%%eax; " CPUID - "movl %%eax,%0; movl %%ebx,%1; movl %%ecx,%2; movl %%edx,%3" + asm("push %%ebx; " + "movl %4,%%eax; " CPUID + "movl %%eax,%0; movl %%ebx,%1; movl %%ecx,%2; movl %%edx,%3; " + "pop %%ebx" : "=m" (regs.eax), "=m" (regs.ebx), "=m" (regs.ecx), "=m" (regs.edx) : "g" (func) - : "%eax", "%ebx", "%ecx", "%edx"); + : "%eax", "%ecx", "%edx"); return regs; }