[FFmpeg-devel] [PATCH]Remove test for cpuid instruction from cpuid.c
Carl Eugen Hoyos
cehoyos
Sun Nov 23 14:59:23 CET 2008
Hi!
cpuid is an ia32 instruction that was added for later 80486 processors.
I propose to remove the check for its existence from i386/cpuid.c.
ffmpeg can still be compiled for 80386 with --disable-mmx.
(Fixes compilation with icc 11.0)
Please comment, Carl Eugen
-------------- next part --------------
Index: libavcodec/i386/cpuid.c
===================================================================
--- libavcodec/i386/cpuid.c (Revision 15910)
+++ libavcodec/i386/cpuid.c (Arbeitskopie)
@@ -42,32 +42,7 @@
int rval = 0;
int eax, ebx, ecx, edx;
int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
- x86_reg a, c;
- __asm__ volatile (
- /* See if CPUID instruction is supported ... */
- /* ... Get copies of EFLAGS into eax and ecx */
- "pushf\n\t"
- "pop %0\n\t"
- "mov %0, %1\n\t"
-
- /* ... Toggle the ID bit in one copy and store */
- /* to the EFLAGS reg */
- "xor $0x200000, %0\n\t"
- "push %0\n\t"
- "popf\n\t"
-
- /* ... Get the (hopefully modified) EFLAGS */
- "pushf\n\t"
- "pop %0\n\t"
- : "=a" (a), "=c" (c)
- :
- : "cc"
- );
-
- if (a == c)
- return 0; /* CPUID not supported */
-
cpuid(0, max_std_level, ebx, ecx, edx);
if(max_std_level >= 1){
More information about the ffmpeg-devel
mailing list