ARM: fix Thumb PIC on Apple
authorMans Rullgard <mans@mansr.com>
Mon, 1 Oct 2012 23:32:24 +0000 (00:32 +0100)
committerMans Rullgard <mans@mansr.com>
Tue, 2 Oct 2012 12:12:33 +0000 (13:12 +0100)
LDR with register offset and PC as base register is not available in
the Thumb instruction set so the addition must be done separately.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavutil/arm/asm.S

index ce7f46d..50305f7 100644 (file)
@@ -141,7 +141,9 @@ ELF     .size   \name, . - \name
         ldr             \rd, .Lpicoff\@
 .Lpic\@:
     .if \indir
-        ldr             \rd, [pc, \rd]
+A       ldr             \rd, [pc, \rd]
+T       add             \rd, pc
+T       ldr             \rd, [\rd]
     .else
         add             \rd, pc
     .endif