File tree 4 files changed +41
-10
lines changed
4 files changed +41
-10
lines changed Original file line number Diff line number Diff line change
1
+ //@ assembly-output: emit-asm
2
+ //@ compile-flags: --crate-type lib -Zinstrument-xray=always -C llvm-args=-x86-asm-syntax=intel
3
+ //@ only-x86_64
4
+ //@ ignore-sgx
5
+
6
+ // CHECK-LABEL: xray_func:
7
+ #[ no_mangle]
8
+ pub fn xray_func ( ) {
9
+ // CHECK: nop word ptr [rax + rax + 512]
10
+
11
+ std:: hint:: black_box ( ( ) ) ;
12
+
13
+ // CHECK: ret
14
+ // CHECK-NEXT: nop word ptr cs:[rax + rax + 512]
15
+ }
Original file line number Diff line number Diff line change
1
+ //@ only-nightly (flag is still unstable)
2
+ //@ needs-xray
3
+
4
+ //@ revisions: unsupported
5
+ //@[unsupported] compile-flags: -Z instrument-xray --target=x86_64-pc-windows-msvc
6
+
7
+ //@ revisions: x86_64-linux
8
+ //@[x86_64-linux] needs-llvm-components: x86
9
+ //@[x86_64-linux] compile-flags: -Z instrument-xray --target=x86_64-unknown-linux-gnu
10
+ //@[x86_64-linux] check-pass
11
+
12
+ //@ revisions: x86_64-darwin
13
+ //@[x86_64-darwin] needs-llvm-components: x86
14
+ //@[x86_64-darwin] compile-flags: -Z instrument-xray --target=x86_64-apple-darwin
15
+ //@[x86_64-darwin] check-pass
16
+
17
+ //@ revisions: aarch64-darwin
18
+ //@[aarch64-darwin] needs-llvm-components: aarch64
19
+ //@[aarch64-darwin] compile-flags: -Z instrument-xray --target=aarch64-apple-darwin
20
+ //@[aarch64-darwin] check-pass
21
+
22
+ #![ feature( no_core) ]
23
+ #![ no_core]
24
+ #![ no_main]
25
+
26
+ //[unsupported]~? ERROR XRay instrumentation is not supported for this target
File renamed without changes.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments