comparison x86/cpuid.c @ 8590:7a463923ecd1 libavcodec

Change semantic of CONFIG_*, HAVE_* and ARCH_*. They are now always defined to either 0 or 1.
author aurel
date Tue, 13 Jan 2009 23:44:16 +0000
parents d0e2e91f9fb5
children a50419dcda53
comparison
equal deleted inserted replaced
8589:a29b5b5c3c9d 8590:7a463923ecd1
42 int rval = 0; 42 int rval = 0;
43 int eax, ebx, ecx, edx; 43 int eax, ebx, ecx, edx;
44 int max_std_level, max_ext_level, std_caps=0, ext_caps=0; 44 int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
45 x86_reg a, c; 45 x86_reg a, c;
46 46
47 #ifdef ARCH_X86_64 47 #if ARCH_X86_64
48 #define PUSHF "pushfq\n\t" 48 #define PUSHF "pushfq\n\t"
49 #define POPF "popfq\n\t" 49 #define POPF "popfq\n\t"
50 #else 50 #else
51 #define PUSHF "pushfl\n\t" 51 #define PUSHF "pushfl\n\t"
52 #define POPF "popfl\n\t" 52 #define POPF "popfl\n\t"
81 cpuid(1, eax, ebx, ecx, std_caps); 81 cpuid(1, eax, ebx, ecx, std_caps);
82 if (std_caps & (1<<23)) 82 if (std_caps & (1<<23))
83 rval |= FF_MM_MMX; 83 rval |= FF_MM_MMX;
84 if (std_caps & (1<<25)) 84 if (std_caps & (1<<25))
85 rval |= FF_MM_MMXEXT 85 rval |= FF_MM_MMXEXT
86 #ifdef HAVE_SSE 86 #if HAVE_SSE
87 | FF_MM_SSE; 87 | FF_MM_SSE;
88 if (std_caps & (1<<26)) 88 if (std_caps & (1<<26))
89 rval |= FF_MM_SSE2; 89 rval |= FF_MM_SSE2;
90 if (ecx & 1) 90 if (ecx & 1)
91 rval |= FF_MM_SSE3; 91 rval |= FF_MM_SSE3;