From 30d48cb10e8576126d9aa2e0bbc8e0a06b3896fc Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 11 Oct 2004 19:26:13 +0000 Subject: Zeta OS support, mostly working. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13613 b3059339-0415-0410-9bf9-f77b7e298cf2 --- TOOLS/cpuinfo.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'TOOLS') diff --git a/TOOLS/cpuinfo.c b/TOOLS/cpuinfo.c index 1bdf2f30e2..f1e8022f9d 100644 --- a/TOOLS/cpuinfo.c +++ b/TOOLS/cpuinfo.c @@ -17,6 +17,10 @@ void gettimeofday(struct timeval* t,void* timezone) #define sleep(t) _sleep(1000*t); #endif +#ifdef __BEOS__ +#define usleep(t) snooze(t) +#endif + #ifdef M_UNIX typedef long long int64_t; #define MISSING_USLEEP @@ -36,11 +40,13 @@ static cpuid_regs_t 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; } -- cgit v1.2.3