[FFmpeg-devel] flac_compute_autocorr_sse2 not pic-safe

Michael Niedermayer michaelni
Tue Dec 4 19:44:40 CET 2007


On Tue, Dec 04, 2007 at 07:34:32PM +0100, Edward Hervey wrote:
> 
> On Tue, 2007-12-04 at 18:56 +0100, Michael Niedermayer wrote:
> > On Tue, Dec 04, 2007 at 03:27:18PM +0100, Edward Hervey wrote:
> > > Hi all,
> > > 
> > >   While compiling ffmpeg as static library to be put into a shared
> > > library (./configure --enable-static --disable-shared
> > > --extra-cflags=-fPIC), I encountered a piece of asm code which isn't
> > > PIC-safe.
> > > 
> > >   The proposed patch disables that optimized routine when the
> > > configuration doesn't allow it (HAVE_7REGS set to 1).
> > 
> > patch rejected, this code does not need 7 registers
> 
> I do see 7 being used in the clobber list though (dsputil.c line 3064):
> 
> [...]
>                 :"+&r"(i), "=m"(autoc[j]), "=m"(autoc[j+1]),
> "=m"(autoc[j+2])
>                 :"r"(data1+len), "r"(data1+len-j), "m"(*ff_pd_1)

eax=i
ebx=autoc+j
ecx=data1+len
edx=data1+len-j
esi=ff_pd_1

%0 = %%eax
%1 =  (%%ebx)
%2 = 8(%%ebx)
%3 =16(%%ebx)
%4 = %%ecx
%5 = %%edx
%6 = %%esi

just 5 registers
and on x86_64 ff_pd_1 can be addressed via rip so it needs just 4

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071204/006919bd/attachment.pgp>



More information about the ffmpeg-devel mailing list