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

Variants§

§

Unary

Fields

§opcode: Opcode
§arg: Value
§

UnaryImm

Fields

§opcode: Opcode
§imm: Imm64
§

UnaryIeee32

Fields

§opcode: Opcode
§imm: Ieee32
§

UnaryIeee64

Fields

§opcode: Opcode
§imm: Ieee64
§

UnaryBool

Fields

§opcode: Opcode
§imm: bool
§

UnaryGlobalValue

Fields

§opcode: Opcode
§global_value: GlobalValue
§

Binary

Fields

§opcode: Opcode
§args: [Value; 2]
§

BinaryImm

Fields

§opcode: Opcode
§arg: Value
§imm: Imm64
§

Ternary

Fields

§opcode: Opcode
§args: [Value; 3]
§

MultiAry

Fields

§opcode: Opcode
§

NullAry

Fields

§opcode: Opcode
§

InsertLane

Fields

§opcode: Opcode
§args: [Value; 2]
§lane: Uimm8
§

ExtractLane

Fields

§opcode: Opcode
§arg: Value
§lane: Uimm8
§

IntCompare

Fields

§opcode: Opcode
§args: [Value; 2]
§cond: IntCC
§

IntCompareImm

Fields

§opcode: Opcode
§arg: Value
§cond: IntCC
§imm: Imm64
§

IntCond

Fields

§opcode: Opcode
§arg: Value
§cond: IntCC
§

FloatCompare

Fields

§opcode: Opcode
§args: [Value; 2]
§cond: FloatCC
§

FloatCond

Fields

§opcode: Opcode
§arg: Value
§cond: FloatCC
§

IntSelect

Fields

§opcode: Opcode
§args: [Value; 3]
§cond: IntCC
§

Jump

Fields

§opcode: Opcode
§destination: Ebb
§

Branch

Fields

§opcode: Opcode
§destination: Ebb
§

BranchInt

Fields

§opcode: Opcode
§cond: IntCC
§destination: Ebb
§

BranchFloat

Fields

§opcode: Opcode
§cond: FloatCC
§destination: Ebb
§

BranchIcmp

Fields

§opcode: Opcode
§cond: IntCC
§destination: Ebb
§

BranchTable

Fields

§opcode: Opcode
§arg: Value
§destination: Ebb
§table: JumpTable
§

BranchTableEntry

Fields

§opcode: Opcode
§args: [Value; 2]
§imm: Uimm8
§table: JumpTable
§

BranchTableBase

Fields

§opcode: Opcode
§table: JumpTable
§

IndirectJump

Fields

§opcode: Opcode
§arg: Value
§table: JumpTable
§

Call

Fields

§opcode: Opcode
§func_ref: FuncRef
§

CallIndirect

Fields

§opcode: Opcode
§sig_ref: SigRef
§

FuncAddr

Fields

§opcode: Opcode
§func_ref: FuncRef
§

Load

Fields

§opcode: Opcode
§arg: Value
§flags: MemFlags
§offset: Offset32
§

LoadComplex

Fields

§opcode: Opcode
§flags: MemFlags
§offset: Offset32
§

Store

Fields

§opcode: Opcode
§args: [Value; 2]
§flags: MemFlags
§offset: Offset32
§

StoreComplex

Fields

§opcode: Opcode
§flags: MemFlags
§offset: Offset32
§

StackLoad

Fields

§opcode: Opcode
§stack_slot: StackSlot
§offset: Offset32
§

StackStore

Fields

§opcode: Opcode
§arg: Value
§stack_slot: StackSlot
§offset: Offset32
§

HeapAddr

Fields

§opcode: Opcode
§arg: Value
§heap: Heap
§imm: Uimm32
§

TableAddr

Fields

§opcode: Opcode
§arg: Value
§table: Table
§offset: Offset32
§

RegMove

Fields

§opcode: Opcode
§arg: Value
§src: RegUnit
§dst: RegUnit
§

CopySpecial

Fields

§opcode: Opcode
§src: RegUnit
§dst: RegUnit
§

RegSpill

Fields

§opcode: Opcode
§arg: Value
§src: RegUnit
§

RegFill

Fields

§opcode: Opcode
§arg: Value
§dst: RegUnit
§

Trap

Fields

§opcode: Opcode
§code: TrapCode
§

CondTrap

Fields

§opcode: Opcode
§arg: Value
§code: TrapCode
§

IntCondTrap

Fields

§opcode: Opcode
§arg: Value
§cond: IntCC
§code: TrapCode
§

FloatCondTrap

Fields

§opcode: Opcode
§arg: Value
§cond: FloatCC
§code: TrapCode

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 EBB 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 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
Converts to this type from the input type.

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.