0002-arm_neon-use-a-macro-to-fix-compilation-for-iOS.patch 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. From d14a4728d99e59baec3361e8f8778b41f6fb0904 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
  3. Date: Fri, 10 Aug 2012 16:01:49 +0200
  4. Subject: [PATCH 2/8] arm_neon: use a macro to fix compilation for iOS
  5. ---
  6. modules/arm_neon/amplify.S | 9 ++---
  7. modules/arm_neon/simple_channel_mixer.S | 57 ++++++++++++++-----------------
  8. 2 files changed, 31 insertions(+), 35 deletions(-)
  9. diff --git a/modules/arm_neon/amplify.S b/modules/arm_neon/amplify.S
  10. index 5938118..578f972 100644
  11. --- a/modules/arm_neon/amplify.S
  12. +++ b/modules/arm_neon/amplify.S
  13. @@ -18,6 +18,8 @@
  14. @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  15. @****************************************************************************/
  16. +#include "asm.S"
  17. +
  18. .syntax unified
  19. .arm
  20. .fpu neon
  21. @@ -26,10 +28,8 @@
  22. #define DST r0
  23. #define SRC r1
  24. #define SIZE r2
  25. - .align 2
  26. - .global amplify_float_arm_neon
  27. - .type amplify_float_arm_neon, %function
  28. -amplify_float_arm_neon:
  29. +
  30. +function amplify_float_arm_neon, export=1
  31. cmp SIZE, #0
  32. bxeq lr
  33. #ifdef __ARM_PCS
  34. @@ -79,3 +79,4 @@ amplify_float_arm_neon:
  35. 4: vst1.f32 {d20-d21}, [DST,:128]!
  36. 5: vst1.f32 {d16-d17}, [DST,:128]!
  37. bx lr
  38. +endfunc
  39. diff --git a/modules/arm_neon/simple_channel_mixer.S b/modules/arm_neon/simple_channel_mixer.S
  40. index dcc51ed..4722be4 100644
  41. --- a/modules/arm_neon/simple_channel_mixer.S
  42. +++ b/modules/arm_neon/simple_channel_mixer.S
  43. @@ -19,6 +19,8 @@
  44. @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  45. @****************************************************************************/
  46. +#include "asm.S"
  47. +
  48. .fpu neon
  49. .text
  50. .align 2
  51. @@ -34,9 +36,8 @@ coeff_7to2:
  52. .float 0.5
  53. .float 0.25
  54. .float 0.25
  55. - .global convert_7to2_neon_asm
  56. - .type convert_7to2_neon_asm, %function
  57. -convert_7to2_neon_asm:
  58. +
  59. +function convert_7to2_neon_asm, export=1
  60. push {r4,lr}
  61. adr COEFF, coeff_7to2
  62. @@ -63,16 +64,15 @@ convert_7to2_neon_asm:
  63. bne 0b
  64. pop {r4,pc}
  65. -
  66. +endfunc
  67. coeff_5to2:
  68. .float 0.5
  69. .float 0.5
  70. .float 0.33
  71. .float 0.33
  72. - .global convert_5to2_neon_asm
  73. - .type convert_5to2_neon_asm, %function
  74. -convert_5to2_neon_asm:
  75. +
  76. +function convert_5to2_neon_asm, export=1
  77. push {r4,lr}
  78. adr COEFF, coeff_5to2
  79. @@ -95,14 +95,13 @@ convert_5to2_neon_asm:
  80. bne 0b
  81. pop {r4,pc}
  82. -
  83. +endfunc
  84. coeff_4to2:
  85. .float 0.5
  86. .float 0.5
  87. - .global convert_4to2_neon_asm
  88. - .type convert_4to2_neon_asm, %function
  89. -convert_4to2_neon_asm:
  90. +
  91. +function convert_4to2_neon_asm, export=1
  92. push {r4,lr}
  93. adr COEFF, coeff_4to2
  94. @@ -119,14 +118,13 @@ convert_4to2_neon_asm:
  95. bne 0b
  96. pop {r4,pc}
  97. -
  98. +endfunc
  99. coeff_3to2:
  100. .float 0.5
  101. .float 0.5
  102. - .global convert_3to2_neon_asm
  103. - .type convert_3to2_neon_asm, %function
  104. -convert_3to2_neon_asm:
  105. +
  106. +function convert_3to2_neon_asm, export=1
  107. push {r4,lr}
  108. adr COEFF, coeff_3to2
  109. @@ -147,16 +145,15 @@ convert_3to2_neon_asm:
  110. bne 0b
  111. pop {r4,pc}
  112. -
  113. +endfunc
  114. coeff_7to1:
  115. .float 0.25
  116. .float 0.25
  117. .float 0.125
  118. .float 0.125
  119. - .global convert_7to1_neon_asm
  120. - .type convert_7to1_neon_asm, %function
  121. -convert_7to1_neon_asm:
  122. +
  123. +function convert_7to1_neon_asm, export=1
  124. push {r4,lr}
  125. adr COEFF, coeff_7to1
  126. @@ -181,16 +178,15 @@ convert_7to1_neon_asm:
  127. bne 0b
  128. pop {r4,pc}
  129. -
  130. +endfunc
  131. coeff_5to1:
  132. .float 0.25
  133. .float 0.25
  134. .float 0.16666667
  135. .float 0.16666667
  136. - .global convert_5to1_neon_asm
  137. - .type convert_5to1_neon_asm, %function
  138. -convert_5to1_neon_asm:
  139. +
  140. +function convert_5to1_neon_asm, export=1
  141. push {r4,lr}
  142. adr COEFF, coeff_5to1
  143. @@ -212,16 +208,15 @@ convert_5to1_neon_asm:
  144. bne 0b
  145. pop {r4,pc}
  146. -
  147. +endfunc
  148. coeff_7to4:
  149. .float 0.5
  150. .float 0.5
  151. .float 0.16666667
  152. .float 0.16666667
  153. - .global convert_7to4_neon_asm
  154. - .type convert_7to4_neon_asm, %function
  155. -convert_7to4_neon_asm:
  156. +
  157. +function convert_7to4_neon_asm, export=1
  158. push {r4,lr}
  159. adr COEFF, coeff_7to4
  160. @@ -247,14 +242,13 @@ convert_7to4_neon_asm:
  161. bne 0b
  162. pop {r4,pc}
  163. -
  164. +endfunc
  165. coeff_5to4:
  166. .float 0.5
  167. .float 0.5
  168. - .global convert_5to4_neon_asm
  169. - .type convert_5to4_neon_asm, %function
  170. -convert_5to4_neon_asm:
  171. +
  172. +function convert_5to4_neon_asm, export=1
  173. push {r4,lr}
  174. adr COEFF, coeff_5to4
  175. @@ -277,3 +271,4 @@ convert_5to4_neon_asm:
  176. bne 0b
  177. pop {r4,pc}
  178. +endfunc
  179. --
  180. 1.7.10.2 (Apple Git-33)