[FFmpeg-devel] Bugreport: compiling fails with -fPIC used
Wed Oct 17 21:26:06 CEST 2007
On Wed, Oct 17, 2007 at 09:37:20AM +0200, Thorsten Jordan wrote:
> Michael Niedermayer schrieb:
> > On Tue, Oct 16, 2007 at 05:23:47PM +0200, Reimar D?ffinger wrote:
> >> Hello,
> >> IIRC you normally can't use push/pop as gcc might use esp/rsp relative
> >> addressing for arguments. In this case it might work since all
> >> constraints are "r", but it still seems risky to meddle with the stack
> >> without letting gcc know.
> > iam more concerned by the direct use of ebx without having ebx on the
> > clobber list or anywhere else "reserved"
> > this code is just plain wrong
> you are right, it is hackish. It can be done better my using direct
> register names. I don't know if that is welcome, at least the following
> patch is better in that case.
> The second change further down the file is in a second patch.
> Greetings, Thorsten
> Index: libavcodec/i386/dsputil_mmx.c
> --- libavcodec/i386/dsputil_mmx.c (Revision 10737)
> +++ libavcodec/i386/dsputil_mmx.c (Arbeitskopie)
> @@ -2977,6 +2977,7 @@
> "addsd %%xmm6, %%xmm7 \n\t"
> ::"m"(c), "m"(*ff_pd_1), "m"(*ff_pd_2)
> +#ifdef HAVE_7REGS
> #define WELCH(MOVPD)\
> asm volatile(\
> "1: \n\t"\
IIRC the function uses 6 registers so putting it under HAVE_7REGS is not
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel