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>2018-10-21 22:15:48 +0300
committerJanne Grunau <janne-vlc@jannau.net>2018-10-24 01:38:09 +0300
commit0bb538983122e908353d1487407749bce18ee6a6 (patch)
tree7e663ce5d8a2285b636bb52ed266f00c696769df /src/arm/64/mc.S
parent859ae6aade4832761073231d50052c6c8fc0656f (diff)
arm64: mc: Make the jump tables local symbols
For MachO, this makes sure that the label difference actually is evaluated at assembly time (as it already was for ELF and COFF); evaluating it at link time failed when the difference is stored in a .hword. This fixes linking errors like these: ld: in section __TEXT,__text reloc 0: ARM64_RELOC_SUBTRACTOR must have r_length of 2 or 3 file 'src/src@@dav1d_bitdepth_8@sta/arm_64_mc.S.o' for architecture arm64 This adds an asm.S macro for decorating a symbol for making a local symbol. For armasm64 with gas-preprocessor, this doesn't actually create a local label (but neither do the local numbered labels either currently), which might be slightly inconsistent in it would be necessary to make the distinction for that assembler as well. Alternatively, the table symbol could be made into a plain local numbered label as all the other labels.
Diffstat (limited to 'src/arm/64/mc.S')
-rw-r--r--src/arm/64/mc.S16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/arm/64/mc.S b/src/arm/64/mc.S
index d12f602..f84ec66 100644
--- a/src/arm/64/mc.S
+++ b/src/arm/64/mc.S
@@ -107,7 +107,7 @@ function \type\()_8bpc_neon, export=1
movi v31.16b, #256-2
.endif
rbit w4, w4
- adr x7, \type\()_tbl
+ adr x7, L(\type\()_tbl)
clz w4, w4
\type v4, v0, v1
ldrh w4, [x7, x4, lsl #1]
@@ -219,14 +219,14 @@ function \type\()_8bpc_neon, export=1
b 128b
0:
ret
-\type\()_tbl:
+L(\type\()_tbl):
.hword 0, 0
- .hword \type\()_tbl - 4b
- .hword \type\()_tbl - 8b
- .hword \type\()_tbl - 160b
- .hword \type\()_tbl - 320b
- .hword \type\()_tbl - 640b
- .hword \type\()_tbl - 1280b
+ .hword L(\type\()_tbl) - 4b
+ .hword L(\type\()_tbl) - 8b
+ .hword L(\type\()_tbl) - 160b
+ .hword L(\type\()_tbl) - 320b
+ .hword L(\type\()_tbl) - 640b
+ .hword L(\type\()_tbl) - 1280b
endfunc
.endm