[Mplayer-cvslog] CVS: main cpudetect.c,1.3,1.4 cpudetect.h,1.2,1.3

Arpi of Ize arpi at mplayer.dev.hu
Fri Oct 19 15:09:28 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv1430

Modified Files:
	cpudetect.c cpudetect.h 
Log Message:
fixed?

Index: cpudetect.c
===================================================================
RCS file: /cvsroot/mplayer/main/cpudetect.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cpudetect.c	19 Oct 2001 13:01:30 -0000	1.3
+++ cpudetect.c	19 Oct 2001 13:09:26 -0000	1.4
@@ -90,8 +90,8 @@
 	/*if (!has_cpuid())
 		return;*/
 	do_cpuid(0x00000000, regs);
-	printf("CPU vendor name: %.4s%.4s%.4s\n",&regs[1],&regs[3],&regs[2]);
-//	if (regs[0]>0x00000001) 
+	printf("CPU vendor name: %.4s%.4s%.4s  cpuid level: %d\n",&regs[1],&regs[3],&regs[2],regs[0]);
+	if (regs[0]>0x00000001) 
 	{
 		do_cpuid(0x00000001, regs2);
 		printf("CPU family: %d\n",(regs2[0] >> 8)&0xf);
@@ -109,6 +109,7 @@
 				caps->cpuType=CPUTYPE_I686;
 				break;
 			default:
+				caps->cpuType=CPUTYPE_I386;
 				printf("Unknown cpu type, default to i386\n");
 				break;
 		}
@@ -136,7 +137,8 @@
 		do_cpuid(0x80000000, regs);
 		if (regs[0]>=0x80000001) {
 			do_cpuid(0x80000001, regs2);
-			caps->hasMMX2 = (regs[3] & (1 << 22 )) >> 22; // 0x400000
+			caps->hasMMX  = (regs2[3] & (1 << 23 )) >> 23; // 0x0800000
+			caps->hasMMX2 = (regs2[3] & (1 << 22 )) >> 22; // 0x400000
 			caps->has3DNow    = (regs2[3] & (1 << 31 )) >> 31; //0x80000000
 			caps->has3DNowExt = (regs2[3] & (1 << 30 )) >> 30;
 		}

Index: cpudetect.h
===================================================================
RCS file: /cvsroot/mplayer/main/cpudetect.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cpudetect.h	19 Oct 2001 13:01:31 -0000	1.2
+++ cpudetect.h	19 Oct 2001 13:09:26 -0000	1.3
@@ -1,9 +1,9 @@
 #ifdef ARCH_X86
 
-#define CPUTYPE_I386	0
-#define CPUTYPE_I486	1
-#define CPUTYPE_I586	2
-#define CPUTYPE_I686    3
+#define CPUTYPE_I386	3
+#define CPUTYPE_I486	4
+#define CPUTYPE_I586	5
+#define CPUTYPE_I686    6
 
 typedef struct cpucaps_s {
 	int cpuType;




More information about the MPlayer-cvslog mailing list