Enum cranelift_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,
LoadComplex,
Store,
StoreComplex,
Uload8,
Uload8Complex,
Sload8,
Sload8Complex,
Istore8,
Istore8Complex,
Uload16,
Uload16Complex,
Sload16,
Sload16Complex,
Istore16,
Istore16Complex,
Uload32,
Uload32Complex,
Sload32,
Sload32Complex,
Istore32,
Istore32Complex,
StackLoad,
StackStore,
StackAddr,
GlobalValue,
GlobalsymAddr,
HeapAddr,
Iconst,
F32const,
F64const,
Bconst,
Select,
Selectif,
Copy,
Spill,
Fill,
Regmove,
CopySpecial,
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
Jumpjump EBB, args. (Jump)
Fallthroughfallthrough EBB, args. (Jump)
Brzbrz c, EBB, args. (Branch)
Type inferred from c.
Brnzbrnz c, EBB, args. (Branch)
Type inferred from c.
BrIcmpbr_icmp Cond, x, y, EBB, args. (BranchIcmp)
Type inferred from x.
Brifbrif Cond, f, EBB, args. (BranchInt)
Brffbrff Cond, f, EBB, args. (BranchFloat)
BrTablebr_table x, JT. (BranchTable)
Type inferred from x.
Traptrap code. (Trap)
Trapztrapz c, code. (CondTrap)
Type inferred from c.
Trapnztrapnz c, code. (CondTrap)
Type inferred from c.
Trapiftrapif Cond, f, code. (IntCondTrap)
Trapfftrapff Cond, f, code. (FloatCondTrap)
Returnreturn rvals. (MultiAry)
Callrvals = call FN, args. (Call)
CallIndirectrvals = call_indirect SIG, callee, args. (CallIndirect)
Type inferred from callee.
FuncAddraddr = func_addr FN. (FuncAddr)
Loada = load MemFlags, p, Offset. (Load)
LoadComplexa = load_complex MemFlags, args, Offset. (LoadComplex)
Storestore MemFlags, x, p, Offset. (Store)
Type inferred from x.
StoreComplexstore_complex MemFlags, x, args, Offset. (StoreComplex)
Type inferred from x.
Uload8a = uload8 MemFlags, p, Offset. (Load)
Uload8Complexa = uload8_complex MemFlags, args, Offset. (LoadComplex)
Sload8a = sload8 MemFlags, p, Offset. (Load)
Sload8Complexa = sload8_complex MemFlags, args, Offset. (LoadComplex)
Istore8istore8 MemFlags, x, p, Offset. (Store)
Type inferred from x.
Istore8Complexistore8_complex MemFlags, x, args, Offset. (StoreComplex)
Type inferred from x.
Uload16a = uload16 MemFlags, p, Offset. (Load)
Uload16Complexa = uload16_complex MemFlags, args, Offset. (LoadComplex)
Sload16a = sload16 MemFlags, p, Offset. (Load)
Sload16Complexa = sload16_complex MemFlags, args, Offset. (LoadComplex)
Istore16istore16 MemFlags, x, p, Offset. (Store)
Type inferred from x.
Istore16Complexistore16_complex MemFlags, x, args, Offset. (StoreComplex)
Type inferred from x.
Uload32a = uload32 MemFlags, p, Offset. (Load)
Type inferred from p.
Uload32Complexa = uload32_complex MemFlags, args, Offset. (LoadComplex)
Sload32a = sload32 MemFlags, p, Offset. (Load)
Type inferred from p.
Sload32Complexa = sload32_complex MemFlags, args, Offset. (LoadComplex)
Istore32istore32 MemFlags, x, p, Offset. (Store)
Type inferred from x.
Istore32Complexistore32_complex MemFlags, x, args, Offset. (StoreComplex)
StackLoada = stack_load SS, Offset. (StackLoad)
StackStorestack_store x, SS, Offset. (StackStore)
Type inferred from x.
StackAddraddr = stack_addr SS, Offset. (StackLoad)
GlobalValueaddr = global_value GV. (UnaryGlobalValue)
GlobalsymAddraddr = globalsym_addr GV. (UnaryGlobalValue)
HeapAddraddr = heap_addr H, p, Size. (HeapAddr)
Iconsta = iconst N. (UnaryImm)
F32consta = f32const N. (UnaryIeee32)
F64consta = f64const N. (UnaryIeee64)
Bconsta = bconst N. (UnaryBool)
Selecta = select c, x, y. (Ternary)
Type inferred from x.
Selectifa = selectif cc, flags, x, y. (IntSelect)
Copya = copy x. (Unary)
Type inferred from x.
Spilla = spill x. (Unary)
Type inferred from x.
Filla = fill x. (Unary)
Type inferred from x.
Regmoveregmove x, src, dst. (RegMove)
Type inferred from x.
CopySpecialcopy_special src, dst. (CopySpecial)
AdjustSpDownadjust_sp_down delta. (Unary)
Type inferred from delta.
AdjustSpUpImmadjust_sp_up_imm Offset. (UnaryImm)
AdjustSpDownImmadjust_sp_down_imm Offset. (UnaryImm)
IfcmpSpf = ifcmp_sp addr. (Unary)
Type inferred from addr.
Regspillregspill x, src, SS. (RegSpill)
Type inferred from x.
Regfillregfill x, SS, dst. (RegFill)
Type inferred from x.
Vsplitlo, hi = vsplit x. (Unary)
Type inferred from x.
Vconcata = vconcat x, y. (Binary)
Type inferred from x.
Vselecta = vselect c, x, y. (Ternary)
Type inferred from x.
Splata = splat x. (Unary)
Insertlanea = insertlane x, Idx, y. (InsertLane)
Type inferred from x.
Extractlanea = extractlane x, Idx. (ExtractLane)
Type inferred from x.
Icmpa = icmp Cond, x, y. (IntCompare)
Type inferred from x.
IcmpImma = icmp_imm Cond, x, Y. (IntCompareImm)
Type inferred from x.
Ifcmpf = ifcmp x, y. (Binary)
Type inferred from x.
IfcmpImmf = ifcmp_imm x, Y. (BinaryImm)
Type inferred from x.
Iadda = iadd x, y. (Binary)
Type inferred from x.
Isuba = isub x, y. (Binary)
Type inferred from x.
Imula = imul x, y. (Binary)
Type inferred from x.
Umulhia = umulhi x, y. (Binary)
Type inferred from x.
Smulhia = smulhi x, y. (Binary)
Type inferred from x.
Udiva = udiv x, y. (Binary)
Type inferred from x.
Sdiva = sdiv x, y. (Binary)
Type inferred from x.
Urema = urem x, y. (Binary)
Type inferred from x.
Srema = srem x, y. (Binary)
Type inferred from x.
IaddImma = iadd_imm x, Y. (BinaryImm)
Type inferred from x.
ImulImma = imul_imm x, Y. (BinaryImm)
Type inferred from x.
UdivImma = udiv_imm x, Y. (BinaryImm)
Type inferred from x.
SdivImma = sdiv_imm x, Y. (BinaryImm)
Type inferred from x.
UremImma = urem_imm x, Y. (BinaryImm)
Type inferred from x.
SremImma = srem_imm x, Y. (BinaryImm)
Type inferred from x.
IrsubImma = irsub_imm x, Y. (BinaryImm)
Type inferred from x.
IaddCina = iadd_cin x, y, c_in. (Ternary)
Type inferred from y.
IaddCouta, c_out = iadd_cout x, y. (Binary)
Type inferred from x.
IaddCarrya, c_out = iadd_carry x, y, c_in. (Ternary)
Type inferred from y.
IsubBina = isub_bin x, y, b_in. (Ternary)
Type inferred from y.
IsubBouta, b_out = isub_bout x, y. (Binary)
Type inferred from x.
IsubBorrowa, b_out = isub_borrow x, y, b_in. (Ternary)
Type inferred from y.
Banda = band x, y. (Binary)
Type inferred from x.
Bora = bor x, y. (Binary)
Type inferred from x.
Bxora = bxor x, y. (Binary)
Type inferred from x.
Bnota = bnot x. (Unary)
Type inferred from x.
BandNota = band_not x, y. (Binary)
Type inferred from x.
BorNota = bor_not x, y. (Binary)
Type inferred from x.
BxorNota = bxor_not x, y. (Binary)
Type inferred from x.
BandImma = band_imm x, Y. (BinaryImm)
Type inferred from x.
BorImma = bor_imm x, Y. (BinaryImm)
Type inferred from x.
BxorImma = bxor_imm x, Y. (BinaryImm)
Type inferred from x.
Rotla = rotl x, y. (Binary)
Type inferred from x.
Rotra = rotr x, y. (Binary)
Type inferred from x.
RotlImma = rotl_imm x, Y. (BinaryImm)
Type inferred from x.
RotrImma = rotr_imm x, Y. (BinaryImm)
Type inferred from x.
Ishla = ishl x, y. (Binary)
Type inferred from x.
Ushra = ushr x, y. (Binary)
Type inferred from x.
Sshra = sshr x, y. (Binary)
Type inferred from x.
IshlImma = ishl_imm x, Y. (BinaryImm)
Type inferred from x.
UshrImma = ushr_imm x, Y. (BinaryImm)
Type inferred from x.
SshrImma = sshr_imm x, Y. (BinaryImm)
Type inferred from x.
Clza = clz x. (Unary)
Type inferred from x.
Clsa = cls x. (Unary)
Type inferred from x.
Ctza = ctz x. (Unary)
Type inferred from x.
Popcnta = popcnt x. (Unary)
Type inferred from x.
Fcmpa = fcmp Cond, x, y. (FloatCompare)
Type inferred from x.
Ffcmpf = ffcmp x, y. (Binary)
Type inferred from x.
Fadda = fadd x, y. (Binary)
Type inferred from x.
Fsuba = fsub x, y. (Binary)
Type inferred from x.
Fmula = fmul x, y. (Binary)
Type inferred from x.
Fdiva = fdiv x, y. (Binary)
Type inferred from x.
Sqrta = sqrt x. (Unary)
Type inferred from x.
Fmaa = fma x, y, z. (Ternary)
Type inferred from y.
Fnega = fneg x. (Unary)
Type inferred from x.
Fabsa = fabs x. (Unary)
Type inferred from x.
Fcopysigna = fcopysign x, y. (Binary)
Type inferred from x.
Fmina = fmin x, y. (Binary)
Type inferred from x.
Fmaxa = fmax x, y. (Binary)
Type inferred from x.
Ceila = ceil x. (Unary)
Type inferred from x.
Floora = floor x. (Unary)
Type inferred from x.
Trunca = trunc x. (Unary)
Type inferred from x.
Nearesta = nearest x. (Unary)
Type inferred from x.
Trueifa = trueif Cond, f. (IntCond)
Trueffa = trueff Cond, f. (FloatCond)
Bitcasta = bitcast x. (Unary)
Breducea = breduce x. (Unary)
Bextenda = bextend x. (Unary)
Binta = bint x. (Unary)
Bmaska = bmask x. (Unary)
Ireducea = ireduce x. (Unary)
Uextenda = uextend x. (Unary)
Sextenda = sextend x. (Unary)
Fpromotea = fpromote x. (Unary)
Fdemotea = fdemote x. (Unary)
FcvtToUinta = fcvt_to_uint x. (Unary)
FcvtToSinta = fcvt_to_sint x. (Unary)
FcvtFromUinta = fcvt_from_uint x. (Unary)
FcvtFromSinta = fcvt_from_sint x. (Unary)
Isplitlo, hi = isplit x. (Unary)
Type inferred from x.
Iconcata = iconcat lo, hi. (Binary)
Type inferred from lo.
X86Udivmodxq, r = x86_udivmodx nlo, nhi, d. (Ternary)
Type inferred from nhi.
X86Sdivmodxq, r = x86_sdivmodx nlo, nhi, d. (Ternary)
Type inferred from nhi.
X86UmulxresLo, resHi = x86_umulx argL, argR. (Binary)
Type inferred from argL.
X86SmulxresLo, resHi = x86_smulx argL, argR. (Binary)
Type inferred from argL.
X86Cvtt2sia = x86_cvtt2si x. (Unary)
X86Fmina = x86_fmin x, y. (Binary)
Type inferred from x.
X86Fmaxa = x86_fmax x, y. (Binary)
Type inferred from x.
X86Pushx86_push x. (Unary)
Type inferred from x.
X86Popx = x86_pop. (NullAry)
X86Bsry, rflags = x86_bsr x. (Unary)
Type inferred from x.
X86Bsfy, rflags = x86_bsf x. (Unary)
Type inferred from x.
Methods
impl Opcode[src]
impl Opcodepub fn can_load(self) -> bool[src]
pub fn can_load(self) -> boolCan this instruction read from memory?
pub fn can_store(self) -> bool[src]
pub fn can_store(self) -> boolCan this instruction write to memory?
pub fn can_trap(self) -> bool[src]
pub fn can_trap(self) -> boolCan this instruction cause a trap?
pub fn is_branch(self) -> bool[src]
pub fn is_branch(self) -> boolTrue for all branch or jump instructions.
pub fn is_call(self) -> bool[src]
pub fn is_call(self) -> boolIs this a call instruction?
pub fn is_return(self) -> bool[src]
pub fn is_return(self) -> boolIs this a return instruction?
pub fn is_terminator(self) -> bool[src]
pub fn is_terminator(self) -> boolTrue for instructions that terminate the EBB.
pub fn other_side_effects(self) -> bool[src]
pub fn other_side_effects(self) -> boolDoes this instruction have other side effects besides can_*
pub fn writes_cpu_flags(self) -> bool[src]
pub fn writes_cpu_flags(self) -> boolDoes this instruction write to CPU flags?
impl Opcode[src]
impl Opcodepub fn format(self) -> InstructionFormat[src]
pub fn format(self) -> InstructionFormatGet the instruction format for this opcode.
pub fn constraints(self) -> OpcodeConstraints[src]
pub fn constraints(self) -> OpcodeConstraintsGet the constraint descriptor for this opcode.
Panic if this is called on NotAnOpcode.
Trait Implementations
impl Copy for Opcode[src]
impl Copy for Opcodeimpl Clone for Opcode[src]
impl Clone for Opcodefn clone(&self) -> Opcode[src]
fn clone(&self) -> OpcodeReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for Opcode[src]
impl PartialEq for Opcodefn eq(&self, other: &Opcode) -> bool[src]
fn eq(&self, other: &Opcode) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Eq for Opcode[src]
impl Eq for Opcodeimpl Debug for Opcode[src]
impl Debug for Opcodefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Hash for Opcode[src]
impl Hash for Opcodefn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Display for Opcode[src]
impl Display for Opcodefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl FromStr for Opcode[src]
impl FromStr for Opcode