Restore previous ABI for f_single_u8_arg
This commit is contained in:
parent
062bc02dc7
commit
1c1c13a184
2 changed files with 11 additions and 2 deletions
|
@ -75,7 +75,16 @@ where
|
||||||
16 => Reg::i128(),
|
16 => Reg::i128(),
|
||||||
_ => unreachable!("Align is given as power of 2 no larger than 16 bytes"),
|
_ => unreachable!("Align is given as power of 2 no larger than 16 bytes"),
|
||||||
};
|
};
|
||||||
arg.cast_to(Uniform::new(unit, arg.layout.size));
|
if arg.layout.size.bytes() / align_bytes == 1 {
|
||||||
|
// Make sure we pass the struct as array at the LLVM IR level and not as a single integer.
|
||||||
|
arg.cast_to(CastTarget {
|
||||||
|
prefix: [Some(unit), None, None, None, None, None, None, None],
|
||||||
|
rest: Uniform::new(unit, Size::ZERO),
|
||||||
|
attrs: ArgAttributes::new(),
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
arg.cast_to(Uniform::new(unit, arg.layout.size));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
pub(crate) fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||||
|
|
|
@ -166,7 +166,7 @@ pub unsafe extern "ptx-kernel" fn f_f32_arg(_a: f32) {}
|
||||||
pub unsafe extern "ptx-kernel" fn f_f64_arg(_a: f64) {}
|
pub unsafe extern "ptx-kernel" fn f_f64_arg(_a: f64) {}
|
||||||
|
|
||||||
// CHECK: .visible .entry f_single_u8_arg(
|
// CHECK: .visible .entry f_single_u8_arg(
|
||||||
// CHECK: .param .u8 f_single_u8_arg_param_0
|
// CHECK: .param .align 1 .b8 f_single_u8_arg_param_0[1]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "ptx-kernel" fn f_single_u8_arg(_a: SingleU8) {}
|
pub unsafe extern "ptx-kernel" fn f_single_u8_arg(_a: SingleU8) {}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue