pub struct Area {
pub floats_at: u32,
pub size: u32,
/* private fields */
}Expand description
How big a callee’s register save area is and where its two halves are.
Worked out from the convention rather than written down, so that a convention with a different number of argument registers gets an area the right size for it without anything here changing.
Fields§
§floats_at: u32How many bytes of it the general purpose registers take, which is also where the vector half begins, since the general purpose half is first and starts at nothing.
size: u32How many bytes the whole of it is.
Implementations§
Source§impl Area
impl Area
Sourcepub fn of(conv: &CallRegs) -> Self
pub fn of(conv: &CallRegs) -> Self
The save area a variadic callee under that convention needs.
Sourcepub fn starts_at(self, float: bool) -> u32
pub fn starts_at(self, float: bool) -> u32
Where a file’s first slot is, which is what va_start writes into that file’s field when
the signature named no argument that file carried.
Sourcepub fn last(self, float: bool) -> Option<u32>
pub fn last(self, float: bool) -> Option<u32>
The offset of a file’s last slot, which is the threshold va_arg compares against.
The last slot’s own offset and not the end of the area, because an offset equal to the end is one slot past the last argument while an offset a slot below the end is the last argument itself. An empty file has no such offset and nothing here has one.