[FFmpeg-devel] Bugreport: compiling fails with -fPIC used

Thorsten Jordan tjordan
Mon Oct 15 14:04:49 CEST 2007

Reimar D?ffinger schrieb:
> Hello,
> On Mon, Oct 15, 2007 at 01:19:37PM +0200, Thorsten Jordan wrote:
>> although i know that one should better not use -fPIC with ffmpeg to have
>> the most performance, there are situations when it is needed.
>> Using -fPIC as CFLAGS leads to compilation error:
>> i386/dsputil_mmx.c: In function ?flac_compute_autocorr_sse2?:
>> i386/dsputil_mmx.c:3028: error: can't find a register in class
>> ?GENERAL_REGS? while reloading ?asm?
> Well, the function and its uses could be put under #ifdef HAVE_7REGS,
> but I think this probably is your compiler being stupid, I think only 5
yes i wondered about that too. The function in the mentioned line only
requests 3 registers for the inline asm block. I suspect the compiler
stumbles over the function before apply_welch_window_sse2(), and there
is an inline asm block requesting 6 registers (#define WELCH(MOVPD)
...), this should still work as 6 are enough even with -fPIC, but maybe
the compiler has trouble filling the 6 registers, because the fill code
needs one more index register. I can only use gcc-4.1/4.2 on x86, so no
chance to switch compiler.

> registers should be needed, so it would be better if someone with
> non-apple gcc can confirm the problem first.
no apple here... ;)

Greetings, Thorsten

More information about the ffmpeg-devel mailing list