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

pub enum Opcode {
    Jump,
    Fallthrough,
    Brz,
    Brnz,
    BrIcmp,
    Brif,
    Brff,
    BrTable,
    Trap,
    Trapz,
    Trapnz,
    Trapif,
    Trapff,
    Return,
    Call,
    CallIndirect,
    FuncAddr,
    Load,
    Store,
    Uload8,
    Sload8,
    Istore8,
    Uload16,
    Sload16,
    Istore16,
    Uload32,
    Sload32,
    Istore32,
    StackLoad,
    StackStore,
    StackAddr,
    GlobalAddr,
    GlobalsymAddr,
    HeapAddr,
    Iconst,
    F32const,
    F64const,
    Bconst,
    Select,
    Selectif,
    Copy,
    Spill,
    Fill,
    Regmove,
    CopySpecial,
    StackCheck,
    AdjustSpDown,
    AdjustSpUpImm,
    AdjustSpDownImm,
    IfcmpSp,
    Regspill,
    Regfill,
    Vsplit,
    Vconcat,
    Vselect,
    Splat,
    Insertlane,
    Extractlane,
    Icmp,
    IcmpImm,
    Ifcmp,
    IfcmpImm,
    Iadd,
    Isub,
    Imul,
    Umulhi,
    Smulhi,
    Udiv,
    Sdiv,
    Urem,
    Srem,
    IaddImm,
    ImulImm,
    UdivImm,
    SdivImm,
    UremImm,
    SremImm,
    IrsubImm,
    IaddCin,
    IaddCout,
    IaddCarry,
    IsubBin,
    IsubBout,
    IsubBorrow,
    Band,
    Bor,
    Bxor,
    Bnot,
    BandNot,
    BorNot,
    BxorNot,
    BandImm,
    BorImm,
    BxorImm,
    Rotl,
    Rotr,
    RotlImm,
    RotrImm,
    Ishl,
    Ushr,
    Sshr,
    IshlImm,
    UshrImm,
    SshrImm,
    Clz,
    Cls,
    Ctz,
    Popcnt,
    Fcmp,
    Ffcmp,
    Fadd,
    Fsub,
    Fmul,
    Fdiv,
    Sqrt,
    Fma,
    Fneg,
    Fabs,
    Fcopysign,
    Fmin,
    Fmax,
    Ceil,
    Floor,
    Trunc,
    Nearest,
    Trueif,
    Trueff,
    Bitcast,
    Breduce,
    Bextend,
    Bint,
    Bmask,
    Ireduce,
    Uextend,
    Sextend,
    Fpromote,
    Fdemote,
    FcvtToUint,
    FcvtToSint,
    FcvtFromUint,
    FcvtFromSint,
    Isplit,
    Iconcat,
    X86Udivmodx,
    X86Sdivmodx,
    X86Umulx,
    X86Smulx,
    X86Cvtt2si,
    X86Fmin,
    X86Fmax,
    X86Push,
    X86Pop,
    X86Bsr,
    X86Bsf,
}

An instruction opcode.

All instructions from all supported ISAs are present.

Variants

jump EBB, args. (Jump)

fallthrough EBB, args. (Jump)

brz c, EBB, args. (Branch) Type inferred from c.

brnz c, EBB, args. (Branch) Type inferred from c.

br_icmp Cond, x, y, EBB, args. (BranchIcmp) Type inferred from x.

brif Cond, f, EBB, args. (BranchInt)

brff Cond, f, EBB, args. (BranchFloat)

br_table x, JT. (BranchTable) Type inferred from x.

trap code. (Trap)

trapz c, code. (CondTrap) Type inferred from c.

trapnz c, code. (CondTrap) Type inferred from c.

trapif Cond, f, code. (IntCondTrap)

trapff Cond, f, code. (FloatCondTrap)

return rvals. (MultiAry)

rvals = call FN, args. (Call)

rvals = call_indirect SIG, callee, args. (CallIndirect) Type inferred from callee.

addr = func_addr FN. (FuncAddr)

a = load Flags, p, Offset. (Load)

store Flags, x, p, Offset. (Store) Type inferred from x.

a = uload8 Flags, p, Offset. (Load)

a = sload8 Flags, p, Offset. (Load)

istore8 Flags, x, p, Offset. (Store) Type inferred from x.

a = uload16 Flags, p, Offset. (Load)

a = sload16 Flags, p, Offset. (Load)

istore16 Flags, x, p, Offset. (Store) Type inferred from x.

a = uload32 Flags, p, Offset. (Load) Type inferred from p.

a = sload32 Flags, p, Offset. (Load) Type inferred from p.

istore32 Flags, x, p, Offset. (Store) Type inferred from x.

a = stack_load SS, Offset. (StackLoad)

stack_store x, SS, Offset. (StackStore) Type inferred from x.

addr = stack_addr SS, Offset. (StackLoad)

addr = global_addr GV. (UnaryGlobalVar)

addr = globalsym_addr GV. (UnaryGlobalVar)

addr = heap_addr H, p, Size. (HeapAddr)

a = iconst N. (UnaryImm)

a = f32const N. (UnaryIeee32)

a = f64const N. (UnaryIeee64)

a = bconst N. (UnaryBool)

a = select c, x, y. (Ternary) Type inferred from x.

a = selectif cc, flags, x, y. (IntSelect)

a = copy x. (Unary) Type inferred from x.

a = spill x. (Unary) Type inferred from x.

a = fill x. (Unary) Type inferred from x.

regmove x, src, dst. (RegMove) Type inferred from x.

copy_special src, dst. (CopySpecial)

stack_check GV. (UnaryGlobalVar)

adjust_sp_down delta. (Unary) Type inferred from delta.

adjust_sp_up_imm Offset. (UnaryImm)

adjust_sp_down_imm Offset. (UnaryImm)

f = ifcmp_sp addr. (Unary) Type inferred from addr.

regspill x, src, SS. (RegSpill) Type inferred from x.

regfill x, SS, dst. (RegFill) Type inferred from x.

lo, hi = vsplit x. (Unary) Type inferred from x.

a = vconcat x, y. (Binary) Type inferred from x.

a = vselect c, x, y. (Ternary) Type inferred from x.

a = splat x. (Unary)

a = insertlane x, Idx, y. (InsertLane) Type inferred from x.

a = extractlane x, Idx. (ExtractLane) Type inferred from x.

a = icmp Cond, x, y. (IntCompare) Type inferred from x.

a = icmp_imm Cond, x, Y. (IntCompareImm) Type inferred from x.

f = ifcmp x, y. (Binary) Type inferred from x.

f = ifcmp_imm x, Y. (BinaryImm) Type inferred from x.

a = iadd x, y. (Binary) Type inferred from x.

a = isub x, y. (Binary) Type inferred from x.

a = imul x, y. (Binary) Type inferred from x.

a = umulhi x, y. (Binary) Type inferred from x.

a = smulhi x, y. (Binary) Type inferred from x.

a = udiv x, y. (Binary) Type inferred from x.

a = sdiv x, y. (Binary) Type inferred from x.

a = urem x, y. (Binary) Type inferred from x.

a = srem x, y. (Binary) Type inferred from x.

a = iadd_imm x, Y. (BinaryImm) Type inferred from x.

a = imul_imm x, Y. (BinaryImm) Type inferred from x.

a = udiv_imm x, Y. (BinaryImm) Type inferred from x.

a = sdiv_imm x, Y. (BinaryImm) Type inferred from x.

a = urem_imm x, Y. (BinaryImm) Type inferred from x.

a = srem_imm x, Y. (BinaryImm) Type inferred from x.

a = irsub_imm x, Y. (BinaryImm) Type inferred from x.

a = iadd_cin x, y, c_in. (Ternary) Type inferred from y.

a, c_out = iadd_cout x, y. (Binary) Type inferred from x.

a, c_out = iadd_carry x, y, c_in. (Ternary) Type inferred from y.

a = isub_bin x, y, b_in. (Ternary) Type inferred from y.

a, b_out = isub_bout x, y. (Binary) Type inferred from x.

a, b_out = isub_borrow x, y, b_in. (Ternary) Type inferred from y.

a = band x, y. (Binary) Type inferred from x.

a = bor x, y. (Binary) Type inferred from x.

a = bxor x, y. (Binary) Type inferred from x.

a = bnot x. (Unary) Type inferred from x.

a = band_not x, y. (Binary) Type inferred from x.

a = bor_not x, y. (Binary) Type inferred from x.

a = bxor_not x, y. (Binary) Type inferred from x.

a = band_imm x, Y. (BinaryImm) Type inferred from x.

a = bor_imm x, Y. (BinaryImm) Type inferred from x.

a = bxor_imm x, Y. (BinaryImm) Type inferred from x.

a = rotl x, y. (Binary) Type inferred from x.

a = rotr x, y. (Binary) Type inferred from x.

a = rotl_imm x, Y. (BinaryImm) Type inferred from x.

a = rotr_imm x, Y. (BinaryImm) Type inferred from x.

a = ishl x, y. (Binary) Type inferred from x.

a = ushr x, y. (Binary) Type inferred from x.

a = sshr x, y. (Binary) Type inferred from x.

a = ishl_imm x, Y. (BinaryImm) Type inferred from x.

a = ushr_imm x, Y. (BinaryImm) Type inferred from x.

a = sshr_imm x, Y. (BinaryImm) Type inferred from x.

a = clz x. (Unary) Type inferred from x.

a = cls x. (Unary) Type inferred from x.

a = ctz x. (Unary) Type inferred from x.

a = popcnt x. (Unary) Type inferred from x.

a = fcmp Cond, x, y. (FloatCompare) Type inferred from x.

f = ffcmp x, y. (Binary) Type inferred from x.

a = fadd x, y. (Binary) Type inferred from x.

a = fsub x, y. (Binary) Type inferred from x.

a = fmul x, y. (Binary) Type inferred from x.

a = fdiv x, y. (Binary) Type inferred from x.

a = sqrt x. (Unary) Type inferred from x.

a = fma x, y, z. (Ternary) Type inferred from y.

a = fneg x. (Unary) Type inferred from x.

a = fabs x. (Unary) Type inferred from x.

a = fcopysign x, y. (Binary) Type inferred from x.

a = fmin x, y. (Binary) Type inferred from x.

a = fmax x, y. (Binary) Type inferred from x.

a = ceil x. (Unary) Type inferred from x.

a = floor x. (Unary) Type inferred from x.

a = trunc x. (Unary) Type inferred from x.

a = nearest x. (Unary) Type inferred from x.

a = trueif Cond, f. (IntCond)

a = trueff Cond, f. (FloatCond)

a = bitcast x. (Unary)

a = breduce x. (Unary)

a = bextend x. (Unary)

a = bint x. (Unary)

a = bmask x. (Unary)

a = ireduce x. (Unary)

a = uextend x. (Unary)

a = sextend x. (Unary)

a = fpromote x. (Unary)

a = fdemote x. (Unary)

a = fcvt_to_uint x. (Unary)

a = fcvt_to_sint x. (Unary)

a = fcvt_from_uint x. (Unary)

a = fcvt_from_sint x. (Unary)

lo, hi = isplit x. (Unary) Type inferred from x.

a = iconcat lo, hi. (Binary) Type inferred from lo.

q, r = x86_udivmodx nlo, nhi, d. (Ternary) Type inferred from nhi.

q, r = x86_sdivmodx nlo, nhi, d. (Ternary) Type inferred from nhi.

resLo, resHi = x86_umulx argL, argR. (Binary) Type inferred from argL.

resLo, resHi = x86_smulx argL, argR. (Binary) Type inferred from argL.

a = x86_cvtt2si x. (Unary)

a = x86_fmin x, y. (Binary) Type inferred from x.

a = x86_fmax x, y. (Binary) Type inferred from x.

x86_push x. (Unary) Type inferred from x.

x = x86_pop. (NullAry)

y, rflags = x86_bsr x. (Unary) Type inferred from x.

y, rflags = x86_bsf x. (Unary) Type inferred from x.

Methods

impl Opcode
[src]

[src]

Can this instruction read from memory?

[src]

Can this instruction write to memory?

[src]

Can this instruction cause a trap?

[src]

True for all branch or jump instructions.

[src]

Is this a call instruction?

[src]

Is this a return instruction?

[src]

True for instructions that terminate the EBB.

[src]

Does this instruction have other side effects besides can_*

[src]

Does this instruction write to CPU flags?

impl Opcode
[src]

[src]

Get the instruction format for this opcode.

[src]

Get the constraint descriptor for this opcode. Panic if this is called on NotAnOpcode.

Trait Implementations

impl Copy for Opcode
[src]

impl Clone for Opcode
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Opcode
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl Eq for Opcode
[src]

impl Debug for Opcode
[src]

[src]

Formats the value using the given formatter. Read more

impl Hash for Opcode
[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 Display for Opcode
[src]

[src]

Formats the value using the given formatter. Read more

impl FromStr for Opcode
[src]

The associated error which can be returned from parsing.

[src]

Parse an Opcode name from a string.

Auto Trait Implementations

impl Send for Opcode

impl Sync for Opcode