]> git.lizzy.rs Git - rust.git/blob - src/test/assembly/aarch64-pointer-auth.rs
27e289086b9dd00c9c14256a1975243a2bd57b85
[rust.git] / src / test / assembly / aarch64-pointer-auth.rs
1 // Test that PAC instructions are emitted when branch-protection is specified.
2
3 // min-llvm-version: 10.0.1
4 // assembly-output: emit-asm
5 // compile-flags: --target aarch64-unknown-linux-gnu
6 // compile-flags: -Z branch-protection=pac-ret,leaf
7 // needs-llvm-components: aarch64
8
9 #![feature(no_core, lang_items)]
10 #![no_std]
11 #![no_core]
12 #![crate_type = "lib"]
13
14 #[lang = "sized"]
15 trait Sized {}
16
17 // CHECK: hint #25
18 // CHECK: hint #29
19 #[no_mangle]
20 pub fn test() -> u8 {
21     42
22 }