pub enum Slot {
Integer {
offset: u64,
size: u32,
},
Float {
offset: u64,
format: Format,
},
}Expand description
One register’s worth of an aggregate that travels in registers, and which of the object’s bytes go in it.
A slot says what the object’s bytes are read as rather than what the program wrote into them.
An eightbyte holding two floats is a Slot::Float of Format::Double, because eight
bytes of floating point data arrive in one vector register whichever way the program divided
them up and the bits are the same either way.
The offset is carried rather than derived because it cannot be worked out from the run of
slots. Two eightbytes are at zero and eight, four floats of a homogeneous aggregate are
four bytes apart, and struct { double value; int tag; } on RISC-V travels in one floating
point and one integer register whose bytes are at zero and eight, where the second is not
where the first one ended.
Variants§
Integer
An integer this many bytes wide, which is one general purpose register.
The last slot of an aggregate is only as wide as what is left of it, so a twelve byte structure is eight bytes and then four and nothing reads a byte past the object.
Float
A floating point value in this format, which is one vector register.