changeset 8507:779a9c93bf61 libavcodec

ARM: work around linker bug with movw/movt relocations in shared libs
author mru
date Tue, 30 Dec 2008 03:13:52 +0000
parents 1a629032b24a
children 8bb3aa9813b5
files arm/asm.S arm/h264idct_neon.S arm/simple_idct_neon.S
diffstat 3 files changed, 15 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/arm/asm.S	Tue Dec 30 03:13:40 2008 +0000
+++ b/arm/asm.S	Tue Dec 30 03:13:52 2008 +0000
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "config.h"
+
         .macro require8, val=1
         .eabi_attribute 24, \val
         .endm
@@ -34,3 +36,12 @@
         .func   \name
 \name:
         .endm
+
+        .macro movrel rd, val
+#if defined(HAVE_ARMV6T2) && !defined(CONFIG_SHARED)
+        movw            \rd, #:lower16:\val
+        movt            \rd, #:upper16:\val
+#else
+        ldr             \rd, =\val
+#endif
+        .endm
--- a/arm/h264idct_neon.S	Tue Dec 30 03:13:40 2008 +0000
+++ b/arm/h264idct_neon.S	Tue Dec 30 03:13:52 2008 +0000
@@ -103,8 +103,7 @@
         mov             r1,  r2
         mov             r2,  r3
         ldr             r6,  [sp, #24]
-        movw            r7,  #:lower16:scan8
-        movt            r7,  #:upper16:scan8
+        movrel          r7,  scan8
         mov             ip,  #16
 1:      ldrb            r8,  [r7], #1
         ldr             r0,  [r5], #4
@@ -131,8 +130,7 @@
         mov             r1,  r2
         mov             r2,  r3
         ldr             r6,  [sp, #24]
-        movw            r7,  #:lower16:scan8
-        movt            r7,  #:upper16:scan8
+        movrel          r7,  scan8
         mov             ip,  #16
 1:      ldrb            r8,  [r7], #1
         ldr             r0,  [r5], #4
@@ -157,8 +155,7 @@
         add             r1,  r2,  #16*32
         mov             r2,  r3
         ldr             r6,  [sp, #32]
-        movw            r7,  #:lower16:scan8+16
-        movt            r7,  #:upper16:scan8+16
+        movrel          r7,  scan8+16
         mov             ip,  #8
 1:      ldrb            r8,  [r7], #1
         ldr             r0,  [r5], #4
--- a/arm/simple_idct_neon.S	Tue Dec 30 03:13:40 2008 +0000
+++ b/arm/simple_idct_neon.S	Tue Dec 30 03:13:52 2008 +0000
@@ -239,8 +239,7 @@
         pld             [\data]
         pld             [\data, #64]
         vpush           {d8-d15}
-        movw            r3, #:lower16:idct_coeff_neon
-        movt            r3, #:upper16:idct_coeff_neon
+        movrel          r3,  idct_coeff_neon
         vld1.64         {d0,d1}, [r3,:128]
         .endm