[FFmpeg-devel] [PATCH] MANGLE for labels inside asm (was: [PATCH] Move MLP's dot product to DSPContext)

Ramiro Polla ramiro.polla
Mon May 25 03:54:05 CEST 2009


On Sat, May 23, 2009 at 9:20 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Fri, May 22, 2009 at 11:13:44PM -0300, Ramiro Polla wrote:
>> On Fri, May 22, 2009 at 9:24 PM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
>> [...]
>> > Applied with the #endif comment as /* !HAVE_X86_64 */
>>
>> > +#if ARCH_X86_64
>> > +
>> > +#define MLPMUL(label, offset, offs, offc) ? \
>> > + ? ?MANGLE(label)": ? ? ? ? ? ? ? ? ? \n\t" \
>> > + ? ?"movslq "offset"+"offs"(%0), %%rax\n\t" \
>> > + ? ?"movslq "offset"+"offc"(%1), %%rdx\n\t" \
>> > + ? ?"imul ? ? ? ? ? ? ? ? %%rdx, %%rax\n\t" \
>> > + ? ?"add ? ? ? ? ? ? ? ? ?%%rax, %%rsi\n\t"
>>
>> This broke building on x86_64 with PIC. The reason is MANGLE() in that
>> case appends (%%rip) to the symbol. That is not wanted for exporting a
>> label from inside an asm block. The symbol must be MANGLE()d here so
>> it can be picked up by the C code (or else we get undefined
>> references).
>>
>> So I propose:
>> label_mangle.diff
>> use_label_mangle.diff
>> restore_x86_mlpdsp.diff
>
> ok

Applied.



More information about the ffmpeg-devel mailing list