[FFmpeg-devel] x86: inline asm cpuid vs. yasm cpuid

lvqcl lvqcl.mail at gmail.com
Fri Sep 26 22:34:21 CEST 2014

ff_cpu_cpuid routine (in libavutil/x86/cpuid.asm) clears ECX
register before cpuid instruction. Inline asm version
(in libavutil/x86/cpu.c) doesn't do this.

As a result, FFmpeg will probably misdetect AVX2/BMI1/BMI2
if yasm is not enabled.
As far as I understand GNU asm, the last line of cpuid macro
should be changed from
         : "0" (index))
         : "0" (index), "2"(0))

More information about the ffmpeg-devel mailing list