diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-11 19:26:13 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-11 19:26:13 +0000 |
commit | 30d48cb10e8576126d9aa2e0bbc8e0a06b3896fc (patch) | |
tree | 80cc354a8b57f1746ce390b316456517d82bd59d /TOOLS | |
parent | 9f0ef64532858e0101f43050c1d369c3731b8bb9 (diff) | |
download | mpv-30d48cb10e8576126d9aa2e0bbc8e0a06b3896fc.tar.bz2 mpv-30d48cb10e8576126d9aa2e0bbc8e0a06b3896fc.tar.xz |
Zeta OS support, mostly working.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13613 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'TOOLS')
-rw-r--r-- | TOOLS/cpuinfo.c | 12 |
1 files changed, 9 insertions, 3 deletions
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; } |