summaryrefslogtreecommitdiffstats
path: root/cpudetect.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-09 17:03:04 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-09 17:03:04 +0000
commit676d9cfebd5f8061bf716e366f6d1c2f5efc66fd (patch)
treeffc3e1a88ac5dc11fc709ee11c8fea8cc879a7a3 /cpudetect.c
parent86fd26c0072e36bb744f83e89544193b18b0c526 (diff)
downloadmpv-676d9cfebd5f8061bf716e366f6d1c2f5efc66fd.tar.bz2
mpv-676d9cfebd5f8061bf716e366f6d1c2f5efc66fd.tar.xz
added cpuStepping to CpuCaps struct (needed win32.c)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3404 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'cpudetect.c')
-rw-r--r--cpudetect.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpudetect.c b/cpudetect.c
index 15151ae873..72ecca56c3 100644
--- a/cpudetect.c
+++ b/cpudetect.c
@@ -73,7 +73,7 @@ do_cpuid(unsigned int ax, unsigned int *p)
("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 @@ void GetCpuCaps( CpuCaps *caps)
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 @@ void GetCpuCaps( CpuCaps *caps)
// 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 @@ static void check_os_katmai_support( void )
void GetCpuCaps( CpuCaps *caps)
{
caps->cpuType=0;
+ caps->cpuStepping=0;
caps->hasMMX=0;
caps->hasMMX2=0;
caps->has3DNow=0;