diff options
author | Måns Rullgård <mans@mansr.com> | 2008-12-30 06:13:52 +0300 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-12-30 06:13:52 +0300 |
commit | 172a39d13c77bda27ac77535d1df45f85b751fcb (patch) | |
tree | decec1efc808e094aa37f44bb94d6c43da57de16 /libavcodec/arm | |
parent | 2e35e68434352d44ea133b9fa0f623c87c6a95b6 (diff) |
ARM: work around linker bug with movw/movt relocations in shared libs
Originally committed as revision 16395 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/arm')
-rw-r--r-- | libavcodec/arm/asm.S | 11 | ||||
-rw-r--r-- | libavcodec/arm/h264idct_neon.S | 9 | ||||
-rw-r--r-- | libavcodec/arm/simple_idct_neon.S | 3 |
3 files changed, 15 insertions, 8 deletions
diff --git a/libavcodec/arm/asm.S b/libavcodec/arm/asm.S index e2595f4789..0aa1639998 100644 --- a/libavcodec/arm/asm.S +++ b/libavcodec/arm/asm.S @@ -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 diff --git a/libavcodec/arm/h264idct_neon.S b/libavcodec/arm/h264idct_neon.S index 7f1c8eb8d0..6527390022 100644 --- a/libavcodec/arm/h264idct_neon.S +++ b/libavcodec/arm/h264idct_neon.S @@ -103,8 +103,7 @@ function ff_h264_idct_add16_neon, export=1 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 @@ function ff_h264_idct_add16intra_neon, export=1 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 @@ function ff_h264_idct_add8_neon, export=1 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 diff --git a/libavcodec/arm/simple_idct_neon.S b/libavcodec/arm/simple_idct_neon.S index e05c5fcb8b..e7099a221e 100644 --- a/libavcodec/arm/simple_idct_neon.S +++ b/libavcodec/arm/simple_idct_neon.S @@ -239,8 +239,7 @@ idct_coeff_neon: 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 |