Skip to main content

Insts

Struct Insts 

Source
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 str

The call of a name. See CALL.

§call_reg: &'static str

The call of an address in a register. See CALL_REG.

§lea: &'static str

The instruction that puts an address in a register without reading what is at it.

§small: &'static str

The instruction that writes a small constant into a general purpose register, which is what a byte count and a SysV vector count are.

Trait Implementations§

Source§

impl Debug for Insts

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Insts

§

impl RefUnwindSafe for Insts

§

impl Send for Insts

§

impl Sync for Insts

§

impl Unpin for Insts

§

impl UnsafeUnpin for Insts

§

impl UnwindSafe for Insts

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.