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