Originally committed as revision 17543 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -42,19 +42,13 @@ int mm_support(void) · 41 unmodified lines | ||
| 42 | 42 | int rval = 0; |
| 43 | 43 | int eax, ebx, ecx, edx; |
| 44 | 44 | int max_std_level, max_ext_level, std_caps=0, ext_caps=0; |
| 45 | − x86_reg a, c; | |
| 46 | 45 | |
| 47 | −#if ARCH_X86_64 | |
| 48 | −#define PUSHF "pushfq\n\t" | |
| 49 | −#define POPF "popfq\n\t" | |
| 50 | −#else | |
| 51 | −#define PUSHF "pushfl\n\t" | |
| 52 | −#define POPF "popfl\n\t" | |
| 53 | −#endif | |
| 46 | +#if ARCH_X86_32 | |
| 47 | + x86_reg a, c; | |
| 54 | 48 | __asm__ volatile ( |
| 55 | 49 | /* See if CPUID instruction is supported ... */ |
| 56 | 50 | /* ... Get copies of EFLAGS into eax and ecx */ |
| 57 | − PUSHF | |
| 51 | + "pushfl\n\t" | |
| 58 | 52 | "pop %0\n\t" |
| 59 | 53 | "mov %0, %1\n\t" |
| 60 | 54 | |
| @@ -62,10 +56,10 @@ int mm_support(void) · 1 unmodified line | ||
| 62 | 56 | /* to the EFLAGS reg */ |
| 63 | 57 | "xor $0x200000, %0\n\t" |
| 64 | 58 | "push %0\n\t" |
| 65 | − POPF | |
| 59 | + "popfl\n\t" | |
| 66 | 60 | |
| 67 | 61 | /* ... Get the (hopefully modified) EFLAGS */ |
| 68 | − PUSHF | |
| 62 | + "pushfl\n\t" | |
| 69 | 63 | "pop %0\n\t" |
| 70 | 64 | : "=a" (a), "=c" (c) |
| 71 | 65 | : |
| @@ -74,6 +68,7 @@ int mm_support(void) · 2 unmodified lines | ||
| 74 | 68 | |
| 75 | 69 | if (a == c) |
| 76 | 70 | return 0; /* CPUID not supported */ |
| 71 | +#endif | |
| 77 | 72 | |
| 78 | 73 | cpuid(0, max_std_level, ebx, ecx, edx); |
| 79 | 74 | |