[vlc-devel] [PATCH 1/3] aarch64: add macro for BTI
Rémi Denis-Courmont
remi at remlab.net
Fri Nov 29 19:14:24 CET 2019
This redefines bti so that it can assemble even on older assembler or
when targeting an ARMv8-A revision lower than 8.5.
---
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..0d3f161ee9 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 \tagets, jc
+ hint #38
+.else
+.error "invalid BTI target"
+.endif
+.endif
+.endif
+.endif
+.endm
--
2.24.0
More information about the vlc-devel
mailing list