[MPlayer-dev-eng] [PATCH] Correct family for new CPUs

Zuxy zuxy.meng at gmail.com
Tue Oct 4 15:01:12 CEST 2005


Hi,

According to both Intel's and AMD's official document, the displayed
family of a CPU with a family field 0xf should be the *sum* of the
family field (here, 0xf) and the extendded family field in the cpuid
string.

Hence the patch:

--- MPlayer-1.0pre7try2\cpudetect.c     Thu Jan 13 05:56:25 2005
+++ MPlayer-1.0pre7try2.new\cpudetect.c Sun Oct  2 17:04:49 2005
@@ -122,7 +122,7 @@
                caps->cpuType=(regs2[0] >> 8)&0xf;
                if(caps->cpuType==0xf){
                    // use extended family (P4, IA64)
-                   caps->cpuType=8+((regs2[0]>>20)&255);
+                   caps->cpuType=0xf+((regs2[0]>>20)&255);
                }
                caps->cpuStepping=regs2[0] & 0xf;

--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6




More information about the MPlayer-dev-eng mailing list