[MPlayer-cvslog] CVS: main cpudetect.c,1.40,1.41

Guillaume Poirier CVS syncmail at mplayerhq.hu
Tue Oct 4 23:06:09 CEST 2005


CVS change done by Guillaume Poirier CVS

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

Modified Files:
	cpudetect.c 
Log Message:
according to Intel/AMD official documentations, CPU family should be displayed as
the sum of CPUID's family field and extended family field when a CPU has a CPUID
family 0xF.
Patch by Zuxy <zuxy POIS meng AH gmail POIS com>
Original thread:
Date: Oct 2, 2005 11:08 AM
Subject: [MPlayer-dev-eng] [Patch] Correction of P4 family CPUs detection in cputable.h


Index: cpudetect.c
===================================================================
RCS file: /cvsroot/mplayer/main/cpudetect.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- cpudetect.c	25 May 2005 08:48:31 -0000	1.40
+++ cpudetect.c	4 Oct 2005 21:06:07 -0000	1.41
@@ -120,9 +120,12 @@
 		do_cpuid(0x00000001, regs2);
 
 		caps->cpuType=(regs2[0] >> 8)&0xf;
+
+// see AMD64 Architecture Programmer's Manual, Volume 3: General-purpose and
+// System Instructions, Table 3-2: Effective family computation, page 120.
 		if(caps->cpuType==0xf){
-		    // use extended family (P4, IA64)
-		    caps->cpuType=8+((regs2[0]>>20)&255);
+		    // use extended family (P4, IA64, K8)
+		    caps->cpuType=0xf+((regs2[0]>>20)&255);
 		}
 		caps->cpuStepping=regs2[0] & 0xf;
 




More information about the MPlayer-cvslog mailing list