1/* SPDX-License-Identifier: BSD-2-Clause */
2/*
3 * Copyright (c) 2021, Linaro Limited
4 */
5
6#include <asm.S>
7
8FUNC call_using_blr , : , , , no_bti
9	bti	c
10	stp     x29, x30, [sp, #-16]!
11	blr     x0
12	ldp     x29, x30, [sp], #16
13	ret
14END_FUNC call_using_blr
15
16FUNC call_using_br , : , , , no_bti
17	bti	c
18	br	x0
19END_FUNC call_using_br
20
21FUNC call_using_br_x16 , : , , , no_bti
22	bti	c
23	mov 	x16, x0
24	br	x16
25END_FUNC call_using_br_x16
26
27FUNC bti_j , : , , , no_bti
28	bti	j
29	ret
30END_FUNC bti_j
31
32FUNC bti_c , : , , , no_bti
33	bti	c
34	ret
35END_FUNC bti_c
36
37FUNC bti_jc , : , , , no_bti
38	bti	jc
39	ret
40END_FUNC bti_jc
41
42FUNC bti_none , : , , , no_bti
43	ret
44END_FUNC bti_none
45
46emit_aarch64_feature_1_and     GNU_PROPERTY_AARCH64_FEATURE_1_BTI
47