summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorJonathan Wright <jonathan.wright@arm.com>2020-09-28 13:35:51 +0100
committerMartin Storsjö <martin@martin.st>2021-11-16 13:43:56 +0200
commit08b4716a9ed277afb4af69b07b751c9bd046aa70 (patch)
tree541be310256c907c799c49a4aea070629e13a173 /libavcodec
parent6f04cf54f532ad5695072303d74cddaa591f9aa1 (diff)
aarch64: Add Armv8.5-A BTI support
Add Branch Target Identifiers (BTIs) to all functions defined in AArch64 assembly files. Most of the BTI landing pads are added automatically by the 'function' macro. BTI support is turned on or off at compile time based on the presence of the __ARM_FEATURE_BTI_DEFAULT feature macro. A binary compiled with BTI support can be executed on an Armv8-A processor without BTI support because the instructions are defined in NOP space. Signed-off-by: Jonathan Wright <jonathan.wright@arm.com> Signed-off-by: Elijah Ahmad <elijah.ahmad@arm.com> Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aarch64/fft_neon.S4
-rw-r--r--libavcodec/aarch64/h264idct_neon.S4
2 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/aarch64/fft_neon.S b/libavcodec/aarch64/fft_neon.S
index 862039f97d..b4020fc8c7 100644
--- a/libavcodec/aarch64/fft_neon.S
+++ b/libavcodec/aarch64/fft_neon.S
@@ -36,6 +36,7 @@
function fft4_neon
+ AARCH64_VALID_JUMP_TARGET
ld1 {v0.2s,v1.2s,v2.2s,v3.2s}, [x0]
fadd v4.2s, v0.2s, v1.2s // r0+r1,i0+i1
@@ -58,6 +59,7 @@ function fft4_neon
endfunc
function fft8_neon
+ AARCH64_VALID_JUMP_TARGET
mov x1, x0
ld1 {v0.2s, v1.2s, v2.2s, v3.2s}, [x0], #32
ld1 {v16.2s,v17.2s,v18.2s,v19.2s}, [x0]
@@ -108,6 +110,7 @@ function fft8_neon
endfunc
function fft16_neon
+ AARCH64_VALID_JUMP_TARGET
mov x1, x0
ld1 {v0.2s, v1.2s, v2.2s, v3.2s}, [x0], #32
ld1 {v16.2s,v17.2s,v18.2s,v19.2s}, [x0], #32
@@ -337,6 +340,7 @@ endfunc
.macro def_fft n, n2, n4
function fft\n\()_neon, align=6
+ AARCH64_VALID_JUMP_TARGET
sub sp, sp, #16
stp x28, x30, [sp]
add x28, x0, #\n4*2*8
diff --git a/libavcodec/aarch64/h264idct_neon.S b/libavcodec/aarch64/h264idct_neon.S
index 7de44205d3..7d2879b0ce 100644
--- a/libavcodec/aarch64/h264idct_neon.S
+++ b/libavcodec/aarch64/h264idct_neon.S
@@ -24,6 +24,7 @@
function ff_h264_idct_add_neon, export=1
.L_ff_h264_idct_add_neon:
+ AARCH64_VALID_CALL_TARGET
ld1 {v0.4H, v1.4H, v2.4H, v3.4H}, [x1]
sxtw x2, w2
movi v30.8H, #0
@@ -79,6 +80,7 @@ endfunc
function ff_h264_idct_dc_add_neon, export=1
.L_ff_h264_idct_dc_add_neon:
+ AARCH64_VALID_CALL_TARGET
sxtw x2, w2
mov w3, #0
ld1r {v2.8H}, [x1]
@@ -266,6 +268,7 @@ endfunc
function ff_h264_idct8_add_neon, export=1
.L_ff_h264_idct8_add_neon:
+ AARCH64_VALID_CALL_TARGET
movi v19.8H, #0
sxtw x2, w2
ld1 {v24.8H, v25.8H}, [x1]
@@ -330,6 +333,7 @@ endfunc
function ff_h264_idct8_dc_add_neon, export=1
.L_ff_h264_idct8_dc_add_neon:
+ AARCH64_VALID_CALL_TARGET
mov w3, #0
sxtw x2, w2
ld1r {v31.8H}, [x1]