[Mplayer-cvslog] CVS: main/TOOLS cpuinfo.c,1.5,1.6

Reimar Döffinger CVS syncmail at mplayerhq.hu
Mon Oct 11 21:26:15 CEST 2004


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/TOOLS
In directory mail:/var2/tmp/cvs-serv20487/TOOLS

Modified Files:
	cpuinfo.c 
Log Message:
Zeta OS support, mostly working.


Index: cpuinfo.c
===================================================================
RCS file: /cvsroot/mplayer/main/TOOLS/cpuinfo.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- cpuinfo.c	5 Aug 2004 00:07:47 -0000	1.5
+++ cpuinfo.c	11 Oct 2004 19:26:13 -0000	1.6
@@ -17,6 +17,10 @@
 #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 @@
 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;
 }
 




More information about the MPlayer-cvslog mailing list