about summary refs log tree commit diff
path: root/tests/assembly-llvm/aarch64-xray.rs
blob: d5ee0111843949d5b736507ed5475c14a575d300 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//@ assembly-output: emit-asm
//@ compile-flags: -Zinstrument-xray=always

//@ revisions: aarch64-linux
//@[aarch64-linux] compile-flags: --target=aarch64-unknown-linux-gnu
//@[aarch64-linux] needs-llvm-components: aarch64
//@[aarch64-linux] only-aarch64-unknown-linux-gnu

//@ revisions: aarch64-darwin
//@[aarch64-darwin] compile-flags: --target=aarch64-apple-darwin
//@[aarch64-darwin] needs-llvm-components: aarch64
//@[aarch64-darwin] only-aarch64-apple-darwin

#![crate_type = "lib"]

// CHECK-LABEL: xray_func:
#[no_mangle]
pub fn xray_func() {
    // CHECK: nop

    std::hint::black_box(());

    // CHECK: b #32
    // CHECK-NEXT: nop
}