]>
git.proxmox.com Git - rustc.git/blob - compiler/rustc_target/src/abi/call/nvptx64.rs
1 // Reference: PTX Writer's Guide to Interoperability
2 // https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability
4 use crate::abi
::call
::{ArgAbi, FnAbi}
;
6 fn classify_ret
<Ty
>(ret
: &mut ArgAbi
<'_
, Ty
>) {
7 if ret
.layout
.is_aggregate() && ret
.layout
.size
.bits() > 64 {
10 ret
.extend_integer_width_to(64);
14 fn classify_arg
<Ty
>(arg
: &mut ArgAbi
<'_
, Ty
>) {
15 if arg
.layout
.is_aggregate() && arg
.layout
.size
.bits() > 64 {
18 arg
.extend_integer_width_to(64);
22 pub fn compute_abi_info
<Ty
>(fn_abi
: &mut FnAbi
<'_
, Ty
>) {
23 if !fn_abi
.ret
.is_ignore() {
24 classify_ret(&mut fn_abi
.ret
);
27 for arg
in &mut fn_abi
.args
{