[vlc-commits] handle the underscore prefix for some ARM ABI in arm_neon

David Geldreich git at videolan.org
Fri Apr 20 22:16:48 CEST 2012


vlc | branch: master | David Geldreich <david.geldreich at free.fr> | Fri Apr 20 18:16:41 2012 +0200| [0fd1cbe313c374ad21cb7eed1fe60d8bd8b87550] | committer: Rémi Denis-Courmont

handle the underscore prefix for some ARM ABI in arm_neon

here is an altenative to using an assembly macros to handle the calling
differences across ARM ABI.

use a gcc extension (also supported by clang/llvm) which symbol is
associated with function

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0fd1cbe313c374ad21cb7eed1fe60d8bd8b87550
---

 modules/arm_neon/audio_format.c |    6 ++++--
 modules/arm_neon/chroma_neon.h  |   23 ++++++++++++++---------
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/modules/arm_neon/audio_format.c b/modules/arm_neon/audio_format.c
index 8db209f..3a76f18 100644
--- a/modules/arm_neon/audio_format.c
+++ b/modules/arm_neon/audio_format.c
@@ -135,8 +135,10 @@ static block_t *Do_F32_S32 (filter_t *filter, block_t *inbuf)
 }
 #endif
 
-void s32_s16_neon_unaligned (int16_t *out, const int32_t *in, unsigned nb);
-void s32_s16_neon (int16_t *out, const int32_t *in, unsigned nb);
+extern void s32_s16_neon_unaligned (int16_t *out, const int32_t *in,
+                                    unsigned nb) asm("s32_s16_neon_unaligned");
+extern void s32_s16_neon (int16_t *out, const int32_t *in,
+                          unsigned nb) asm("s32_s16_neon");
 
 /**
  * Signed 32-bits fixed point to signed 16-bits integer
diff --git a/modules/arm_neon/chroma_neon.h b/modules/arm_neon/chroma_neon.h
index 3e867e3..e0debae 100644
--- a/modules/arm_neon/chroma_neon.h
+++ b/modules/arm_neon/chroma_neon.h
@@ -40,39 +40,44 @@ struct yuv_pack
 /* I420 to YUYV conversion. */
 void i420_yuyv_neon (struct yuv_pack *const out,
                      const struct yuv_planes *const in,
-                     int width, int height);
+                     int width, int height) asm("i420_yuyv_neon");
 
 /* I420 to UYVY conversion. */
 void i420_uyvy_neon (struct yuv_pack *const out,
                      const struct yuv_planes *const in,
-                     int width, int height);
+                     int width, int height) asm("i420_uyvy_neon");
 
 /* I422 to YUYV conversion. */
 void i422_yuyv_neon (struct yuv_pack *const out,
                      const struct yuv_planes *const in,
-                     int width, int height);
+                     int width, int height) asm("i422_yuyv_neon");
 
 /* I422 to UYVY conversion. */
 void i422_uyvy_neon (struct yuv_pack *const out,
                      const struct yuv_planes *const in,
-                     int width, int height);
+                     int width, int height) asm("i422_uyvy_neon");
 
 /* YUYV to I422 conversion. */
 void yuyv_i422_neon (struct yuv_planes *const out,
-                     const struct yuv_pack *const in, int width, int height);
+                     const struct yuv_pack *const in,
+                     int width, int height) asm("yuyv_i422_neon");
 
 /* UYVY to I422 conversion. */
 void uyvy_i422_neon (struct yuv_planes *const out,
-                     const struct yuv_pack *const in, int width, int height);
+                     const struct yuv_pack *const in,
+                     int width, int height) asm("uyvy_i422_neon");
 
 /* I420 to RGBA conversion. */
 void i420_rgb_neon (struct yuv_pack *const out,
-                    const struct yuv_planes *const in, int width, int height);
+                    const struct yuv_planes *const in,
+                    int width, int height) asm("i420_rgb_neon");
 
 /* NV21 to RGBA conversion. */
 void nv21_rgb_neon (struct yuv_pack *const out,
-                    const struct yuv_planes *const in, int width, int height);
+                    const struct yuv_planes *const in,
+                    int width, int height) asm("nv21_rgb_neon");
 
 /* NV12 to RGBA conversion. */
 void nv12_rgb_neon (struct yuv_pack *const out,
-                    const struct yuv_planes *const in, int width, int height);
+                    const struct yuv_planes *const in,
+                    int width, int height) asm("nv12_rgb_neon");



More information about the vlc-commits mailing list