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

pub enum InstructionData {
    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,
    },
    UnaryGlobalVar {
        opcode: Opcode,
        global_var: GlobalVar,
    },
    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,
        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,
    },
    Store {
        opcode: Opcode,
        args: [Value; 2],
        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,
    },
    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

Fields of Unary

Fields of UnaryImm

Fields of UnaryIeee32

Fields of UnaryIeee64

Fields of UnaryBool

Fields of UnaryGlobalVar

Fields of Binary

Fields of BinaryImm

Fields of Ternary

Fields of MultiAry

Fields of NullAry

Fields of InsertLane

Fields of ExtractLane

Fields of IntCompare

Fields of IntCompareImm

Fields of IntCond

Fields of FloatCompare

Fields of FloatCond

Fields of IntSelect

Fields of Jump

Fields of Branch

Fields of BranchInt

Fields of BranchFloat

Fields of BranchIcmp

Fields of BranchTable

Fields of Call

Fields of CallIndirect

Fields of FuncAddr

Fields of Load

Fields of Store

Fields of StackLoad

Fields of StackStore

Fields of HeapAddr

Fields of RegMove

Fields of CopySpecial

Fields of RegSpill

Fields of RegFill

Fields of Trap

Fields of CondTrap

Fields of IntCondTrap

Fields of FloatCondTrap

Methods

impl InstructionData
[src]

[src]

Get the opcode of this instruction.

[src]

Get the controlling type variable operand.

Important traits for &'a mut [u8]
[src]

Get the value arguments to this instruction.

Important traits for &'a mut [u8]
[src]

Get mutable references to the value arguments to this instruction.

[src]

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.

[src]

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.

impl InstructionData
[src]

Analyzing an instruction.

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

[src]

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.

[src]

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.

[src]

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.

[src]

Return information about a call instruction.

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

Trait Implementations

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

[src]

Performs the conversion.

impl Clone for InstructionData
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for InstructionData
[src]

[src]

Formats the value using the given formatter. Read more

impl Hash for InstructionData
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for InstructionData
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for InstructionData
[src]

Auto Trait Implementations