pub struct Call { /* private fields */ }Expand description
The registers one call has left.
Made by AbiDescription::call, asked about the return value first and then about each
argument in order.
Implementations§
Source§impl Call
impl Call
Sourcepub const fn abi(&self) -> &'static AbiDescription
pub const fn abi(&self) -> &'static AbiDescription
The ABI this call follows.
Sourcepub const fn integer_left(&self) -> u32
pub const fn integer_left(&self) -> u32
General purpose argument registers left, which is what a test asserts about draining.
Sourcepub const fn float_left(&self) -> u32
pub const fn float_left(&self) -> u32
Floating point argument registers left.
Sourcepub fn returns(&mut self, arg: &Arg<'_>) -> Pass
pub fn returns(&mut self, arg: &Arg<'_>) -> Pass
How the return value comes back, which is asked before anything else.
Sourcepub fn argument(&mut self, arg: &Arg<'_>) -> Pass
pub fn argument(&mut self, arg: &Arg<'_>) -> Pass
How the next fixed argument travels, which spends whatever registers it takes.
Sourcepub fn variadic_argument(&mut self, arg: &Arg<'_>) -> Pass
pub fn variadic_argument(&mut self, arg: &Arg<'_>) -> Pass
How the next argument past the ... travels.
Only one of the three policies changes the answer this crate gives. Under
Variadic::AlwaysMemory the argument is classified as though no argument registers were
left, which is Darwin arm64’s rule stated in the one form that needs no new mechanism.
Variadic::BothBanks is a fact about which registers the backend has to write, not
about the form the value travels in, so the answer here is the same as for a fixed
argument and the description carries the flag for the backend to read.
Sourcepub fn in_memory(&self, shape: &Shape<'_>) -> u64
pub fn in_memory(&self, shape: &Shape<'_>) -> u64
What a fixed argument that travels as Pass::Memory is aligned to in the argument area.
Its own alignment on every ABI but the one that packs the area, and the backend rounds that
to a word. Darwin arm64 packs, and there the answer depends on what the aggregate is. A
homogeneous floating point aggregate keeps the alignment of its members, so three floats
are twelve bytes on a four byte boundary. Anything else is on a word boundary, which is what
clang makes of it by passing it as an array of i64, and the backend takes the size rounded
up to the alignment, so a record of three chars is one word. An argument past the ...
is not packed, so this is not asked about one.