From b695837cc67bf404332f68e90b828387f01510eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= Date: Fri, 10 Aug 2012 16:01:49 +0200 Subject: [PATCH 02/15] arm_neon: use a macro to fix compilation for iOS --- modules/arm_neon/amplify.S | 9 +++--- modules/arm_neon/simple_channel_mixer.S | 57 +++++++++++++++------------------ 2 files changed, 31 insertions(+), 35 deletions(-) diff --git a/modules/arm_neon/amplify.S b/modules/arm_neon/amplify.S index 5938118..578f972 100644 --- a/modules/arm_neon/amplify.S +++ b/modules/arm_neon/amplify.S @@ -18,6 +18,8 @@ @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. @****************************************************************************/ +#include "asm.S" + .syntax unified .arm .fpu neon @@ -26,10 +28,8 @@ #define DST r0 #define SRC r1 #define SIZE r2 - .align 2 - .global amplify_float_arm_neon - .type amplify_float_arm_neon, %function -amplify_float_arm_neon: + +function amplify_float_arm_neon, export=1 cmp SIZE, #0 bxeq lr #ifdef __ARM_PCS @@ -79,3 +79,4 @@ amplify_float_arm_neon: 4: vst1.f32 {d20-d21}, [DST,:128]! 5: vst1.f32 {d16-d17}, [DST,:128]! bx lr +endfunc diff --git a/modules/arm_neon/simple_channel_mixer.S b/modules/arm_neon/simple_channel_mixer.S index dcc51ed..4722be4 100644 --- a/modules/arm_neon/simple_channel_mixer.S +++ b/modules/arm_neon/simple_channel_mixer.S @@ -19,6 +19,8 @@ @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. @****************************************************************************/ +#include "asm.S" + .fpu neon .text .align 2 @@ -34,9 +36,8 @@ coeff_7to2: .float 0.5 .float 0.25 .float 0.25 - .global convert_7to2_neon_asm - .type convert_7to2_neon_asm, %function -convert_7to2_neon_asm: + +function convert_7to2_neon_asm, export=1 push {r4,lr} adr COEFF, coeff_7to2 @@ -63,16 +64,15 @@ convert_7to2_neon_asm: bne 0b pop {r4,pc} - +endfunc coeff_5to2: .float 0.5 .float 0.5 .float 0.33 .float 0.33 - .global convert_5to2_neon_asm - .type convert_5to2_neon_asm, %function -convert_5to2_neon_asm: + +function convert_5to2_neon_asm, export=1 push {r4,lr} adr COEFF, coeff_5to2 @@ -95,14 +95,13 @@ convert_5to2_neon_asm: bne 0b pop {r4,pc} - +endfunc coeff_4to2: .float 0.5 .float 0.5 - .global convert_4to2_neon_asm - .type convert_4to2_neon_asm, %function -convert_4to2_neon_asm: + +function convert_4to2_neon_asm, export=1 push {r4,lr} adr COEFF, coeff_4to2 @@ -119,14 +118,13 @@ convert_4to2_neon_asm: bne 0b pop {r4,pc} - +endfunc coeff_3to2: .float 0.5 .float 0.5 - .global convert_3to2_neon_asm - .type convert_3to2_neon_asm, %function -convert_3to2_neon_asm: + +function convert_3to2_neon_asm, export=1 push {r4,lr} adr COEFF, coeff_3to2 @@ -147,16 +145,15 @@ convert_3to2_neon_asm: bne 0b pop {r4,pc} - +endfunc coeff_7to1: .float 0.25 .float 0.25 .float 0.125 .float 0.125 - .global convert_7to1_neon_asm - .type convert_7to1_neon_asm, %function -convert_7to1_neon_asm: + +function convert_7to1_neon_asm, export=1 push {r4,lr} adr COEFF, coeff_7to1 @@ -181,16 +178,15 @@ convert_7to1_neon_asm: bne 0b pop {r4,pc} - +endfunc coeff_5to1: .float 0.25 .float 0.25 .float 0.16666667 .float 0.16666667 - .global convert_5to1_neon_asm - .type convert_5to1_neon_asm, %function -convert_5to1_neon_asm: + +function convert_5to1_neon_asm, export=1 push {r4,lr} adr COEFF, coeff_5to1 @@ -212,16 +208,15 @@ convert_5to1_neon_asm: bne 0b pop {r4,pc} - +endfunc coeff_7to4: .float 0.5 .float 0.5 .float 0.16666667 .float 0.16666667 - .global convert_7to4_neon_asm - .type convert_7to4_neon_asm, %function -convert_7to4_neon_asm: + +function convert_7to4_neon_asm, export=1 push {r4,lr} adr COEFF, coeff_7to4 @@ -247,14 +242,13 @@ convert_7to4_neon_asm: bne 0b pop {r4,pc} - +endfunc coeff_5to4: .float 0.5 .float 0.5 - .global convert_5to4_neon_asm - .type convert_5to4_neon_asm, %function -convert_5to4_neon_asm: + +function convert_5to4_neon_asm, export=1 push {r4,lr} adr COEFF, coeff_5to4 @@ -277,3 +271,4 @@ convert_5to4_neon_asm: bne 0b pop {r4,pc} +endfunc -- 1.8.3.4 (Apple Git-47)