Mercurial > libavcodec.hg
comparison i386/cputest.c @ 2979:bfabfdf9ce55 libavcodec
COSMETICS: tabs --> spaces, some prettyprinting
author | diego |
---|---|
date | Thu, 22 Dec 2005 01:10:11 +0000 |
parents | ef2149182f1c |
children | 647a677c00a4 |
comparison
equal
deleted
inserted
replaced
2978:403183bbb505 | 2979:bfabfdf9ce55 |
---|---|
13 #endif | 13 #endif |
14 | 14 |
15 /* ebx saving is necessary for PIC. gcc seems unable to see it alone */ | 15 /* ebx saving is necessary for PIC. gcc seems unable to see it alone */ |
16 #define cpuid(index,eax,ebx,ecx,edx)\ | 16 #define cpuid(index,eax,ebx,ecx,edx)\ |
17 __asm __volatile\ | 17 __asm __volatile\ |
18 ("mov %%"REG_b", %%"REG_S"\n\t"\ | 18 ("mov %%"REG_b", %%"REG_S"\n\t"\ |
19 "cpuid\n\t"\ | 19 "cpuid\n\t"\ |
20 "xchg %%"REG_b", %%"REG_S\ | 20 "xchg %%"REG_b", %%"REG_S\ |
21 : "=a" (eax), "=S" (ebx),\ | 21 : "=a" (eax), "=S" (ebx),\ |
22 "=c" (ecx), "=d" (edx)\ | 22 "=c" (ecx), "=d" (edx)\ |
23 : "0" (index)); | 23 : "0" (index)); |
87 rval |= MM_MMXEXT; | 87 rval |= MM_MMXEXT; |
88 } else if (ebx == 0x746e6543 && | 88 } else if (ebx == 0x746e6543 && |
89 edx == 0x48727561 && | 89 edx == 0x48727561 && |
90 ecx == 0x736c7561) { /* "CentaurHauls" */ | 90 ecx == 0x736c7561) { /* "CentaurHauls" */ |
91 /* VIA C3 */ | 91 /* VIA C3 */ |
92 if(ext_caps & (1<<24)) | 92 if(ext_caps & (1<<24)) |
93 rval |= MM_MMXEXT; | 93 rval |= MM_MMXEXT; |
94 } else if (ebx == 0x69727943 && | 94 } else if (ebx == 0x69727943 && |
95 edx == 0x736e4978 && | 95 edx == 0x736e4978 && |
96 ecx == 0x64616574) { | 96 ecx == 0x64616574) { |
97 /* Cyrix Section */ | 97 /* Cyrix Section */ |
98 /* See if extended CPUID level 80000001 is supported */ | 98 /* See if extended CPUID level 80000001 is supported */ |