Skip to main content

lists

Function lists 

Source
pub fn lists(func: &mut Func, conv: &CallRegs)
Expand description

Rewrites every va_arg, va_copy and va_end in the function, and leaves va_start alone.

Those three are the ones made only of reads and writes of a list some pointer already reaches, so none of them needs to know anything about the frame and all three can be done here. va_start is the one that does need the frame, and crate::lower has it.

A convention whose list is a plain pointer gets the walk the module doc’s last section describes instead, which is the same three rewrites over a list of one field, and AAPCS64 gets the walk aapcs describes. Apple’s AArch64 has the plain pointer, and its scalars take the same walk, but an object there is as many words as it needs rather than one, which is the memory half of the AAPCS64 walk and is aapcs::stacked.