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

pub enum InstructionData {
Show variants AtomicCas { opcode: Opcode, args: [Value; 3], flags: MemFlags, }, AtomicRmw { opcode: Opcode, args: [Value; 2], flags: MemFlags, op: AtomicRmwOp, }, Binary { opcode: Opcode, args: [Value; 2], }, BinaryImm64 { opcode: Opcode, arg: Value, imm: Imm64, }, BinaryImm8 { opcode: Opcode, arg: Value, imm: Uimm8, }, Branch { opcode: Opcode, args: ValueList, destination: Block, }, BranchFloat { opcode: Opcode, args: ValueList, cond: FloatCC, destination: Block, }, BranchIcmp { opcode: Opcode, args: ValueList, cond: IntCC, destination: Block, }, BranchInt { opcode: Opcode, args: ValueList, cond: IntCC, destination: Block, }, BranchTable { opcode: Opcode, arg: Value, destination: Block, table: JumpTable, }, BranchTableBase { opcode: Opcode, table: JumpTable, }, BranchTableEntry { opcode: Opcode, args: [Value; 2], imm: Uimm8, table: JumpTable, }, Call { opcode: Opcode, args: ValueList, func_ref: FuncRef, }, CallIndirect { opcode: Opcode, args: ValueList, sig_ref: SigRef, }, CondTrap { opcode: Opcode, arg: Value, code: TrapCode, }, CopySpecial { opcode: Opcode, src: RegUnit, dst: RegUnit, }, CopyToSsa { opcode: Opcode, src: RegUnit, }, FloatCompare { opcode: Opcode, args: [Value; 2], cond: FloatCC, }, FloatCond { opcode: Opcode, arg: Value, cond: FloatCC, }, FloatCondTrap { opcode: Opcode, arg: Value, cond: FloatCC, code: TrapCode, }, FuncAddr { opcode: Opcode, func_ref: FuncRef, }, HeapAddr { opcode: Opcode, arg: Value, heap: Heap, imm: Uimm32, }, IndirectJump { opcode: Opcode, arg: Value, table: JumpTable, }, IntCompare { opcode: Opcode, args: [Value; 2], cond: IntCC, }, IntCompareImm { opcode: Opcode, arg: Value, cond: IntCC, imm: Imm64, }, IntCond { opcode: Opcode, arg: Value, cond: IntCC, }, IntCondTrap { opcode: Opcode, arg: Value, cond: IntCC, code: TrapCode, }, IntSelect { opcode: Opcode, args: [Value; 3], cond: IntCC, }, Jump { opcode: Opcode, args: ValueList, destination: Block, }, Load { opcode: Opcode, arg: Value, flags: MemFlags, offset: Offset32, }, LoadComplex { opcode: Opcode, args: ValueList, flags: MemFlags, offset: Offset32, }, LoadNoOffset { opcode: Opcode, arg: Value, flags: MemFlags, }, MultiAry { opcode: Opcode, args: ValueList, }, NullAry { opcode: Opcode, }, RegFill { opcode: Opcode, arg: Value, src: StackSlot, dst: RegUnit, }, RegMove { opcode: Opcode, arg: Value, src: RegUnit, dst: RegUnit, }, RegSpill { opcode: Opcode, arg: Value, src: RegUnit, dst: StackSlot, }, Shuffle { opcode: Opcode, args: [Value; 2], mask: Immediate, }, StackLoad { opcode: Opcode, stack_slot: StackSlot, offset: Offset32, }, StackStore { opcode: Opcode, arg: Value, stack_slot: StackSlot, offset: Offset32, }, Store { opcode: Opcode, args: [Value; 2], flags: MemFlags, offset: Offset32, }, StoreComplex { opcode: Opcode, args: ValueList, flags: MemFlags, offset: Offset32, }, StoreNoOffset { opcode: Opcode, args: [Value; 2], flags: MemFlags, }, TableAddr { opcode: Opcode, arg: Value, table: Table, offset: Offset32, }, Ternary { opcode: Opcode, args: [Value; 3], }, TernaryImm8 { opcode: Opcode, args: [Value; 2], imm: Uimm8, }, Trap { opcode: Opcode, code: TrapCode, }, Unary { opcode: Opcode, arg: Value, }, UnaryBool { opcode: Opcode, imm: bool, }, UnaryConst { opcode: Opcode, constant_handle: Constant, }, UnaryGlobalValue { opcode: Opcode, global_value: GlobalValue, }, UnaryIeee32 { opcode: Opcode, imm: Ieee32, }, UnaryIeee64 { opcode: Opcode, imm: Ieee64, }, UnaryImm { opcode: Opcode, imm: Imm64, },
}

Variants

AtomicCas
Show fields

Fields of AtomicCas

opcode: Opcodeargs: [Value; 3]flags: MemFlags
AtomicRmw
Show fields

Fields of AtomicRmw

opcode: Opcodeargs: [Value; 2]flags: MemFlagsop: AtomicRmwOp
Binary
Show fields

Fields of Binary

opcode: Opcodeargs: [Value; 2]
BinaryImm64
Show fields

Fields of BinaryImm64

opcode: Opcodearg: Valueimm: Imm64
BinaryImm8
Show fields

Fields of BinaryImm8

opcode: Opcodearg: Valueimm: Uimm8
Branch
Show fields

Fields of Branch

opcode: Opcodeargs: ValueListdestination: Block
BranchFloat
Show fields

Fields of BranchFloat

opcode: Opcodeargs: ValueListcond: FloatCCdestination: Block
BranchIcmp
Show fields

Fields of BranchIcmp

opcode: Opcodeargs: ValueListcond: IntCCdestination: Block
BranchInt
Show fields

Fields of BranchInt

opcode: Opcodeargs: ValueListcond: IntCCdestination: Block
BranchTable
Show fields

Fields of BranchTable

opcode: Opcodearg: Valuedestination: Blocktable: JumpTable
BranchTableBase
Show fields

Fields of BranchTableBase

opcode: Opcodetable: JumpTable
BranchTableEntry
Show fields

Fields of BranchTableEntry

opcode: Opcodeargs: [Value; 2]imm: Uimm8table: JumpTable
Call
Show fields

Fields of Call

opcode: Opcodeargs: ValueListfunc_ref: FuncRef
CallIndirect
Show fields

Fields of CallIndirect

opcode: Opcodeargs: ValueListsig_ref: SigRef
CondTrap
Show fields

Fields of CondTrap

opcode: Opcodearg: Valuecode: TrapCode
CopySpecial
Show fields

Fields of CopySpecial

opcode: Opcodesrc: RegUnitdst: RegUnit
CopyToSsa
Show fields

Fields of CopyToSsa

opcode: Opcodesrc: RegUnit
FloatCompare
Show fields

Fields of FloatCompare

opcode: Opcodeargs: [Value; 2]cond: FloatCC
FloatCond
Show fields

Fields of FloatCond

opcode: Opcodearg: Valuecond: FloatCC
FloatCondTrap
Show fields

Fields of FloatCondTrap

opcode: Opcodearg: Valuecond: FloatCCcode: TrapCode
FuncAddr
Show fields

Fields of FuncAddr

opcode: Opcodefunc_ref: FuncRef
HeapAddr
Show fields

Fields of HeapAddr

opcode: Opcodearg: Valueheap: Heapimm: Uimm32
IndirectJump
Show fields

Fields of IndirectJump

opcode: Opcodearg: Valuetable: JumpTable
IntCompare
Show fields

Fields of IntCompare

opcode: Opcodeargs: [Value; 2]cond: IntCC
IntCompareImm
Show fields

Fields of IntCompareImm

opcode: Opcodearg: Valuecond: IntCCimm: Imm64
IntCond
Show fields

Fields of IntCond

opcode: Opcodearg: Valuecond: IntCC
IntCondTrap
Show fields

Fields of IntCondTrap

opcode: Opcodearg: Valuecond: IntCCcode: TrapCode
IntSelect
Show fields

Fields of IntSelect

opcode: Opcodeargs: [Value; 3]cond: IntCC
Jump
Show fields

Fields of Jump

opcode: Opcodeargs: ValueListdestination: Block
Load
Show fields

Fields of Load

opcode: Opcodearg: Valueflags: MemFlagsoffset: Offset32
LoadComplex
Show fields

Fields of LoadComplex

opcode: Opcodeargs: ValueListflags: MemFlagsoffset: Offset32
LoadNoOffset
Show fields

Fields of LoadNoOffset

opcode: Opcodearg: Valueflags: MemFlags
MultiAry
Show fields

Fields of MultiAry

opcode: Opcodeargs: ValueList
NullAry
Show fields

Fields of NullAry

opcode: Opcode
RegFill
Show fields

Fields of RegFill

opcode: Opcodearg: Valuesrc: StackSlotdst: RegUnit
RegMove
Show fields

Fields of RegMove

opcode: Opcodearg: Valuesrc: RegUnitdst: RegUnit
RegSpill
Show fields

Fields of RegSpill

opcode: Opcodearg: Valuesrc: RegUnitdst: StackSlot
Shuffle
Show fields

Fields of Shuffle

opcode: Opcodeargs: [Value; 2]mask: Immediate
StackLoad
Show fields

Fields of StackLoad

opcode: Opcodestack_slot: StackSlotoffset: Offset32
StackStore
Show fields

Fields of StackStore

opcode: Opcodearg: Valuestack_slot: StackSlotoffset: Offset32
Store
Show fields

Fields of Store

opcode: Opcodeargs: [Value; 2]flags: MemFlagsoffset: Offset32
StoreComplex
Show fields

Fields of StoreComplex

opcode: Opcodeargs: ValueListflags: MemFlagsoffset: Offset32
StoreNoOffset
Show fields

Fields of StoreNoOffset

opcode: Opcodeargs: [Value; 2]flags: MemFlags
TableAddr
Show fields

Fields of TableAddr

opcode: Opcodearg: Valuetable: Tableoffset: Offset32
Ternary
Show fields

Fields of Ternary

opcode: Opcodeargs: [Value; 3]
TernaryImm8
Show fields

Fields of TernaryImm8

opcode: Opcodeargs: [Value; 2]imm: Uimm8
Trap
Show fields

Fields of Trap

opcode: Opcodecode: TrapCode
Unary
Show fields

Fields of Unary

opcode: Opcodearg: Value
UnaryBool
Show fields

Fields of UnaryBool

opcode: Opcodeimm: bool
UnaryConst
Show fields

Fields of UnaryConst

opcode: Opcodeconstant_handle: Constant
UnaryGlobalValue
Show fields

Fields of UnaryGlobalValue

opcode: Opcodeglobal_value: GlobalValue
UnaryIeee32
Show fields

Fields of UnaryIeee32

opcode: Opcodeimm: Ieee32
UnaryIeee64
Show fields

Fields of UnaryIeee64

opcode: Opcodeimm: Ieee64
UnaryImm
Show fields

Fields of UnaryImm

opcode: Opcodeimm: Imm64

Implementations

Get the opcode of this instruction.

Get the controlling type variable operand.

Get the value arguments to this instruction.

Get mutable references to the value arguments to this instruction.

Take out the value list with all the value arguments and return it.

This leaves the value list in the instruction empty. Use put_value_list to put the value list back.

Put back a value list.

After removing a value list with take_value_list(), use this method to put it back. It is required that this instruction has a format that accepts a value list, and that the existing value list is empty. This avoids leaking list pool memory.

Compare two InstructionData for equality.

This operation requires a reference to a ValueListPool to determine if the contents of any ValueLists are equal.

Hash an InstructionData.

This operation requires a reference to a ValueListPool to hash the contents of any ValueLists.

Analyzing an instruction.

Avoid large matches on instruction formats by using the methods defined here to examine instructions.

Return information about the destination of a branch or jump instruction.

Any instruction that can transfer control to another block reveals its possible destinations here.

Get the single destination of this branch instruction, if it is a single destination branch or jump.

Multi-destination branches like br_table return None.

Get a mutable reference to the single destination of this branch instruction, if it is a single destination branch or jump.

Multi-destination branches like br_table return None.

Return the value of an immediate if the instruction has one or None otherwise. Only immediate values are considered, not global values, constant handles, condition codes, etc.

If this is a trapping instruction, get its trap code. Otherwise, return None.

If this is a control-flow instruction depending on an integer condition, gets its condition. Otherwise, return None.

If this is a control-flow instruction depending on a floating-point condition, gets its condition. Otherwise, return None.

If this is a trapping instruction, get an exclusive reference to its trap code. Otherwise, return None.

If this is an atomic read/modify/write instruction, return its subopcode.

If this is a load/store instruction, returns its immediate offset.

Return information about a call instruction.

Any instruction that can call another function reveals its call signature here.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.