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

Michael Niedermayer michaelni at gmx.at
Sat Sep 27 13:58:20 CEST 2014

On Sat, Sep 27, 2014 at 12:34:21AM +0400, lvqcl wrote:
> 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))
> to
>         : "0" (index), "2"(0))



Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140927/97c4af64/attachment.asc>

More information about the ffmpeg-devel mailing list