summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-19 13:09:26 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-19 13:09:26 +0000
commit637ead4353d0bf2f345ddcbf8cd4d204fbb1849e (patch)
tree87667b0bc3e413b27317b69f1e5d3c949282c54e
parentf8ce675a2f7c1ef33047aa4035f1123f3302181d (diff)
downloadmpv-637ead4353d0bf2f345ddcbf8cd4d204fbb1849e.tar.bz2
mpv-637ead4353d0bf2f345ddcbf8cd4d204fbb1849e.tar.xz
fixed?
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2282 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--cpudetect.c8
-rw-r--r--cpudetect.h8
2 files changed, 9 insertions, 7 deletions
diff --git a/cpudetect.c b/cpudetect.c
index 6846d68270..f0e462addd 100644
--- a/cpudetect.c
+++ b/cpudetect.c
@@ -90,8 +90,8 @@ void GetCpuCaps( CpuCaps *caps)
/*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 @@ void GetCpuCaps( CpuCaps *caps)
caps->cpuType=CPUTYPE_I686;
break;
default:
+ caps->cpuType=CPUTYPE_I386;
printf("Unknown cpu type, default to i386\n");
break;
}
@@ -136,7 +137,8 @@ void GetCpuCaps( CpuCaps *caps)
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;
}
diff --git a/cpudetect.h b/cpudetect.h
index 55e975fedf..2d521d801b 100644
--- a/cpudetect.h
+++ b/cpudetect.h
@@ -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;