pub struct Arrived {
pub regs: Vec<Reg>,
pub stack: Vec<(Inst, u32)>,
pub took: (usize, usize),
pub used: u32,
pub spare: Vec<(Reg, RegClass, u32)>,
}Expand description
What a function’s parameters came to.
Fields§
§regs: Vec<Reg>The register each parameter is in, in the order the parameters were given, so the caller can bind each IR parameter to the one at its position.
stack: Vec<(Inst, u32)>The loads that read a parameter out of the caller’s argument area, and how far up that area each of them reads.
Empty for almost every function, because almost every function has few enough parameters to
have been handed all of them in registers. The distance is from the bottom of the caller’s
argument area, which is somewhere crate::finish works out and this cannot.
took: (usize, usize)How many general purpose argument registers the parameters took, and how many vector ones.
Nothing about an ordinary function needs this. A variadic one does: the first argument its
signature does not name is the one after the last it does, so where each of the two walks
stopped is where va_start has to say the next argument begins.
used: u32How many bytes of the caller’s argument area the parameters took, which is where the first argument the signature does not name begins for the same reason.
spare: Vec<(Reg, RegClass, u32)>The argument registers left over for the arguments the signature does not name, as the register each was bound into and how far up the save area its slot is.
Empty unless a save area was asked for. The ones a named parameter took are not here,
because their slots are behind where va_start sets the two offsets and nothing ever reads
them, so writing them would be fourteen stores where six are wanted.