[FFmpeg-devel] [PATCH] x86/intmath: allow the source operand for icc/icl ff_ctzll to be a memory location

Henrik Gramner henrik at gramner.com
Sun Oct 25 13:15:56 CET 2015

On Sun, Oct 25, 2015 at 12:08 AM, James Almer <jamrial at gmail.com> wrote:
> +    __asm__ ("bsfq %1,%0" : "=r" (c) : "rm" (v));

Shouldn't we be using tzcnt instead of bsf? Or rep bsf (which is the
same opcode as tzcnt) if we need to support ancient compilers. tzcnt
is generally faster than bsf on modern CPUs and backwards-compatible
with older CPUs.

More information about the ffmpeg-devel mailing list