Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2019-10-07 10:27:42 +0300
committerJean-Baptiste Kempf <jb@videolan.org>2019-10-08 08:54:16 +0300
commit32ae5dd05994b47aee00ac7dfc429830369f4f1c (patch)
tree4446bfa7a3a79ea964bcb6ef5edadb1776bc9b04 /src/arm/32/util.S
parent7bbc5e3d5c22d5c154cc523b899480d65798d547 (diff)
arm: Support PIC loading of non-global symbols in the movrel macro on apple platforms
Diffstat (limited to 'src/arm/32/util.S')
-rw-r--r--src/arm/32/util.S10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/arm/32/util.S b/src/arm/32/util.S
index 0521ef2..3f2e328 100644
--- a/src/arm/32/util.S
+++ b/src/arm/32/util.S
@@ -32,8 +32,9 @@
#include "config.h"
#include "src/arm/asm.S"
-.macro movrel rd, val, offset=0
+.macro movrel rd, val, offset=0, global=1
#if defined(PIC) && defined(__APPLE__)
+.if \global
ldr \rd, 1f
b 2f
1:
@@ -50,13 +51,18 @@
.indirect_symbol \val
.word 0
.text
-#elif defined(PIC)
+.else
+#endif
+#if defined(PIC)
ldr \rd, 1f
b 2f
1:
.word \val + \offset - (2f + 8 - 4 * CONFIG_THUMB)
2:
add \rd, \rd, pc
+#if defined(__APPLE__)
+.endif
+#endif
#else
movw \rd, #:lower16:\val+\offset
movt \rd, #:upper16:\val+\offset