1 Apr 2007 01:42
Re: Re: [PATCH] Fix compilation when using --disable-opts
Loren Merritt <lorenm <at> u.washington.edu>
2007-03-31 23:42:46 GMT
2007-03-31 23:42:46 GMT
On Sat, 31 Mar 2007, Reimar Döffinger wrote:
> On Sat, Mar 31, 2007 at 11:01:08PM +0300, Uoti Urpala wrote:
>
>> Your compilation problems might be caused by CONFIG_EBX_AVAILABLE not
>> being set correctly. How are you creating the nonstandard build which
>> uses -fPIC on x86-32? Is that hack done by the Gentoo package by
>> default? Is it done by setting configure flags, and if so, only --cflags
>> or something else?
>
> Not motivated to fix it, but on AMD64 at least with the gentoo package
> PIC has a different problem - somehow MANGLE(ff_h264_lps_range) gets
> substituted to "ff_h264_lps_range(%rip)", which then gets combined to
> something like "movzbl ff_h264_lps_range(%rip)(%rax, %ebx, 2), %esi".
> I guess I should try compiling shared libs from clean source some
> time and see if that's really the problem and how it could be
> fixed/detected...
So how does it work on x86_32? In both archs, pic adds a register offset
to the address, the only difference is which register (%rip vs %ebx) and
how it's initialized.
... Looking at the dissasembly of a x86_32 pic build of ffmpeg, it works
by not actually using pic. e.g. in dsputil_mmx I see a mixture of
paddw ff_pw_16 <at> GOTOFF(%ebx), %mm4
and
movq ff_pw_20, %mm4
depending on whether it's accessed by "m" asm constraint or by MANGLE.
The reason you didn't run into this problem before is that all instances
of MANGLE in dsputil just refer to a single variable, none of them use any
complex addressing modes, so appending (%rip) leaves a legal addressing
(Continue reading)
RSS Feed