# HG changeset patch # User gpoirier # Date 1128459967 0 # Node ID 77e35d3153b4f51b92e41f410cd7171a636656a4 # Parent adb581352e638afadce6bf705acfed5a236febc7 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 Original thread: Date: Oct 2, 2005 11:08 AM Subject: [MPlayer-dev-eng] [Patch] Correction of P4 family CPUs detection in cputable.h diff -r adb581352e63 -r 77e35d3153b4 cpudetect.c --- a/cpudetect.c Tue Oct 04 19:44:42 2005 +0000 +++ b/cpudetect.c Tue Oct 04 21:06:07 2005 +0000 @@ -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;