pub struct Shape<'a> {
pub size: u64,
pub align: u64,
pub pieces: &'a [Piece],
pub complex: bool,
}Expand description
An aggregate, as much of it as an ABI cares about.
The pieces are every scalar in it with arrays and nested records flattened out, in offset order. Padding is not a piece: a hole is described by the offsets on either side of it, which is the form every classification rule is written in.
Fields§
§size: u64The size of the whole thing in bytes, padding included.
align: u64What it is aligned to, in bytes.
pieces: &'a [Piece]The scalars in it.
complex: boolWhether it is a _Complex rather than a struct or a union of the same shape.
Exactly one rule reads this, and it is on SysV AMD64, where _Complex long double comes
back on the x87 stack and struct { long double a, b; }, which is the same thirty two
bytes with the same two members in the same places, comes back in memory. Without the
flag there is no way to tell those apart from the shape, and they are passed differently.