cranelift_codegen::ir::instructions

Enum InstructionFormat

Source
pub enum InstructionFormat {
Show 37 variants AtomicCas, AtomicRmw, Binary, BinaryImm64, BinaryImm8, BranchTable, Brif, Call, CallIndirect, CondTrap, DynamicStackLoad, DynamicStackStore, FloatCompare, FuncAddr, IntAddTrap, IntCompare, IntCompareImm, Jump, Load, LoadNoOffset, MultiAry, NullAry, Shuffle, StackLoad, StackStore, Store, StoreNoOffset, Ternary, TernaryImm8, Trap, Unary, UnaryConst, UnaryGlobalValue, UnaryIeee16, UnaryIeee32, UnaryIeee64, UnaryImm,
}
Expand description

An instruction format

Every opcode has a corresponding instruction format which is represented by both the InstructionFormat and the InstructionData enums.

Variants§

§

AtomicCas

AtomicCas(imms=(flags: ir::MemFlags), vals=3, blocks=0)

§

AtomicRmw

AtomicRmw(imms=(flags: ir::MemFlags, op: ir::AtomicRmwOp), vals=2, blocks=0)

§

Binary

Binary(imms=(), vals=2, blocks=0)

§

BinaryImm64

BinaryImm64(imms=(imm: ir::immediates::Imm64), vals=1, blocks=0)

§

BinaryImm8

BinaryImm8(imms=(imm: ir::immediates::Uimm8), vals=1, blocks=0)

§

BranchTable

BranchTable(imms=(table: ir::JumpTable), vals=1, blocks=0)

§

Brif

Brif(imms=(), vals=1, blocks=2)

§

Call

Call(imms=(func_ref: ir::FuncRef), vals=0, blocks=0)

§

CallIndirect

CallIndirect(imms=(sig_ref: ir::SigRef), vals=1, blocks=0)

§

CondTrap

CondTrap(imms=(code: ir::TrapCode), vals=1, blocks=0)

§

DynamicStackLoad

DynamicStackLoad(imms=(dynamic_stack_slot: ir::DynamicStackSlot), vals=0, blocks=0)

§

DynamicStackStore

DynamicStackStore(imms=(dynamic_stack_slot: ir::DynamicStackSlot), vals=1, blocks=0)

§

FloatCompare

FloatCompare(imms=(cond: ir::condcodes::FloatCC), vals=2, blocks=0)

§

FuncAddr

FuncAddr(imms=(func_ref: ir::FuncRef), vals=0, blocks=0)

§

IntAddTrap

IntAddTrap(imms=(code: ir::TrapCode), vals=2, blocks=0)

§

IntCompare

IntCompare(imms=(cond: ir::condcodes::IntCC), vals=2, blocks=0)

§

IntCompareImm

IntCompareImm(imms=(cond: ir::condcodes::IntCC, imm: ir::immediates::Imm64), vals=1, blocks=0)

§

Jump

Jump(imms=(), vals=0, blocks=1)

§

Load

Load(imms=(flags: ir::MemFlags, offset: ir::immediates::Offset32), vals=1, blocks=0)

§

LoadNoOffset

LoadNoOffset(imms=(flags: ir::MemFlags), vals=1, blocks=0)

§

MultiAry

MultiAry(imms=(), vals=0, blocks=0)

§

NullAry

NullAry(imms=(), vals=0, blocks=0)

§

Shuffle

Shuffle(imms=(imm: ir::Immediate), vals=2, blocks=0)

§

StackLoad

StackLoad(imms=(stack_slot: ir::StackSlot, offset: ir::immediates::Offset32), vals=0, blocks=0)

§

StackStore

StackStore(imms=(stack_slot: ir::StackSlot, offset: ir::immediates::Offset32), vals=1, blocks=0)

§

Store

Store(imms=(flags: ir::MemFlags, offset: ir::immediates::Offset32), vals=2, blocks=0)

§

StoreNoOffset

StoreNoOffset(imms=(flags: ir::MemFlags), vals=2, blocks=0)

§

Ternary

Ternary(imms=(), vals=3, blocks=0)

§

TernaryImm8

TernaryImm8(imms=(imm: ir::immediates::Uimm8), vals=2, blocks=0)

§

Trap

Trap(imms=(code: ir::TrapCode), vals=0, blocks=0)

§

Unary

Unary(imms=(), vals=1, blocks=0)

§

UnaryConst

UnaryConst(imms=(constant_handle: ir::Constant), vals=0, blocks=0)

§

UnaryGlobalValue

UnaryGlobalValue(imms=(global_value: ir::GlobalValue), vals=0, blocks=0)

§

UnaryIeee16

UnaryIeee16(imms=(imm: ir::immediates::Ieee16), vals=0, blocks=0)

§

UnaryIeee32

UnaryIeee32(imms=(imm: ir::immediates::Ieee32), vals=0, blocks=0)

§

UnaryIeee64

UnaryIeee64(imms=(imm: ir::immediates::Ieee64), vals=0, blocks=0)

§

UnaryImm

UnaryImm(imms=(imm: ir::immediates::Imm64), vals=0, blocks=0)

Trait Implementations§

Source§

impl Clone for InstructionFormat

Source§

fn clone(&self) -> InstructionFormat

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InstructionFormat

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a InstructionData> for InstructionFormat

Source§

fn from(inst: &'a InstructionData) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for InstructionFormat

Source§

fn eq(&self, other: &InstructionFormat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for InstructionFormat

Source§

impl Eq for InstructionFormat

Source§

impl StructuralPartialEq for InstructionFormat

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.