pub enum InstructionFormat {
Show 46 variants AtomicCas, AtomicRmw, Binary, BinaryImm64, BinaryImm8, Branch, BranchFloat, BranchIcmp, BranchInt, BranchTable, Call, CallIndirect, CondTrap, DynamicStackLoad, DynamicStackStore, FloatCompare, FloatCond, FloatCondTrap, FuncAddr, HeapAddr, IntCompare, IntCompareImm, IntCond, IntCondTrap, IntSelect, Jump, Load, LoadNoOffset, MultiAry, NullAry, Shuffle, StackLoad, StackStore, Store, StoreNoOffset, TableAddr, Ternary, TernaryImm8, Trap, Unary, UnaryBool, UnaryConst, UnaryGlobalValue, 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)

§

AtomicRmw

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

§

Binary

Binary(imms=(), vals=2)

§

BinaryImm64

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

§

BinaryImm8

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

§

Branch

Branch(imms=(destination: ir::Block), vals=1)

§

BranchFloat

BranchFloat(imms=(cond: ir::condcodes::FloatCC, destination: ir::Block), vals=1)

§

BranchIcmp

BranchIcmp(imms=(cond: ir::condcodes::IntCC, destination: ir::Block), vals=2)

§

BranchInt

BranchInt(imms=(cond: ir::condcodes::IntCC, destination: ir::Block), vals=1)

§

BranchTable

BranchTable(imms=(destination: ir::Block, table: ir::JumpTable), vals=1)

§

Call

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

§

CallIndirect

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

§

CondTrap

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

§

DynamicStackLoad

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

§

DynamicStackStore

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

§

FloatCompare

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

§

FloatCond

FloatCond(imms=(cond: ir::condcodes::FloatCC), vals=1)

§

FloatCondTrap

FloatCondTrap(imms=(cond: ir::condcodes::FloatCC, code: ir::TrapCode), vals=1)

§

FuncAddr

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

§

HeapAddr

HeapAddr(imms=(heap: ir::Heap, imm: ir::immediates::Uimm32), vals=1)

§

IntCompare

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

§

IntCompareImm

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

§

IntCond

IntCond(imms=(cond: ir::condcodes::IntCC), vals=1)

§

IntCondTrap

IntCondTrap(imms=(cond: ir::condcodes::IntCC, code: ir::TrapCode), vals=1)

§

IntSelect

IntSelect(imms=(cond: ir::condcodes::IntCC), vals=3)

§

Jump

Jump(imms=(destination: ir::Block), vals=0)

§

Load

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

§

LoadNoOffset

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

§

MultiAry

MultiAry(imms=(), vals=0)

§

NullAry

NullAry(imms=(), vals=0)

§

Shuffle

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

§

StackLoad

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

§

StackStore

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

§

Store

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

§

StoreNoOffset

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

§

TableAddr

TableAddr(imms=(table: ir::Table, offset: ir::immediates::Offset32), vals=1)

§

Ternary

Ternary(imms=(), vals=3)

§

TernaryImm8

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

§

Trap

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

§

Unary

Unary(imms=(), vals=1)

§

UnaryBool

UnaryBool(imms=(imm: bool), vals=0)

§

UnaryConst

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

§

UnaryGlobalValue

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

§

UnaryIeee32

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

§

UnaryIeee64

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

§

UnaryImm

UnaryImm(imms=(imm: ir::immediates::Imm64), vals=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<InstructionFormat> for InstructionFormat

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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 StructuralEq for InstructionFormat

source§

impl StructuralPartialEq for InstructionFormat

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere 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<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.