[vlc-commits] aarch64: add macro for BTI

Rémi Denis-Courmont git at videolan.org
Thu Dec 5 16:55:20 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Nov 29 20:08:07 2019 +0200| [61143dd3323ace886485a0f8fcd06b199a7159d4] | committer: Rémi Denis-Courmont

aarch64: add macro for BTI

This redefines bti so that it can assemble even on older assembler or
when targeting an ARMv8-A revision lower than 8.5.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=61143dd3323ace886485a0f8fcd06b199a7159d4
---

 modules/arm_neon/asm.S | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/modules/arm_neon/asm.S b/modules/arm_neon/asm.S
index 728391ea37..f07b5762d5 100644
--- a/modules/arm_neon/asm.S
+++ b/modules/arm_neon/asm.S
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2018 Janne Grunau <janne-libav at jannau.net>
+ * Copyright (c) 2019 Rémi Denis-Courmont
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -37,3 +38,23 @@
 #endif
 EXTERN_ASM\name:
 .endm
+
+.macro	bti	targets=
+.ifb	\targets
+	hint	#32
+.else
+.ifc	\targets, c
+	hint	#34
+.else
+.ifc	\targets, j
+	hint	#36
+.else
+.ifc	\targets, jc
+	hint	#38
+.else
+.error	"invalid BTI target"
+.endif
+.endif
+.endif
+.endif
+.endm



More information about the vlc-commits mailing list