[Mplayer-cvslog] CVS: main cpudetect.c,1.11,1.12 cpudetect.h,1.6,1.7

Alex Beregszaszi alex at mplayer.dev.hu
Sun Dec 9 18:03:14 CET 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv13350

Modified Files:
	cpudetect.c cpudetect.h 
Log Message:
added cpuStepping to CpuCaps struct (needed win32.c)

Index: cpudetect.c
===================================================================
RCS file: /cvsroot/mplayer/main/cpudetect.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- cpudetect.c	26 Nov 2001 23:08:48 -0000	1.11
+++ cpudetect.c	9 Dec 2001 17:03:04 -0000	1.12
@@ -73,7 +73,7 @@
 	("movl %%ebx, %%esi\n\t"
          "cpuid\n\t"
          "xchgl %%ebx, %%esi"
-         : "=a" (p[0]), "=S" (p[1]),
+         : "=a" (p[0]), "=S" (p[1]), 
            "=c" (p[2]), "=d" (p[3])
          : "0" (ax));
 #endif
@@ -101,7 +101,7 @@
 		do_cpuid(0x00000001, regs2);
 
 		tmpstr=GetCpuFriendlyName(regs, regs2);
-		printf("CPU: %s\n",tmpstr);
+		printf("CPU: %s ",tmpstr);
 		free(tmpstr);
 
 		caps->cpuType=(regs2[0] >> 8)&0xf;
@@ -109,6 +109,9 @@
 		    // use extended family (P4, IA64)
 		    caps->cpuType=8+((regs2[0]>>20)&255);
 		}
+		caps->cpuStepping=regs2[0] & 0xf;
+		printf("(Type: %d, Stepping: %d)\n",
+		    caps->cpuType, caps->cpuStepping);
 
 		// general feature flags:
 		caps->hasMMX  = (regs2[3] & (1 << 23 )) >> 23; // 0x0800000
@@ -347,6 +350,7 @@
 void GetCpuCaps( CpuCaps *caps)
 {
 	caps->cpuType=0;
+	caps->cpuStepping=0;
 	caps->hasMMX=0;
 	caps->hasMMX2=0;
 	caps->has3DNow=0;

Index: cpudetect.h
===================================================================
RCS file: /cvsroot/mplayer/main/cpudetect.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- cpudetect.h	26 Nov 2001 23:08:48 -0000	1.6
+++ cpudetect.h	9 Dec 2001 17:03:04 -0000	1.7
@@ -8,6 +8,7 @@
 
 typedef struct cpucaps_s {
 	int cpuType;
+	int cpuStepping;
 	int hasMMX;
 	int hasMMX2;
 	int has3DNow;




More information about the MPlayer-cvslog mailing list