123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- From 270e918982a41c5f9448709c0cb3d9442ae31d04 Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
- Date: Fri, 10 Aug 2012 16:01:49 +0200
- Subject: [PATCH 02/20] 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.9.3 (Apple Git-50)
|