]> git.lizzy.rs Git - rust.git/blob - tests/assembly/asm/aarch64-el2vmsa.rs
Rollup merge of #106927 - Ezrashaw:e0606-make-machine-applicable, r=estebank
[rust.git] / tests / assembly / asm / aarch64-el2vmsa.rs
1 // assembly-output: emit-asm
2 // compile-flags: --target aarch64-unknown-linux-gnu
3 // needs-llvm-components: aarch64
4
5 #![feature(no_core, lang_items, rustc_attrs)]
6 #![crate_type = "rlib"]
7 #![no_core]
8
9 #[rustc_builtin_macro]
10 macro_rules! asm {
11     () => {};
12 }
13
14 #[lang = "sized"]
15 trait Sized {}
16
17 // CHECK-LABEL: ttbr0_el2:
18 #[no_mangle]
19 pub fn ttbr0_el2() {
20     // CHECK: //APP
21     // CHECK-NEXT: msr TTBR0_EL2, x0
22     // CHECK-NEXT: //NO_APP
23     unsafe {
24         asm!("msr ttbr0_el2, x0");
25     }
26 }
27
28 // CHECK-LABEL: vttbr_el2:
29 #[no_mangle]
30 pub fn vttbr_el2() {
31     // CHECK: //APP
32     // CHECK-NEXT: msr VTTBR_EL2, x0
33     // CHECK-NEXT: //NO_APP
34     unsafe {
35         asm!("msr vttbr_el2, x0");
36     }
37 }