[][src]Enum cranelift_codegen::ir::instructions::InstructionFormat

pub enum InstructionFormat {
    Unary,
    UnaryImm,
    UnaryImm128,
    UnaryIeee32,
    UnaryIeee64,
    UnaryBool,
    UnaryGlobalValue,
    Binary,
    BinaryImm,
    Ternary,
    MultiAry,
    NullAry,
    InsertLane,
    ExtractLane,
    IntCompare,
    IntCompareImm,
    IntCond,
    FloatCompare,
    FloatCond,
    IntSelect,
    Jump,
    Branch,
    BranchInt,
    BranchFloat,
    BranchIcmp,
    BranchTable,
    BranchTableEntry,
    BranchTableBase,
    IndirectJump,
    Call,
    CallIndirect,
    FuncAddr,
    Load,
    LoadComplex,
    Store,
    StoreComplex,
    StackLoad,
    StackStore,
    HeapAddr,
    TableAddr,
    RegMove,
    CopySpecial,
    CopyToSsa,
    RegSpill,
    RegFill,
    Trap,
    CondTrap,
    IntCondTrap,
    FloatCondTrap,
}

An instruction format

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

Variants

Unary

Unary(imms=(), vals=1)

UnaryImm

UnaryImm(imms=(imm: imm64), vals=0)

UnaryImm128

UnaryImm128(imms=(imm: uimm128), vals=0)

UnaryIeee32

UnaryIeee32(imms=(imm: ieee32), vals=0)

UnaryIeee64

UnaryIeee64(imms=(imm: ieee64), vals=0)

UnaryBool

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

UnaryGlobalValue

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

Binary

Binary(imms=(), vals=2)

BinaryImm

BinaryImm(imms=(imm: imm64), vals=1)

Ternary

Ternary(imms=(), vals=3)

MultiAry

MultiAry(imms=(), vals=0)

NullAry

NullAry(imms=(), vals=0)

InsertLane

InsertLane(imms=(lane: uimm8), vals=2)

ExtractLane

ExtractLane(imms=(lane: uimm8), vals=1)

IntCompare

IntCompare(imms=(cond: intcc), vals=2)

IntCompareImm

IntCompareImm(imms=(cond: intcc, imm: imm64), vals=1)

IntCond

IntCond(imms=(cond: intcc), vals=1)

FloatCompare

FloatCompare(imms=(cond: floatcc), vals=2)

FloatCond

FloatCond(imms=(cond: floatcc), vals=1)

IntSelect

IntSelect(imms=(cond: intcc), vals=3)

Jump

Jump(imms=(destination: ebb), vals=0)

Branch

Branch(imms=(destination: ebb), vals=1)

BranchInt

BranchInt(imms=(cond: intcc, destination: ebb), vals=1)

BranchFloat

BranchFloat(imms=(cond: floatcc, destination: ebb), vals=1)

BranchIcmp

BranchIcmp(imms=(cond: intcc, destination: ebb), vals=2)

BranchTable

BranchTable(imms=(destination: ebb, table: jump_table), vals=1)

BranchTableEntry

BranchTableEntry(imms=(imm: uimm8, table: jump_table), vals=2)

BranchTableBase

BranchTableBase(imms=(table: jump_table), vals=0)

IndirectJump

IndirectJump(imms=(table: jump_table), vals=1)

Call

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

CallIndirect

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

FuncAddr

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

Load

Load(imms=(flags: memflags, offset: offset32), vals=1)

LoadComplex

LoadComplex(imms=(flags: memflags, offset: offset32), vals=0)

Store

Store(imms=(flags: memflags, offset: offset32), vals=2)

StoreComplex

StoreComplex(imms=(flags: memflags, offset: offset32), vals=1)

StackLoad

StackLoad(imms=(stack_slot: stack_slot, offset: offset32), vals=0)

StackStore

StackStore(imms=(stack_slot: stack_slot, offset: offset32), vals=1)

HeapAddr

HeapAddr(imms=(heap: heap, imm: uimm32), vals=1)

TableAddr

TableAddr(imms=(table: table, offset: offset32), vals=1)

RegMove

RegMove(imms=(src: regunit, dst: regunit), vals=1)

CopySpecial

CopySpecial(imms=(src: regunit, dst: regunit), vals=0)

CopyToSsa

CopyToSsa(imms=(src: regunit), vals=0)

RegSpill

RegSpill(imms=(src: regunit, dst: stack_slot), vals=1)

RegFill

RegFill(imms=(src: stack_slot, dst: regunit), vals=1)

Trap

Trap(imms=(code: trapcode), vals=0)

CondTrap

CondTrap(imms=(code: trapcode), vals=1)

IntCondTrap

IntCondTrap(imms=(cond: intcc, code: trapcode), vals=1)

FloatCondTrap

FloatCondTrap(imms=(cond: floatcc, code: trapcode), vals=1)

Trait Implementations

impl Debug for InstructionFormat[src]

impl PartialEq<InstructionFormat> for InstructionFormat[src]

impl Eq for InstructionFormat[src]

impl Copy for InstructionFormat[src]

impl<'a> From<&'a InstructionData> for InstructionFormat[src]

impl Clone for InstructionFormat[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.