From b98ee1a355e45d617e2b2a19722f74b4fe724ed3 Mon Sep 17 00:00:00 2001 From: Casey Smalley Date: Thu, 27 Jul 2023 11:26:26 +0100 Subject: [PATCH] aarch64/hevc: Replace br return with ret MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch changes the return instruction in the tr_32x4 macro from BR to RET. Function returns should always use the RET instruction instead of BR, to avoid interfering with branch prediction. On devices that support BTI, this is observeable as a landing pad is required when branching with BR. The change fixes fate-hevc-hdr-vivid-metadata when on hardware with BTI support. Signed-off-by: Casey Smalley Signed-off-by: Martin Storsjö --- libavcodec/aarch64/hevcdsp_idct_neon.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aarch64/hevcdsp_idct_neon.S b/libavcodec/aarch64/hevcdsp_idct_neon.S index f7142c939c..ba8a1ebaed 100644 --- a/libavcodec/aarch64/hevcdsp_idct_neon.S +++ b/libavcodec/aarch64/hevcdsp_idct_neon.S @@ -790,7 +790,7 @@ function func_tr_32x4_\name add x3, x11, #(32 + 3 * 64) scale_store \shift - br x10 + ret x10 endfunc .endm