diff --git a/tests/assembly/nvptx-c-abi-arg-v7.rs b/tests/assembly/nvptx-c-abi-arg-v7.rs index 99f90ea526e1b..27b64b58f04cc 100644 --- a/tests/assembly/nvptx-c-abi-arg-v7.rs +++ b/tests/assembly/nvptx-c-abi-arg-v7.rs @@ -40,6 +40,11 @@ pub struct TripleU16 { h: u16, } #[repr(C)] +pub struct DoubleI32 { + f: i32, + g: i32, +} +#[repr(C)] pub struct TripleU32 { f: u32, g: u32, @@ -175,6 +180,11 @@ pub unsafe extern "C" fn f_triple_u16_arg(_a: TripleU16) {} #[no_mangle] pub unsafe extern "C" fn f_triple_u32_arg(_a: TripleU32) {} +// CHECK: .visible .func f_double_i32_arg( +// CHECK: .param .align 4 .b8 f_double_i32_arg_param_0[8] +#[no_mangle] +pub unsafe extern "C" fn f_double_i32_arg(_a: DoubleI32) {} + // CHECK: .visible .func f_triple_u64_arg( // CHECK: .param .align 8 .b8 f_triple_u64_arg_param_0[24] #[no_mangle] diff --git a/tests/assembly/nvptx-c-abi-ret-v7.rs b/tests/assembly/nvptx-c-abi-ret-v7.rs index 8992cb8d540f6..56ab182fcce22 100644 --- a/tests/assembly/nvptx-c-abi-ret-v7.rs +++ b/tests/assembly/nvptx-c-abi-ret-v7.rs @@ -40,6 +40,11 @@ pub struct TripleU16 { h: u16, } #[repr(C)] +pub struct DoubleI32 { + f: i32, + g: i32, +} +#[repr(C)] pub struct TripleU32 { f: u32, g: u32, @@ -186,6 +191,12 @@ pub unsafe extern "C" fn f_triple_u16_ret() -> TripleU16 { TripleU16 { f: 18, g: 19, h: 20 } } +// CHECK: .visible .func (.param .align 4 .b8 func_retval0[8]) f_double_i32_ret( +#[no_mangle] +pub unsafe extern "C" fn f_double_i32_ret() -> DoubleI32 { + DoubleI32 { f: 1, g: 2 } +} + // CHECK: .visible .func (.param .align 4 .b8 func_retval0[12]) f_triple_u32_ret( #[no_mangle] pub unsafe extern "C" fn f_triple_u32_ret() -> TripleU32 { diff --git a/tests/assembly/nvptx-kernel-abi/nvptx-kernel-args-abi-v7.rs b/tests/assembly/nvptx-kernel-abi/nvptx-kernel-args-abi-v7.rs index ce1d732f36771..fb3a325a41f81 100644 --- a/tests/assembly/nvptx-kernel-abi/nvptx-kernel-args-abi-v7.rs +++ b/tests/assembly/nvptx-kernel-abi/nvptx-kernel-args-abi-v7.rs @@ -50,6 +50,11 @@ pub struct TripleU16 { h: u16, } #[repr(C)] +pub struct DoubleI32 { + f: i32, + g: i32, +} +#[repr(C)] pub struct TripleU32 { f: u32, g: u32, @@ -180,6 +185,11 @@ pub unsafe extern "ptx-kernel" fn f_triple_u8_arg(_a: TripleU8) {} #[no_mangle] pub unsafe extern "ptx-kernel" fn f_triple_u16_arg(_a: TripleU16) {} +// CHECK: .visible .entry f_double_i32_arg( +// CHECK: .param .align 4 .b8 f_double_i32_arg_param_0[8] +#[no_mangle] +pub unsafe extern "ptx-kernel" fn f_double_i32_arg(_a: DoubleI32) {} + // CHECK: .visible .entry f_triple_u32_arg( // CHECK: .param .align 4 .b8 f_triple_u32_arg_param_0[12] #[no_mangle]