[FFmpeg-devel] [PATCH] avfilter/vf_fspp.c: make the filter compile with latest LLVM
Reimar.Doeffinger at gmx.de
Thu Oct 31 20:09:14 CET 2013
On Thu, Oct 31, 2013 at 11:53:22AM -0700, Thierry Foucu wrote:
> Make the vf_fspp code not use the incorrectly documented and essentially
> compiler-internal inline assembly constraint "o" which simply does not work
> the way it was being used. Instead, pass explicit memory operands out of the
> array of temporaries. The compiler is smart enough to build them with
> immediate offsets of a common register address.
> In the process, remove 2 unused 8-byte temporaries from two functions in this
> filter. Doing this saves 16 bytes of stack space, and in row_idct_mmx allows
> the use of simpler addressing modes (no offset from %rsp) which saves 3 bytes
> of encoded instruction stream.
> Otherwise, this produces *exactly* the same assembly as the previous version,
> but can be assembled by LLVM as well as GCC.
Which gcc versions did you try with?
I am fairly convinced the way you propose is the way it was originally
implemented, but regularly failed to compile due to running out of
registers on some gcc version.
Keep in mind that gcc 4.1 is still in very regular use...
More information about the ffmpeg-devel