pub struct InsertBuilder<'f, IIB: InstInserterBase<'f>> { /* private fields */ }
Expand description

Builder that inserts an instruction at the current position.

An InsertBuilder is a wrapper for an InstInserterBase that turns it into an instruction builder with some additional facilities for creating instructions that reuse existing values as their results.

Implementations§

source§

impl<'f, IIB: InstInserterBase<'f>> InsertBuilder<'f, IIB>

source

pub fn new(inserter: IIB) -> Self

Create a new builder which inserts instructions at pos. The dfg and pos.layout references should be from the same Function.

source

pub fn with_results<Array>( self, reuse: Array ) -> InsertReuseBuilder<'f, IIB, Array>where Array: AsRef<[Option<Value>]>,

Reuse result values in reuse.

Convert this builder into one that will reuse the provided result values instead of allocating new ones. The provided values for reuse must not be attached to anything. Any missing result values will be allocated as normal.

The reuse argument is expected to be an array of Option<Value>.

source

pub fn with_result( self, v: Value ) -> InsertReuseBuilder<'f, IIB, [Option<Value>; 1]>

Reuse a single result value.

Convert this into a builder that will reuse v as the single result value. The reused result value v must not be attached to anything.

This method should only be used when building an instruction with exactly one result. Use with_results() for the more general case.

Trait Implementations§

source§

impl<'f, IIB: InstInserterBase<'f>> InstBuilderBase<'f> for InsertBuilder<'f, IIB>

source§

fn data_flow_graph(&self) -> &DataFlowGraph

Get an immutable reference to the data flow graph that will hold the constructed instructions.
source§

fn data_flow_graph_mut(&mut self) -> &mut DataFlowGraph

Get a mutable reference to the data flow graph that will hold the constructed instructions.
source§

fn build( self, data: InstructionData, ctrl_typevar: Type ) -> (Inst, &'f mut DataFlowGraph)

Insert an instruction and return a reference to it, consuming the builder. Read more

Auto Trait Implementations§

§

impl<'f, IIB> RefUnwindSafe for InsertBuilder<'f, IIB>where IIB: RefUnwindSafe,

§

impl<'f, IIB> Send for InsertBuilder<'f, IIB>where IIB: Send,

§

impl<'f, IIB> Sync for InsertBuilder<'f, IIB>where IIB: Sync,

§

impl<'f, IIB> Unpin for InsertBuilder<'f, IIB>where IIB: Unpin,

§

impl<'f, IIB> UnwindSafe for InsertBuilder<'f, IIB>where IIB: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<'f, T> InstBuilder<'f> for Twhere T: InstBuilderBase<'f>,

source§

fn jump(self, block: Block, args: &[Value]) -> Inst

Jump. Read more
source§

fn brz(self, c: Value, block: Block, args: &[Value]) -> Inst

Branch when zero. Read more
source§

fn brnz(self, c: Value, block: Block, args: &[Value]) -> Inst

Branch when non-zero. Read more
source§

fn br_icmp<T1: Into<IntCC>>( self, Cond: T1, x: Value, y: Value, block: Block, args: &[Value] ) -> Inst

Compare scalar integers and branch. Read more
source§

fn brif<T1: Into<IntCC>>( self, Cond: T1, f: Value, block: Block, args: &[Value] ) -> Inst

Branch when condition is true in integer CPU flags. Read more
source§

fn brff<T1: Into<FloatCC>>( self, Cond: T1, f: Value, block: Block, args: &[Value] ) -> Inst

Branch when condition is true in floating point CPU flags. Read more
source§

fn br_table(self, x: Value, block: Block, JT: JumpTable) -> Inst

Indirect branch via jump table. Read more
source§

fn debugtrap(self) -> Inst

Encodes an assembly debug trap.
source§

fn trap<T1: Into<TrapCode>>(self, code: T1) -> Inst

Terminate execution unconditionally. Read more
source§

fn trapz<T1: Into<TrapCode>>(self, c: Value, code: T1) -> Inst

Trap when zero. Read more
source§

fn resumable_trap<T1: Into<TrapCode>>(self, code: T1) -> Inst

A resumable trap. Read more
source§

fn trapnz<T1: Into<TrapCode>>(self, c: Value, code: T1) -> Inst

Trap when non-zero. Read more
source§

fn resumable_trapnz<T1: Into<TrapCode>>(self, c: Value, code: T1) -> Inst

A resumable trap to be called when the passed condition is non-zero. Read more
source§

fn trapif<T1: Into<IntCC>, T2: Into<TrapCode>>( self, Cond: T1, f: Value, code: T2 ) -> Inst

Trap when condition is true in integer CPU flags. Read more
source§

fn trapff<T1: Into<FloatCC>, T2: Into<TrapCode>>( self, Cond: T1, f: Value, code: T2 ) -> Inst

Trap when condition is true in floating point CPU flags. Read more
source§

fn return_(self, rvals: &[Value]) -> Inst

Return from the function. Read more
source§

fn call(self, FN: FuncRef, args: &[Value]) -> Inst

Direct function call. Read more
source§

fn call_indirect(self, SIG: SigRef, callee: Value, args: &[Value]) -> Inst

Indirect function call. Read more
source§

fn func_addr(self, iAddr: Type, FN: FuncRef) -> Value

Get the address of a function. Read more
source§

fn splat(self, TxN: Type, x: Value) -> Value

Vector splat. Read more
source§

fn swizzle(self, TxN: Type, x: Value, y: Value) -> Value

Vector swizzle. Read more
source§

fn insertlane<T1: Into<Uimm8>>(self, x: Value, y: Value, Idx: T1) -> Value

Insert y as lane Idx in x. Read more
source§

fn extractlane<T1: Into<Uimm8>>(self, x: Value, Idx: T1) -> Value

Extract lane Idx from x. Read more
source§

fn imin(self, x: Value, y: Value) -> Value

Signed integer minimum. Read more
source§

fn umin(self, x: Value, y: Value) -> Value

Unsigned integer minimum. Read more
source§

fn imax(self, x: Value, y: Value) -> Value

Signed integer maximum. Read more
source§

fn umax(self, x: Value, y: Value) -> Value

Unsigned integer maximum. Read more
source§

fn avg_round(self, x: Value, y: Value) -> Value

Unsigned average with rounding: a := (x + y + 1) // 2 Read more
source§

fn uadd_sat(self, x: Value, y: Value) -> Value

Add with unsigned saturation. Read more
source§

fn sadd_sat(self, x: Value, y: Value) -> Value

Add with signed saturation. Read more
source§

fn usub_sat(self, x: Value, y: Value) -> Value

Subtract with unsigned saturation. Read more
source§

fn ssub_sat(self, x: Value, y: Value) -> Value

Subtract with signed saturation. Read more
source§

fn load<T1: Into<MemFlags>, T2: Into<Offset32>>( self, Mem: Type, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load from memory at p + Offset. Read more
source§

fn store<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, x: Value, p: Value, Offset: T2 ) -> Inst

Store x to memory at p + Offset. Read more
source§

fn uload8<T1: Into<MemFlags>, T2: Into<Offset32>>( self, iExt8: Type, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load 8 bits from memory at p + Offset and zero-extend. Read more
source§

fn sload8<T1: Into<MemFlags>, T2: Into<Offset32>>( self, iExt8: Type, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load 8 bits from memory at p + Offset and sign-extend. Read more
source§

fn istore8<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, x: Value, p: Value, Offset: T2 ) -> Inst

Store the low 8 bits of x to memory at p + Offset. Read more
source§

fn uload16<T1: Into<MemFlags>, T2: Into<Offset32>>( self, iExt16: Type, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load 16 bits from memory at p + Offset and zero-extend. Read more
source§

fn sload16<T1: Into<MemFlags>, T2: Into<Offset32>>( self, iExt16: Type, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load 16 bits from memory at p + Offset and sign-extend. Read more
source§

fn istore16<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, x: Value, p: Value, Offset: T2 ) -> Inst

Store the low 16 bits of x to memory at p + Offset. Read more
source§

fn uload32<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load 32 bits from memory at p + Offset and zero-extend. Read more
source§

fn sload32<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load 32 bits from memory at p + Offset and sign-extend. Read more
source§

fn istore32<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, x: Value, p: Value, Offset: T2 ) -> Inst

Store the low 32 bits of x to memory at p + Offset. Read more
source§

fn uload8x8<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load an 8x8 vector (64 bits) from memory at p + Offset and zero-extend into an i16x8 vector. Read more
source§

fn sload8x8<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load an 8x8 vector (64 bits) from memory at p + Offset and sign-extend into an i16x8 vector. Read more
source§

fn uload16x4<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load a 16x4 vector (64 bits) from memory at p + Offset and zero-extend into an i32x4 vector. Read more
source§

fn sload16x4<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load a 16x4 vector (64 bits) from memory at p + Offset and sign-extend into an i32x4 vector. Read more
source§

fn uload32x2<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load an 32x2 vector (64 bits) from memory at p + Offset and zero-extend into an i64x2 vector. Read more
source§

fn sload32x2<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value

Load a 32x2 vector (64 bits) from memory at p + Offset and sign-extend into an i64x2 vector. Read more
source§

fn stack_load<T1: Into<Offset32>>( self, Mem: Type, SS: StackSlot, Offset: T1 ) -> Value

Load a value from a stack slot at the constant offset. Read more
source§

fn stack_store<T1: Into<Offset32>>( self, x: Value, SS: StackSlot, Offset: T1 ) -> Inst

Store a value to a stack slot at a constant offset. Read more
source§

fn stack_addr<T1: Into<Offset32>>( self, iAddr: Type, SS: StackSlot, Offset: T1 ) -> Value

Get the address of a stack slot. Read more
source§

fn dynamic_stack_load(self, Mem: Type, DSS: DynamicStackSlot) -> Value

Load a value from a dynamic stack slot. Read more
source§

fn dynamic_stack_store(self, x: Value, DSS: DynamicStackSlot) -> Inst

Store a value to a dynamic stack slot. Read more
source§

fn dynamic_stack_addr(self, iAddr: Type, DSS: DynamicStackSlot) -> Value

Get the address of a dynamic stack slot. Read more
source§

fn global_value(self, Mem: Type, GV: GlobalValue) -> Value

Compute the value of global GV. Read more
source§

fn symbol_value(self, Mem: Type, GV: GlobalValue) -> Value

Compute the value of global GV, which is a symbolic value. Read more
source§

fn tls_value(self, Mem: Type, GV: GlobalValue) -> Value

Compute the value of global GV, which is a TLS (thread local storage) value. Read more
source§

fn heap_addr<T1: Into<Uimm32>>( self, iAddr: Type, H: Heap, p: Value, Size: T1 ) -> Value

Bounds check and compute absolute address of heap memory. Read more
source§

fn get_pinned_reg(self, iAddr: Type) -> Value

Gets the content of the pinned register, when it’s enabled. Read more
source§

fn set_pinned_reg(self, addr: Value) -> Inst

Sets the content of the pinned register, when it’s enabled. Read more
source§

fn get_frame_pointer(self, iAddr: Type) -> Value

Get the address in the frame pointer register. Read more
source§

fn get_stack_pointer(self, iAddr: Type) -> Value

Get the address in the stack pointer register. Read more
source§

fn get_return_address(self, iAddr: Type) -> Value

Get the PC where this function will transfer control to when it returns. Read more
source§

fn table_addr<T1: Into<Offset32>>( self, iAddr: Type, T: Table, p: Value, Offset: T1 ) -> Value

Bounds check and compute absolute address of a table entry. Read more
source§

fn iconst<T1: Into<Imm64>>(self, Int: Type, N: T1) -> Value

Integer constant. Read more
source§

fn f32const<T1: Into<Ieee32>>(self, N: T1) -> Value

Floating point constant. Read more
source§

fn f64const<T1: Into<Ieee64>>(self, N: T1) -> Value

Floating point constant. Read more
source§

fn bconst<T1: Into<bool>>(self, Bool: Type, N: T1) -> Value

Boolean constant. Read more
source§

fn vconst<T1: Into<Constant>>(self, TxN: Type, N: T1) -> Value

SIMD vector constant. Read more
source§

fn shuffle<T1: Into<Immediate>>(self, a: Value, b: Value, mask: T1) -> Value

SIMD vector shuffle. Read more
source§

fn null(self, Ref: Type) -> Value

Null constant value for reference types. Read more
source§

fn nop(self) -> Inst

Just a dummy instruction. Read more
source§

fn select(self, c: Value, x: Value, y: Value) -> Value

Conditional select. Read more
source§

fn selectif<T1: Into<IntCC>>( self, Any: Type, cc: T1, flags: Value, x: Value, y: Value ) -> Value

Conditional select, dependent on integer condition codes. Read more
source§

fn selectif_spectre_guard<T1: Into<IntCC>>( self, Any: Type, cc: T1, flags: Value, x: Value, y: Value ) -> Value

Conditional select intended for Spectre guards. Read more
source§

fn bitselect(self, c: Value, x: Value, y: Value) -> Value

Conditional select of bits. Read more
source§

fn copy(self, x: Value) -> Value

Register-register copy. Read more
source§

fn vsplit(self, x: Value) -> (Value, Value)

Split a vector into two halves. Read more
source§

fn vconcat(self, x: Value, y: Value) -> Value

Vector concatenation. Read more
source§

fn vselect(self, c: Value, x: Value, y: Value) -> Value

Vector lane select. Read more
source§

fn vany_true(self, a: Value) -> Value

Reduce a vector to a scalar boolean. Read more
source§

fn vall_true(self, a: Value) -> Value

Reduce a vector to a scalar boolean. Read more
source§

fn vhigh_bits(self, Int: Type, a: Value) -> Value

Reduce a vector to a scalar integer. Read more
source§

fn icmp<T1: Into<IntCC>>(self, Cond: T1, x: Value, y: Value) -> Value

Integer comparison. Read more
source§

fn icmp_imm<T1: Into<IntCC>, T2: Into<Imm64>>( self, Cond: T1, x: Value, Y: T2 ) -> Value

Compare scalar integer to a constant. Read more
source§

fn ifcmp(self, x: Value, y: Value) -> Value

Compare scalar integers and return flags. Read more
source§

fn ifcmp_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Compare scalar integer to a constant and return flags. Read more
source§

fn iadd(self, x: Value, y: Value) -> Value

Wrapping integer addition: a := x + y \pmod{2^B}. Read more
source§

fn isub(self, x: Value, y: Value) -> Value

Wrapping integer subtraction: a := x - y \pmod{2^B}. Read more
source§

fn ineg(self, x: Value) -> Value

Integer negation: a := -x \pmod{2^B}. Read more
source§

fn iabs(self, x: Value) -> Value

Integer absolute value with wrapping: a := |x|. Read more
source§

fn imul(self, x: Value, y: Value) -> Value

Wrapping integer multiplication: a := x y \pmod{2^B}. Read more
source§

fn umulhi(self, x: Value, y: Value) -> Value

Unsigned integer multiplication, producing the high half of a double-length result. Read more
source§

fn smulhi(self, x: Value, y: Value) -> Value

Signed integer multiplication, producing the high half of a double-length result. Read more
source§

fn sqmul_round_sat(self, x: Value, y: Value) -> Value

Fixed-point multiplication of numbers in the QN format, where N + 1 is the number bitwidth: a := signed_saturate((x * y + 1 << (Q - 1)) >> Q) Read more
source§

fn udiv(self, x: Value, y: Value) -> Value

Unsigned integer division: a := \lfloor {x \over y} \rfloor. Read more
source§

fn sdiv(self, x: Value, y: Value) -> Value

Signed integer division rounded toward zero: a := sign(xy) \lfloor {|x| \over |y|}\rfloor. Read more
source§

fn urem(self, x: Value, y: Value) -> Value

Unsigned integer remainder. Read more
source§

fn srem(self, x: Value, y: Value) -> Value

Signed integer remainder. The result has the sign of the dividend. Read more
source§

fn iadd_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Add immediate integer. Read more
source§

fn imul_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Integer multiplication by immediate constant. Read more
source§

fn udiv_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Unsigned integer division by an immediate constant. Read more
source§

fn sdiv_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Signed integer division by an immediate constant. Read more
source§

fn urem_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Unsigned integer remainder with immediate divisor. Read more
source§

fn srem_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Signed integer remainder with immediate divisor. Read more
source§

fn irsub_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Immediate reverse wrapping subtraction: a := Y - x \pmod{2^B}. Read more
source§

fn iadd_cin(self, x: Value, y: Value, c_in: Value) -> Value

Add integers with carry in. Read more
source§

fn iadd_ifcin(self, x: Value, y: Value, c_in: Value) -> Value

Add integers with carry in. Read more
source§

fn iadd_cout(self, x: Value, y: Value) -> (Value, Value)

Add integers with carry out. Read more
source§

fn iadd_ifcout(self, x: Value, y: Value) -> (Value, Value)

Add integers with carry out. Read more
source§

fn iadd_carry(self, x: Value, y: Value, c_in: Value) -> (Value, Value)

Add integers with carry in and out. Read more
source§

fn iadd_ifcarry(self, x: Value, y: Value, c_in: Value) -> (Value, Value)

Add integers with carry in and out. Read more
source§

fn isub_bin(self, x: Value, y: Value, b_in: Value) -> Value

Subtract integers with borrow in. Read more
source§

fn isub_ifbin(self, x: Value, y: Value, b_in: Value) -> Value

Subtract integers with borrow in. Read more
source§

fn isub_bout(self, x: Value, y: Value) -> (Value, Value)

Subtract integers with borrow out. Read more
source§

fn isub_ifbout(self, x: Value, y: Value) -> (Value, Value)

Subtract integers with borrow out. Read more
source§

fn isub_borrow(self, x: Value, y: Value, b_in: Value) -> (Value, Value)

Subtract integers with borrow in and out. Read more
source§

fn isub_ifborrow(self, x: Value, y: Value, b_in: Value) -> (Value, Value)

Subtract integers with borrow in and out. Read more
source§

fn band(self, x: Value, y: Value) -> Value

Bitwise and. Read more
source§

fn bor(self, x: Value, y: Value) -> Value

Bitwise or. Read more
source§

fn bxor(self, x: Value, y: Value) -> Value

Bitwise xor. Read more
source§

fn bnot(self, x: Value) -> Value

Bitwise not. Read more
source§

fn band_not(self, x: Value, y: Value) -> Value

Bitwise and not. Read more
source§

fn bor_not(self, x: Value, y: Value) -> Value

Bitwise or not. Read more
source§

fn bxor_not(self, x: Value, y: Value) -> Value

Bitwise xor not. Read more
source§

fn band_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Bitwise and with immediate. Read more
source§

fn bor_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Bitwise or with immediate. Read more
source§

fn bxor_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Bitwise xor with immediate. Read more
source§

fn rotl(self, x: Value, y: Value) -> Value

Rotate left. Read more
source§

fn rotr(self, x: Value, y: Value) -> Value

Rotate right. Read more
source§

fn rotl_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Rotate left by immediate. Read more
source§

fn rotr_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Rotate right by immediate. Read more
source§

fn ishl(self, x: Value, y: Value) -> Value

Integer shift left. Shift the bits in x towards the MSB by y places. Shift in zero bits to the LSB. Read more
source§

fn ushr(self, x: Value, y: Value) -> Value

Unsigned shift right. Shift bits in x towards the LSB by y places, shifting in zero bits to the MSB. Also called a logical shift. Read more
source§

fn sshr(self, x: Value, y: Value) -> Value

Signed shift right. Shift bits in x towards the LSB by y places, shifting in sign bits to the MSB. Also called an arithmetic shift. Read more
source§

fn ishl_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Integer shift left by immediate. Read more
source§

fn ushr_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Unsigned shift right by immediate. Read more
source§

fn sshr_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value

Signed shift right by immediate. Read more
source§

fn bitrev(self, x: Value) -> Value

Reverse the bits of a integer. Read more
source§

fn clz(self, x: Value) -> Value

Count leading zero bits. Read more
source§

fn cls(self, x: Value) -> Value

Count leading sign bits. Read more
source§

fn ctz(self, x: Value) -> Value

Count trailing zeros. Read more
source§

fn popcnt(self, x: Value) -> Value

Population count Read more
source§

fn fcmp<T1: Into<FloatCC>>(self, Cond: T1, x: Value, y: Value) -> Value

Floating point comparison. Read more
source§

fn ffcmp(self, x: Value, y: Value) -> Value

Floating point comparison returning flags. Read more
source§

fn fadd(self, x: Value, y: Value) -> Value

Floating point addition. Read more
source§

fn fsub(self, x: Value, y: Value) -> Value

Floating point subtraction. Read more
source§

fn fmul(self, x: Value, y: Value) -> Value

Floating point multiplication. Read more
source§

fn fdiv(self, x: Value, y: Value) -> Value

Floating point division. Read more
source§

fn sqrt(self, x: Value) -> Value

Floating point square root. Read more
source§

fn fma(self, x: Value, y: Value, z: Value) -> Value

Floating point fused multiply-and-add. Read more
source§

fn fneg(self, x: Value) -> Value

Floating point negation. Read more
source§

fn fabs(self, x: Value) -> Value

Floating point absolute value. Read more
source§

fn fcopysign(self, x: Value, y: Value) -> Value

Floating point copy sign. Read more
source§

fn fmin(self, x: Value, y: Value) -> Value

Floating point minimum, propagating NaNs using the WebAssembly rules. Read more
source§

fn fmin_pseudo(self, x: Value, y: Value) -> Value

Floating point pseudo-minimum, propagating NaNs. This behaves differently from fmin. See https://github.com/WebAssembly/simd/pull/122 for background. Read more
source§

fn fmax(self, x: Value, y: Value) -> Value

Floating point maximum, propagating NaNs using the WebAssembly rules. Read more
source§

fn fmax_pseudo(self, x: Value, y: Value) -> Value

Floating point pseudo-maximum, propagating NaNs. This behaves differently from fmax. See https://github.com/WebAssembly/simd/pull/122 for background. Read more
source§

fn ceil(self, x: Value) -> Value

Round floating point round to integral, towards positive infinity. Read more
source§

fn floor(self, x: Value) -> Value

Round floating point round to integral, towards negative infinity. Read more
source§

fn trunc(self, x: Value) -> Value

Round floating point round to integral, towards zero. Read more
source§

fn nearest(self, x: Value) -> Value

Round floating point round to integral, towards nearest with ties to even. Read more
source§

fn is_null(self, x: Value) -> Value

Reference verification. Read more
source§

fn is_invalid(self, x: Value) -> Value

Reference verification. Read more
source§

fn trueif<T1: Into<IntCC>>(self, Cond: T1, f: Value) -> Value

Test integer CPU flags for a specific condition. Read more
source§

fn trueff<T1: Into<FloatCC>>(self, Cond: T1, f: Value) -> Value

Test floating point CPU flags for a specific condition. Read more
source§

fn bitcast(self, MemTo: Type, x: Value) -> Value

Reinterpret the bits in x as a different type. Read more
source§

fn raw_bitcast(self, AnyTo: Type, x: Value) -> Value

Cast the bits in x as a different type of the same bit width. Read more
source§

fn scalar_to_vector(self, TxN: Type, s: Value) -> Value

Copies a scalar value to a vector value. The scalar is copied into the least significant lane of the vector, and all other lanes will be zero. Read more
source§

fn breduce(self, BoolTo: Type, x: Value) -> Value

Convert x to a smaller boolean type by discarding the most significant bits. Read more
source§

fn bextend(self, BoolTo: Type, x: Value) -> Value

Convert x to a larger boolean type Read more
source§

fn bint(self, IntTo: Type, x: Value) -> Value

Convert x to an integer. Read more
source§

fn bmask(self, IntTo: Type, x: Value) -> Value

Convert x to an integer mask. Read more
source§

fn ireduce(self, IntTo: Type, x: Value) -> Value

Convert x to a smaller integer type by discarding the most significant bits. Read more
source§

fn snarrow(self, x: Value, y: Value) -> Value

Combine x and y into a vector with twice the lanes but half the integer width while saturating overflowing values to the signed maximum and minimum. Read more
source§

fn unarrow(self, x: Value, y: Value) -> Value

Combine x and y into a vector with twice the lanes but half the integer width while saturating overflowing values to the unsigned maximum and minimum. Read more
source§

fn uunarrow(self, x: Value, y: Value) -> Value

Combine x and y into a vector with twice the lanes but half the integer width while saturating overflowing values to the unsigned maximum and minimum. Read more
source§

fn swiden_low(self, x: Value) -> Value

Widen the low lanes of x using signed extension. Read more
source§

fn swiden_high(self, x: Value) -> Value

Widen the high lanes of x using signed extension. Read more
source§

fn uwiden_low(self, x: Value) -> Value

Widen the low lanes of x using unsigned extension. Read more
source§

fn uwiden_high(self, x: Value) -> Value

Widen the high lanes of x using unsigned extension. Read more
source§

fn iadd_pairwise(self, x: Value, y: Value) -> Value

Does lane-wise integer pairwise addition on two operands, putting the combined results into a single vector result. Here a pair refers to adjacent lanes in a vector, i.e. i2 + (i2+1) for i == num_lanes/2. The first operand pairwise add results will make up the low half of the resulting vector while the second operand pairwise add results will make up the upper half of the resulting vector. Read more
source§

fn widening_pairwise_dot_product_s(self, x: Value, y: Value) -> Value

Takes corresponding elements in x and y, performs a sign-extending length-doubling multiplication on them, then adds adjacent pairs of elements to form the result. For example, if the input vectors are [x3, x2, x1, x0] and [y3, y2, y1, y0], it produces the vector [r1, r0], where r1 = sx(x3) * sx(y3) + sx(x2) * sx(y2) and r0 = sx(x1) * sx(y1) + sx(x0) * sx(y0), and sx(n) sign-extends n to twice its width. Read more
source§

fn uextend(self, IntTo: Type, x: Value) -> Value

Convert x to a larger integer type by zero-extending. Read more
source§

fn sextend(self, IntTo: Type, x: Value) -> Value

Convert x to a larger integer type by sign-extending. Read more
source§

fn fpromote(self, FloatTo: Type, x: Value) -> Value

Convert x to a larger floating point format. Read more
source§

fn fdemote(self, FloatTo: Type, x: Value) -> Value

Convert x to a smaller floating point format. Read more
source§

fn fvdemote(self, x: Value) -> Value

Convert x to a smaller floating point format. Read more
source§

fn fvpromote_low(self, a: Value) -> Value

Converts packed single precision floating point to packed double precision floating point. Read more
source§

fn fcvt_to_uint(self, IntTo: Type, x: Value) -> Value

Converts floating point scalars to unsigned integer. Read more
source§

fn fcvt_to_sint(self, IntTo: Type, x: Value) -> Value

Converts floating point scalars to signed integer. Read more
source§

fn fcvt_to_uint_sat(self, IntTo: Type, x: Value) -> Value

Convert floating point to unsigned integer as fcvt_to_uint does, but saturates the input instead of trapping. NaN and negative values are converted to 0. Read more
source§

fn fcvt_to_sint_sat(self, IntTo: Type, x: Value) -> Value

Convert floating point to signed integer as fcvt_to_sint does, but saturates the input instead of trapping. NaN values are converted to 0. Read more
source§

fn fcvt_from_uint(self, FloatTo: Type, x: Value) -> Value

Convert unsigned integer to floating point. Read more
source§

fn fcvt_from_sint(self, FloatTo: Type, x: Value) -> Value

Convert signed integer to floating point. Read more
source§

fn fcvt_low_from_sint(self, FloatTo: Type, x: Value) -> Value

Converts packed signed 32-bit integers to packed double precision floating point. Read more
source§

fn isplit(self, x: Value) -> (Value, Value)

Split an integer into low and high parts. Read more
source§

fn iconcat(self, lo: Value, hi: Value) -> Value

Concatenate low and high bits to form a larger integer type. Read more
source§

fn atomic_rmw<T1: Into<MemFlags>, T2: Into<AtomicRmwOp>>( self, AtomicMem: Type, MemFlags: T1, AtomicRmwOp: T2, p: Value, x: Value ) -> Value

Atomically read-modify-write memory at p, with second operand x. The old value is returned. p has the type of the target word size, and x may be an integer type of 8, 16, 32 or 64 bits, even on a 32-bit target. The type of the returned value is the same as the type of x. This operation is sequentially consistent and creates happens-before edges that order normal (non-atomic) loads and stores. Read more
source§

fn atomic_cas<T1: Into<MemFlags>>( self, MemFlags: T1, p: Value, e: Value, x: Value ) -> Value

Perform an atomic compare-and-swap operation on memory at p, with expected value e, storing x if the value at p equals e. The old value at p is returned, regardless of whether the operation succeeds or fails. p has the type of the target word size, and x and e must have the same type and the same size, which may be an integer type of 8, 16, 32 or 64 bits, even on a 32-bit target. The type of the returned value is the same as the type of x and e. This operation is sequentially consistent and creates happens-before edges that order normal (non-atomic) loads and stores. Read more
source§

fn atomic_load<T1: Into<MemFlags>>( self, AtomicMem: Type, MemFlags: T1, p: Value ) -> Value

Atomically load from memory at p. Read more
source§

fn atomic_store<T1: Into<MemFlags>>( self, MemFlags: T1, x: Value, p: Value ) -> Inst

Atomically store x to memory at p. Read more
source§

fn fence(self) -> Inst

A memory fence. This must provide ordering to ensure that, at a minimum, neither loads nor stores of any kind may move forwards or backwards across the fence. This operation is sequentially consistent.
source§

fn extract_vector<T1: Into<Uimm8>>(self, x: Value, y: T1) -> Value

Return a fixed length sub vector, extracted from a dynamic vector. Read more
source§

fn AtomicCas( self, opcode: Opcode, ctrl_typevar: Type, flags: MemFlags, arg0: Value, arg1: Value, arg2: Value ) -> (Inst, &'f mut DataFlowGraph)

AtomicCas(imms=(flags: ir::MemFlags), vals=3)
source§

fn AtomicRmw( self, opcode: Opcode, ctrl_typevar: Type, flags: MemFlags, op: AtomicRmwOp, arg0: Value, arg1: Value ) -> (Inst, &'f mut DataFlowGraph)

AtomicRmw(imms=(flags: ir::MemFlags, op: ir::AtomicRmwOp), vals=2)
source§

fn Binary( self, opcode: Opcode, ctrl_typevar: Type, arg0: Value, arg1: Value ) -> (Inst, &'f mut DataFlowGraph)

Binary(imms=(), vals=2)
source§

fn BinaryImm64( self, opcode: Opcode, ctrl_typevar: Type, imm: Imm64, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

BinaryImm64(imms=(imm: ir::immediates::Imm64), vals=1)
source§

fn BinaryImm8( self, opcode: Opcode, ctrl_typevar: Type, imm: Uimm8, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

BinaryImm8(imms=(imm: ir::immediates::Uimm8), vals=1)
source§

fn Branch( self, opcode: Opcode, ctrl_typevar: Type, destination: Block, args: ValueList ) -> (Inst, &'f mut DataFlowGraph)

Branch(imms=(destination: ir::Block), vals=1)
source§

fn BranchFloat( self, opcode: Opcode, ctrl_typevar: Type, cond: FloatCC, destination: Block, args: ValueList ) -> (Inst, &'f mut DataFlowGraph)

BranchFloat(imms=(cond: ir::condcodes::FloatCC, destination: ir::Block), vals=1)
source§

fn BranchIcmp( self, opcode: Opcode, ctrl_typevar: Type, cond: IntCC, destination: Block, args: ValueList ) -> (Inst, &'f mut DataFlowGraph)

BranchIcmp(imms=(cond: ir::condcodes::IntCC, destination: ir::Block), vals=2)
source§

fn BranchInt( self, opcode: Opcode, ctrl_typevar: Type, cond: IntCC, destination: Block, args: ValueList ) -> (Inst, &'f mut DataFlowGraph)

BranchInt(imms=(cond: ir::condcodes::IntCC, destination: ir::Block), vals=1)
source§

fn BranchTable( self, opcode: Opcode, ctrl_typevar: Type, destination: Block, table: JumpTable, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

BranchTable(imms=(destination: ir::Block, table: ir::JumpTable), vals=1)
source§

fn Call( self, opcode: Opcode, ctrl_typevar: Type, func_ref: FuncRef, args: ValueList ) -> (Inst, &'f mut DataFlowGraph)

Call(imms=(func_ref: ir::FuncRef), vals=0)
source§

fn CallIndirect( self, opcode: Opcode, ctrl_typevar: Type, sig_ref: SigRef, args: ValueList ) -> (Inst, &'f mut DataFlowGraph)

CallIndirect(imms=(sig_ref: ir::SigRef), vals=1)
source§

fn CondTrap( self, opcode: Opcode, ctrl_typevar: Type, code: TrapCode, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

CondTrap(imms=(code: ir::TrapCode), vals=1)
source§

fn DynamicStackLoad( self, opcode: Opcode, ctrl_typevar: Type, dynamic_stack_slot: DynamicStackSlot ) -> (Inst, &'f mut DataFlowGraph)

DynamicStackLoad(imms=(dynamic_stack_slot: ir::DynamicStackSlot), vals=0)
source§

fn DynamicStackStore( self, opcode: Opcode, ctrl_typevar: Type, dynamic_stack_slot: DynamicStackSlot, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

DynamicStackStore(imms=(dynamic_stack_slot: ir::DynamicStackSlot), vals=1)
source§

fn FloatCompare( self, opcode: Opcode, ctrl_typevar: Type, cond: FloatCC, arg0: Value, arg1: Value ) -> (Inst, &'f mut DataFlowGraph)

FloatCompare(imms=(cond: ir::condcodes::FloatCC), vals=2)
source§

fn FloatCond( self, opcode: Opcode, ctrl_typevar: Type, cond: FloatCC, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

FloatCond(imms=(cond: ir::condcodes::FloatCC), vals=1)
source§

fn FloatCondTrap( self, opcode: Opcode, ctrl_typevar: Type, cond: FloatCC, code: TrapCode, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

FloatCondTrap(imms=(cond: ir::condcodes::FloatCC, code: ir::TrapCode), vals=1)
source§

fn FuncAddr( self, opcode: Opcode, ctrl_typevar: Type, func_ref: FuncRef ) -> (Inst, &'f mut DataFlowGraph)

FuncAddr(imms=(func_ref: ir::FuncRef), vals=0)
source§

fn HeapAddr( self, opcode: Opcode, ctrl_typevar: Type, heap: Heap, imm: Uimm32, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

HeapAddr(imms=(heap: ir::Heap, imm: ir::immediates::Uimm32), vals=1)
source§

fn IntCompare( self, opcode: Opcode, ctrl_typevar: Type, cond: IntCC, arg0: Value, arg1: Value ) -> (Inst, &'f mut DataFlowGraph)

IntCompare(imms=(cond: ir::condcodes::IntCC), vals=2)
source§

fn IntCompareImm( self, opcode: Opcode, ctrl_typevar: Type, cond: IntCC, imm: Imm64, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

IntCompareImm(imms=(cond: ir::condcodes::IntCC, imm: ir::immediates::Imm64), vals=1)
source§

fn IntCond( self, opcode: Opcode, ctrl_typevar: Type, cond: IntCC, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

IntCond(imms=(cond: ir::condcodes::IntCC), vals=1)
source§

fn IntCondTrap( self, opcode: Opcode, ctrl_typevar: Type, cond: IntCC, code: TrapCode, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

IntCondTrap(imms=(cond: ir::condcodes::IntCC, code: ir::TrapCode), vals=1)
source§

fn IntSelect( self, opcode: Opcode, ctrl_typevar: Type, cond: IntCC, arg0: Value, arg1: Value, arg2: Value ) -> (Inst, &'f mut DataFlowGraph)

IntSelect(imms=(cond: ir::condcodes::IntCC), vals=3)
source§

fn Jump( self, opcode: Opcode, ctrl_typevar: Type, destination: Block, args: ValueList ) -> (Inst, &'f mut DataFlowGraph)

Jump(imms=(destination: ir::Block), vals=0)
source§

fn Load( self, opcode: Opcode, ctrl_typevar: Type, flags: MemFlags, offset: Offset32, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

Load(imms=(flags: ir::MemFlags, offset: ir::immediates::Offset32), vals=1)
source§

fn LoadNoOffset( self, opcode: Opcode, ctrl_typevar: Type, flags: MemFlags, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

LoadNoOffset(imms=(flags: ir::MemFlags), vals=1)
source§

fn MultiAry( self, opcode: Opcode, ctrl_typevar: Type, args: ValueList ) -> (Inst, &'f mut DataFlowGraph)

MultiAry(imms=(), vals=0)
source§

fn NullAry( self, opcode: Opcode, ctrl_typevar: Type ) -> (Inst, &'f mut DataFlowGraph)

NullAry(imms=(), vals=0)
source§

fn Shuffle( self, opcode: Opcode, ctrl_typevar: Type, imm: Immediate, arg0: Value, arg1: Value ) -> (Inst, &'f mut DataFlowGraph)

Shuffle(imms=(imm: ir::Immediate), vals=2)
source§

fn StackLoad( self, opcode: Opcode, ctrl_typevar: Type, stack_slot: StackSlot, offset: Offset32 ) -> (Inst, &'f mut DataFlowGraph)

StackLoad(imms=(stack_slot: ir::StackSlot, offset: ir::immediates::Offset32), vals=0)
source§

fn StackStore( self, opcode: Opcode, ctrl_typevar: Type, stack_slot: StackSlot, offset: Offset32, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

StackStore(imms=(stack_slot: ir::StackSlot, offset: ir::immediates::Offset32), vals=1)
source§

fn Store( self, opcode: Opcode, ctrl_typevar: Type, flags: MemFlags, offset: Offset32, arg0: Value, arg1: Value ) -> (Inst, &'f mut DataFlowGraph)

Store(imms=(flags: ir::MemFlags, offset: ir::immediates::Offset32), vals=2)
source§

fn StoreNoOffset( self, opcode: Opcode, ctrl_typevar: Type, flags: MemFlags, arg0: Value, arg1: Value ) -> (Inst, &'f mut DataFlowGraph)

StoreNoOffset(imms=(flags: ir::MemFlags), vals=2)
source§

fn TableAddr( self, opcode: Opcode, ctrl_typevar: Type, table: Table, offset: Offset32, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

TableAddr(imms=(table: ir::Table, offset: ir::immediates::Offset32), vals=1)
source§

fn Ternary( self, opcode: Opcode, ctrl_typevar: Type, arg0: Value, arg1: Value, arg2: Value ) -> (Inst, &'f mut DataFlowGraph)

Ternary(imms=(), vals=3)
source§

fn TernaryImm8( self, opcode: Opcode, ctrl_typevar: Type, imm: Uimm8, arg0: Value, arg1: Value ) -> (Inst, &'f mut DataFlowGraph)

TernaryImm8(imms=(imm: ir::immediates::Uimm8), vals=2)
source§

fn Trap( self, opcode: Opcode, ctrl_typevar: Type, code: TrapCode ) -> (Inst, &'f mut DataFlowGraph)

Trap(imms=(code: ir::TrapCode), vals=0)
source§

fn Unary( self, opcode: Opcode, ctrl_typevar: Type, arg0: Value ) -> (Inst, &'f mut DataFlowGraph)

Unary(imms=(), vals=1)
source§

fn UnaryBool( self, opcode: Opcode, ctrl_typevar: Type, imm: bool ) -> (Inst, &'f mut DataFlowGraph)

UnaryBool(imms=(imm: bool), vals=0)
source§

fn UnaryConst( self, opcode: Opcode, ctrl_typevar: Type, constant_handle: Constant ) -> (Inst, &'f mut DataFlowGraph)

UnaryConst(imms=(constant_handle: ir::Constant), vals=0)
source§

fn UnaryGlobalValue( self, opcode: Opcode, ctrl_typevar: Type, global_value: GlobalValue ) -> (Inst, &'f mut DataFlowGraph)

UnaryGlobalValue(imms=(global_value: ir::GlobalValue), vals=0)
source§

fn UnaryIeee32( self, opcode: Opcode, ctrl_typevar: Type, imm: Ieee32 ) -> (Inst, &'f mut DataFlowGraph)

UnaryIeee32(imms=(imm: ir::immediates::Ieee32), vals=0)
source§

fn UnaryIeee64( self, opcode: Opcode, ctrl_typevar: Type, imm: Ieee64 ) -> (Inst, &'f mut DataFlowGraph)

UnaryIeee64(imms=(imm: ir::immediates::Ieee64), vals=0)
source§

fn UnaryImm( self, opcode: Opcode, ctrl_typevar: Type, imm: Imm64 ) -> (Inst, &'f mut DataFlowGraph)

UnaryImm(imms=(imm: ir::immediates::Imm64), vals=0)
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.