xref: /linux/tools/testing/selftests/arm64/bti/trampoline.S (revision d22fe808f9a3456f16015e79f1b86a10ce13099f)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2019  Arm Limited
4 * Original author: Dave Martin <Dave.Martin@arm.com>
5 */
6
7#include "assembler.h"
8
9startfn call_using_br_x0
10	bti	c
11	br	x0
12endfn
13
14startfn call_using_br_x16
15	bti	c
16	mov	x16, x0
17	br	x16
18endfn
19
20startfn call_using_blr
21	paciasp
22	stp	x29, x30, [sp, #-16]!
23	blr	x0
24	ldp	x29, x30, [sp], #16
25	autiasp
26	ret
27endfn
28
29emit_aarch64_feature_1_and
30