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

Ramiro Polla ramiro.polla
Sat May 23 04:13:44 CEST 2009


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

Tested on:
x86_32 static and shared (linux, mac os x, windows)
x86_64 static and shared (linux, mac os x)

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: label_mangle.diff
Type: text/x-diff
Size: 493 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090522/1702c789/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use_label_mangle.diff
Type: text/x-diff
Size: 1815 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090522/1702c789/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: restore_x86_mlpdsp.diff
Type: text/x-diff
Size: 1283 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090522/1702c789/attachment-0002.diff>



More information about the ffmpeg-devel mailing list