summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAndre Kempe <Andre.Kempe@arm.com>2022-02-14 12:28:04 +0000
committerMartin Storsjö <martin@martin.st>2022-03-09 15:04:25 +0200
commit248986a0db56f833b5fc3b1b96445b841f85220b (patch)
tree9fc87f81a95891cf41b78544d3a308bf9820c217 /libavcodec
parent74117abf0c26228102587057567b39b8a57e44fb (diff)
arm64: Add Armv8.3-A PAC support to assembly files
This patch adds optional support for Arm Pointer Authentication Codes. PAC support is turned on or off at compile time using additional compiler flags. Unless any of these is enabled explicitly, no additional code will be emitted at all. Signed-off-by: André Kempe <andre.kempe@arm.com> Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aarch64/fft_neon.S3
-rw-r--r--libavcodec/aarch64/mdct_neon.S17
-rw-r--r--libavcodec/aarch64/synth_filter_neon.S2
3 files changed, 17 insertions, 5 deletions
diff --git a/libavcodec/aarch64/fft_neon.S b/libavcodec/aarch64/fft_neon.S
index b4020fc8c7..dd5f55eb87 100644
--- a/libavcodec/aarch64/fft_neon.S
+++ b/libavcodec/aarch64/fft_neon.S
@@ -340,7 +340,7 @@ endfunc
.macro def_fft n, n2, n4
function fft\n\()_neon, align=6
- AARCH64_VALID_JUMP_TARGET
+ AARCH64_SIGN_LINK_REGISTER
sub sp, sp, #16
stp x28, x30, [sp]
add x28, x0, #\n4*2*8
@@ -351,6 +351,7 @@ function fft\n\()_neon, align=6
bl fft\n4\()_neon
sub x0, x28, #\n4*2*8
ldp x28, x30, [sp], #16
+ AARCH64_VALIDATE_LINK_REGISTER
movrel x4, X(ff_cos_\n)
mov x2, #\n4>>1
b fft_pass_neon
diff --git a/libavcodec/aarch64/mdct_neon.S b/libavcodec/aarch64/mdct_neon.S
index 1fd199c972..6091e72022 100644
--- a/libavcodec/aarch64/mdct_neon.S
+++ b/libavcodec/aarch64/mdct_neon.S
@@ -25,6 +25,7 @@
function ff_imdct_half_neon, export=1
sub sp, sp, #32
stp x19, x20, [sp]
+ AARCH64_SIGN_LINK_REGISTER
str x30, [sp, #16]
mov x12, #1
ldr w14, [x0, #28] // mdct_bits
@@ -121,6 +122,7 @@ function ff_imdct_half_neon, export=1
ldp x19, x20, [sp]
ldr x30, [sp, #16]
+ AARCH64_VALIDATE_LINK_REGISTER
add sp, sp, #32
ret
@@ -129,6 +131,7 @@ endfunc
function ff_imdct_calc_neon, export=1
sub sp, sp, #32
stp x19, x20, [sp]
+ AARCH64_SIGN_LINK_REGISTER
str x30, [sp, #16]
ldr w3, [x0, #28] // mdct_bits
mov x19, #1
@@ -160,8 +163,10 @@ function ff_imdct_calc_neon, export=1
subs x19, x19, #16
b.gt 1b
- ldp x19, x20, [sp], #16
- ldr x30, [sp], #16
+ ldp x19, x20, [sp]
+ ldr x30, [sp, #16]
+ AARCH64_VALIDATE_LINK_REGISTER
+ add sp, sp, #32
ret
endfunc
@@ -170,6 +175,7 @@ endfunc
function ff_mdct_calc_neon, export=1
sub sp, sp, #32
stp x19, x20, [sp]
+ AARCH64_SIGN_LINK_REGISTER
str x30, [sp, #16]
mov x12, #1
@@ -317,7 +323,10 @@ function ff_mdct_calc_neon, export=1
st2 {v4.2s,v5.2s}, [x0]
st2 {v6.2s,v7.2s}, [x8]
- ldp x19, x20, [sp], #16
- ldr x30, [sp], #16
+ ldp x19, x20, [sp]
+ ldr x30, [sp, #16]
+ AARCH64_VALIDATE_LINK_REGISTER
+ add sp, sp, #32
+
ret
endfunc
diff --git a/libavcodec/aarch64/synth_filter_neon.S b/libavcodec/aarch64/synth_filter_neon.S
index 8fcd71f252..ba79ba9686 100644
--- a/libavcodec/aarch64/synth_filter_neon.S
+++ b/libavcodec/aarch64/synth_filter_neon.S
@@ -52,6 +52,7 @@ function ff_synth_filter_float_neon, export=1
stp x5, x1, [sp, #16]
and x7, x7, #~63
and w8, w8, #511
+ AARCH64_SIGN_LINK_REGISTER
stp x7, x30, [sp, #32]
str w8, [x2]
str s0, [sp, #48]
@@ -63,6 +64,7 @@ function ff_synth_filter_float_neon, export=1
ldp x2, x4, [sp] // synct_buf_2, window
ldp x13, x9, [sp, #16] // out, synth_buf
ldp x0, x30, [sp, #32] // *synth_buf_offset
+ AARCH64_VALIDATE_LINK_REGISTER
ldr s0, [sp, #48]
add x3, x2, #16*4 // synct_buf_2 + 16