NVPTX:_Especially add the DoubleI32 struct as a nvptx abi test case since it was used as an example when discussing possible problems
This commit is contained in:
parent
14348d9519
commit
a49fe0a58c
@ -40,6 +40,11 @@ pub struct TripleU16 {
|
|||||||
h: u16,
|
h: u16,
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
pub struct DoubleI32 {
|
||||||
|
f: i32,
|
||||||
|
g: i32,
|
||||||
|
}
|
||||||
|
#[repr(C)]
|
||||||
pub struct TripleU32 {
|
pub struct TripleU32 {
|
||||||
f: u32,
|
f: u32,
|
||||||
g: u32,
|
g: u32,
|
||||||
@ -175,6 +180,11 @@ pub struct ManyNumerics {
|
|||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn f_triple_u32_arg(_a: TripleU32) {}
|
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: .visible .func f_triple_u64_arg(
|
||||||
// CHECK: .param .align 8 .b8 f_triple_u64_arg_param_0[24]
|
// CHECK: .param .align 8 .b8 f_triple_u64_arg_param_0[24]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
@ -40,6 +40,11 @@ pub struct TripleU16 {
|
|||||||
h: u16,
|
h: u16,
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
pub struct DoubleI32 {
|
||||||
|
f: i32,
|
||||||
|
g: i32,
|
||||||
|
}
|
||||||
|
#[repr(C)]
|
||||||
pub struct TripleU32 {
|
pub struct TripleU32 {
|
||||||
f: u32,
|
f: u32,
|
||||||
g: u32,
|
g: u32,
|
||||||
@ -186,6 +191,12 @@ pub struct ManyNumerics {
|
|||||||
TripleU16 { f: 18, g: 19, h: 20 }
|
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(
|
// CHECK: .visible .func (.param .align 4 .b8 func_retval0[12]) f_triple_u32_ret(
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn f_triple_u32_ret() -> TripleU32 {
|
pub unsafe extern "C" fn f_triple_u32_ret() -> TripleU32 {
|
||||||
|
@ -50,6 +50,11 @@ pub struct TripleU16 {
|
|||||||
h: u16,
|
h: u16,
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
pub struct DoubleI32 {
|
||||||
|
f: i32,
|
||||||
|
g: i32,
|
||||||
|
}
|
||||||
|
#[repr(C)]
|
||||||
pub struct TripleU32 {
|
pub struct TripleU32 {
|
||||||
f: u32,
|
f: u32,
|
||||||
g: u32,
|
g: u32,
|
||||||
@ -180,6 +185,11 @@ pub struct ManyNumerics {
|
|||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "ptx-kernel" fn f_triple_u16_arg(_a: TripleU16) {}
|
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: .visible .entry f_triple_u32_arg(
|
||||||
// CHECK: .param .align 4 .b8 f_triple_u32_arg_param_0[12]
|
// CHECK: .param .align 4 .b8 f_triple_u32_arg_param_0[12]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
Loading…
Reference in New Issue
Block a user