[−][src]Enum cranelift_codegen::ir::instructions::Opcode
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, EBB, JT. (BranchTable)
Type inferred from x.
entry = jump_table_entry x, addr, Size, JT. (BranchTableEntry)
Type inferred from x.
addr = jump_table_base JT. (BranchTableBase)
indirect_jump_table_br addr, JT. (IndirectJump)
Type inferred from addr.
debugtrap. (NullAry)
trap code. (Trap)
trapz c, code. (CondTrap)
Type inferred from c.
resumable_trap code. (Trap)
trapnz c, code. (CondTrap)
Type inferred from c.
trapif Cond, f, code. (IntCondTrap)
trapff Cond, f, code. (FloatCondTrap)
return rvals. (MultiAry)
fallthrough_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 MemFlags, p, Offset. (Load)
a = load_complex MemFlags, args, Offset. (LoadComplex)
store MemFlags, x, p, Offset. (Store)
Type inferred from x.
store_complex MemFlags, x, args, Offset. (StoreComplex)
Type inferred from x.
a = uload8 MemFlags, p, Offset. (Load)
a = uload8_complex MemFlags, args, Offset. (LoadComplex)
a = sload8 MemFlags, p, Offset. (Load)
a = sload8_complex MemFlags, args, Offset. (LoadComplex)
istore8 MemFlags, x, p, Offset. (Store)
Type inferred from x.
istore8_complex MemFlags, x, args, Offset. (StoreComplex)
Type inferred from x.
a = uload16 MemFlags, p, Offset. (Load)
a = uload16_complex MemFlags, args, Offset. (LoadComplex)
a = sload16 MemFlags, p, Offset. (Load)
a = sload16_complex MemFlags, args, Offset. (LoadComplex)
istore16 MemFlags, x, p, Offset. (Store)
Type inferred from x.
istore16_complex MemFlags, x, args, Offset. (StoreComplex)
Type inferred from x.
a = uload32 MemFlags, p, Offset. (Load)
Type inferred from p.
a = uload32_complex MemFlags, args, Offset. (LoadComplex)
a = sload32 MemFlags, p, Offset. (Load)
Type inferred from p.
a = sload32_complex MemFlags, args, Offset. (LoadComplex)
istore32 MemFlags, x, p, Offset. (Store)
Type inferred from x.
istore32_complex MemFlags, x, args, Offset. (StoreComplex)
a = stack_load SS, Offset. (StackLoad)
stack_store x, SS, Offset. (StackStore)
Type inferred from x.
addr = stack_addr SS, Offset. (StackLoad)
a = global_value GV. (UnaryGlobalValue)
a = symbol_value GV. (UnaryGlobalValue)
addr = heap_addr H, p, Size. (HeapAddr)
addr = get_pinned_reg. (NullAry)
set_pinned_reg addr. (Unary)
Type inferred from addr.
addr = table_addr T, p, Offset. (TableAddr)
a = iconst N. (UnaryImm)
a = f32const N. (UnaryIeee32)
a = f64const N. (UnaryIeee64)
a = bconst N. (UnaryBool)
a = vconst N. (UnaryConst)
a = shuffle a, b, mask. (Shuffle)
Type inferred from a.
a = null. (NullAry)
nop. (NullAry)
a = select c, x, y. (Ternary)
Type inferred from x.
a = selectif cc, flags, x, y. (IntSelect)
a = bitselect c, x, y. (Ternary)
Type inferred from x.
a = copy x. (Unary)
Type inferred from x.
a = spill x. (Unary)
Type inferred from x.
a = fill x. (Unary)
Type inferred from x.
a = fill_nop x. (Unary)
Type inferred from x.
regmove x, src, dst. (RegMove)
Type inferred from x.
copy_special src, dst. (CopySpecial)
a = copy_to_ssa src. (CopyToSsa)
a = copy_nop x. (Unary)
Type inferred from x.
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.
safepoint args. (MultiAry)
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.
s = vany_true a. (Unary)
Type inferred from a.
s = vall_true a. (Unary)
Type inferred from a.
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 = uadd_sat x, y. (Binary)
Type inferred from x.
a = sadd_sat x, y. (Binary)
Type inferred from x.
a = isub x, y. (Binary)
Type inferred from x.
a = usub_sat x, y. (Binary)
Type inferred from x.
a = ssub_sat x, y. (Binary)
Type inferred from x.
a = ineg x. (Unary)
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 = iadd_ifcin 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_ifcout x, y. (Binary)
Type inferred from x.
a, c_out = iadd_carry x, y, c_in. (Ternary)
Type inferred from y.
a, c_out = iadd_ifcarry x, y, c_in. (Ternary)
Type inferred from y.
a = isub_bin x, y, b_in. (Ternary)
Type inferred from y.
a = isub_ifbin 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_ifbout x, y. (Binary)
Type inferred from x.
a, b_out = isub_borrow x, y, b_in. (Ternary)
Type inferred from y.
a, b_out = isub_ifborrow 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 = bitrev x. (Unary)
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 = is_null x. (Unary)
Type inferred from x.
a = trueif Cond, f. (IntCond)
a = trueff Cond, f. (FloatCond)
a = bitcast x. (Unary)
a = raw_bitcast x. (Unary)
a = scalar_to_vector s. (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_uint_sat x. (Unary)
a = fcvt_to_sint x. (Unary)
a = fcvt_to_sint_sat 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.
a = x86_pshufd a, i. (ExtractLane)
Type inferred from a.
a = x86_pshufb a, b. (Binary)
Type inferred from a.
a = x86_pextr x, Idx. (ExtractLane)
Type inferred from x.
a = x86_pinsr x, Idx, y. (InsertLane)
Type inferred from x.
a = x86_insertps x, Idx, y. (InsertLane)
Type inferred from x.
a = x86_movsd x, y. (Binary)
Type inferred from x.
a = x86_movlhps x, y. (Binary)
Type inferred from x.
a = x86_psll x, y. (Binary)
Type inferred from x.
a = x86_psrl x, y. (Binary)
Type inferred from x.
a = x86_psra x, y. (Binary)
Type inferred from x.
f = x86_ptest x, y. (Binary)
Type inferred from x.
a = x86_pmaxs x, y. (Binary)
Type inferred from x.
a = x86_pmaxu x, y. (Binary)
Type inferred from x.
a = x86_pmins x, y. (Binary)
Type inferred from x.
a = x86_pminu x, y. (Binary)
Type inferred from x.
Methods
impl Opcode[src]
pub fn is_terminator(self) -> bool[src]
True for instructions that terminate the EBB
pub fn is_branch(self) -> bool[src]
True for all branch or jump instructions.
pub fn is_indirect_branch(self) -> bool[src]
True for all indirect branch or jump instructions.
pub fn is_call(self) -> bool[src]
Is this a call instruction?
pub fn is_return(self) -> bool[src]
Is this a return instruction?
pub fn is_ghost(self) -> bool[src]
Is this a ghost instruction?
pub fn can_load(self) -> bool[src]
Can this instruction read from memory?
pub fn can_store(self) -> bool[src]
Can this instruction write to memory?
pub fn can_trap(self) -> bool[src]
Can this instruction cause a trap?
pub fn other_side_effects(self) -> bool[src]
Does this instruction have other side effects besides can_* flags?
pub fn writes_cpu_flags(self) -> bool[src]
Does this instruction write to CPU flags?
impl Opcode[src]
pub fn format(self) -> InstructionFormat[src]
Get the instruction format for this opcode.
pub fn constraints(self) -> OpcodeConstraints[src]
Get the constraint descriptor for this opcode.
Panic if this is called on NotAnOpcode.
Trait Implementations
impl Clone for Opcode[src]
impl Copy for Opcode[src]
impl Debug for Opcode[src]
impl Display for Opcode[src]
impl Eq for Opcode[src]
impl FromStr for Opcode[src]
type Err = &'static str
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, &'static str>[src]
Parse an Opcode name from a string.
impl Hash for Opcode[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl PartialEq<Opcode> for Opcode[src]
impl StructuralEq for Opcode[src]
impl StructuralPartialEq for Opcode[src]
Auto Trait Implementations
impl RefUnwindSafe for Opcode
impl Send for Opcode
impl Sync for Opcode
impl Unpin for Opcode
impl UnwindSafe for Opcode
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,