mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 23:02:37 +00:00
fixed?
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2282 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f8ce675a2f
commit
637ead4353
@ -90,8 +90,8 @@ void GetCpuCaps( CpuCaps *caps)
|
||||
/*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 @@ 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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user