pub struct Insts {
pub arg: fn(Type) -> Option<&'static str>,
pub load: fn(Type) -> Option<&'static str>,
pub store: fn(Type) -> Option<&'static str>,
pub ret: fn(Type, usize) -> Option<&'static str>,
pub call: &'static str,
pub call_reg: &'static str,
pub lea: &'static str,
pub small: &'static str,
}Expand description
The instructions this file writes, for one machine.
Every one of them is written here by hand rather than by a rule, for the reasons the module comment gives, so this file is where a machine’s names for them have to come from. Each answer is the whole name, prefix and all, because each is interned as it is.
The four functions answer for the same set of types, and a type one of them has no name for is a type none of them should have: an argument that can arrive in a register but not be read off the stack is a function turned away for where its sixth argument happened to land.
Fields§
§arg: fn(Type) -> Option<&'static str>The pseudo a parameter of that type arrives in a register as. See head_of.
load: fn(Type) -> Option<&'static str>The load that reads one of that type out of the argument area. See load_of.
store: fn(Type) -> Option<&'static str>The store that writes one of that type into the argument area. See store_of.
ret: fn(Type, usize) -> Option<&'static str>The pseudo a value of that type leaves in the register at that place. See ret_of.
call: &'static strThe call of a name. See CALL.
call_reg: &'static strThe call of an address in a register. See CALL_REG.
lea: &'static strThe instruction that puts an address in a register without reading what is at it.
small: &'static strThe instruction that writes a small constant into a general purpose register, which is what a byte count and a SysV vector count are.