[vlc-devel] [PATCH] define/use a function macro to handle the underscore prefix for some ARM ABI

David Geldreich david.geldreich at free.fr
Fri Apr 20 17:25:59 CEST 2012


Hello,

Le 20 avr. 2012 à 16:47, Rémi Denis-Courmont a écrit :

> Le vendredi 20 avril 2012 17:41:19 David Geldreich, vous avez écrit :
>> This correct a compilation/link problem of arm_neon plugins on iOS
> 
> Looks to me that you did not configure the toolchain calling convention properly.

This is the calling convention on iOS. If you ask for C function to not be prefixed with _, then you will not be able to use the other "system"/standard libraries.

> Anyway, I don't want some obscure macros that I don't even 
> understand in the assembler code that I wrote and am supposed to maintain.
> No thanks.

Another solution is to use a gcc feature and replace, in chroma_neon.h :

void i420_yuyv_neon (struct yuv_pack *const out,
                     const struct yuv_planes *const in,
                     int width, int height);

by

void i420_yuyv_neon (struct yuv_pack *const out,
                     const struct yuv_planes *const in,
                     int width, int height) asm("i420_yuyv_neon");

This will work on all ABIs and will not "uglify" your code with macros you don't understand. But, this will only work with gcc.

In my opinion, using the Måns Rullgård's macro is the cleanest way to handle this multi-ABI issue.

Regards.






More information about the vlc-devel mailing list