Returns values up to 2*usize by value
This commit is contained in:
parent
8fe73e80d7
commit
b01694e0a2
2 changed files with 3 additions and 14 deletions
|
@ -610,15 +610,3 @@ impl<'a, Ty> FnAbi<'a, Ty> {
|
|||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the maximum size of return values to be passed by value in the Rust ABI.
|
||||
///
|
||||
/// Return values beyond this size will use an implicit out-pointer instead.
|
||||
pub fn max_ret_by_val<C: HasTargetSpec + HasDataLayout>(spec: &C) -> Size {
|
||||
match spec.target_spec().arch.as_str() {
|
||||
// System-V will pass return values up to 128 bits in RAX/RDX.
|
||||
"x86_64" => Size::from_bits(128),
|
||||
|
||||
_ => spec.data_layout().pointer_size,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue