]> git.lizzy.rs Git - rust.git/blob - tests/assembly/nvptx-internalizing.rs
Rollup merge of #107777 - compiler-errors:derive_const-actually-derive-const, r=fee1...
[rust.git] / tests / assembly / nvptx-internalizing.rs
1 // assembly-output: ptx-linker
2 // compile-flags: --crate-type cdylib
3 // only-nvptx64
4 // ignore-nvptx64
5
6 #![feature(abi_ptx)]
7 #![no_std]
8
9 // aux-build: breakpoint-panic-handler.rs
10 extern crate breakpoint_panic_handler;
11
12 // aux-build: non-inline-dependency.rs
13 extern crate non_inline_dependency as dep;
14
15 // Verify that no extra function declarations are present.
16 // CHECK-NOT: .func
17
18 // CHECK: .visible .entry top_kernel(
19 #[no_mangle]
20 pub unsafe extern "ptx-kernel" fn top_kernel(a: *const u32, b: *mut u32) {
21     // CHECK: add.s32 %{{r[0-9]+}}, %{{r[0-9]+}}, 5;
22     *b = *a + 5;
23 }
24
25 // Verify that no extra function definitions are here.
26 // CHECK-NOT: .func
27 // CHECK-NOT: .entry