Skip to main content

on_the_stack

Function on_the_stack 

Source
pub fn on_the_stack(ty: Type) -> bool
Expand description

Whether a value of that type travels as bytes in the argument area because of what it is.

One type does, and it is the long double. SysV classifies it X87 and X87UP, which is the classification that means memory, so it goes where a structure the classification put in memory goes and what the two ends pass is the address of the bytes. That is not a decision about registers running out: a long double travels in the argument area when it is the only argument there is.

Sixteen bytes aligned to sixteen, which is what the psABI says the type takes and is the same number crate::lower gives one in the frame, so a value being passed and a value being worked on are the same shape of object in two places.