[Mplayer-cvslog] CVS: main cpudetect.c,1.5,1.6
Zoltan Ponekker
pontscho at mplayer.dev.hu
Fri Oct 19 15:29:02 CEST 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv5304
Modified Files:
cpudetect.c
Log Message:
amd...?
Index: cpudetect.c
===================================================================
RCS file: /cvsroot/mplayer/main/cpudetect.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- cpudetect.c 19 Oct 2001 13:11:26 -0000 1.5
+++ cpudetect.c 19 Oct 2001 13:28:59 -0000 1.6
@@ -134,6 +134,26 @@
if (regs[1] == 0x68747541 && // AuthenticAMD
regs[3] == 0x69746e65 &&
regs[2] == 0x444d4163) {
+ do_cpuid(0x00000001, regs2);
+ printf("CPU family: %d\n",(regs2[0] >> 8)&0xf);
+ switch ((regs2[0] >> 8)&0xf) {
+ case 3:
+ caps->cpuType=CPUTYPE_I386;
+ break;
+ case 4:
+ caps->cpuType=CPUTYPE_I486;
+ break;
+ case 5:
+ caps->cpuType=CPUTYPE_I586;
+ break;
+ case 6:
+ caps->cpuType=CPUTYPE_I686;
+ break;
+ default:
+ caps->cpuType=CPUTYPE_I386;
+ printf("Unknown cpu type, default to i386\n");
+ break;
+ }
do_cpuid(0x80000000, regs);
printf("AMD cpuid-level: 0x%X\n",regs[0]);
if (regs[0]>=0x80000001) {
More information about the MPlayer-cvslog
mailing list