Mercurial > mplayer.hg
changeset 2281:faf96aeb93ef
fixed?
author | arpi |
---|---|
date | Fri, 19 Oct 2001 13:09:26 +0000 |
parents | b318387bfeda |
children | baea37ed31f9 |
files | cpudetect.c cpudetect.h |
diffstat | 2 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/cpudetect.c Fri Oct 19 13:01:31 2001 +0000 +++ b/cpudetect.c Fri Oct 19 13:09:26 2001 +0000 @@ -90,8 +90,8 @@ /*if (!has_cpuid()) return;*/ do_cpuid(0x00000000, regs); - printf("CPU vendor name: %.4s%.4s%.4s\n",®s[1],®s[3],®s[2]); -// if (regs[0]>0x00000001) + printf("CPU vendor name: %.4s%.4s%.4s cpuid level: %d\n",®s[1],®s[3],®s[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; }
--- a/cpudetect.h Fri Oct 19 13:01:31 2001 +0000 +++ b/cpudetect.h Fri Oct 19 13:09:26 2001 +0000 @@ -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;