Struct cranelift_codegen::ir::InsertBuilder
source · 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>
impl<'f, IIB: InstInserterBase<'f>> InsertBuilder<'f, IIB>
sourcepub fn new(inserter: IIB) -> Self
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
.
sourcepub fn with_results<Array>(
self,
reuse: Array
) -> InsertReuseBuilder<'f, IIB, Array>where
Array: AsRef<[Option<Value>]>,
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>
.
sourcepub fn with_result(
self,
v: Value
) -> InsertReuseBuilder<'f, IIB, [Option<Value>; 1]>
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>
impl<'f, IIB: InstInserterBase<'f>> InstBuilderBase<'f> for InsertBuilder<'f, IIB>
source§fn data_flow_graph(&self) -> &DataFlowGraph
fn data_flow_graph(&self) -> &DataFlowGraph
source§fn data_flow_graph_mut(&mut self) -> &mut DataFlowGraph
fn data_flow_graph_mut(&mut self) -> &mut DataFlowGraph
source§fn build(
self,
data: InstructionData,
ctrl_typevar: Type
) -> (Inst, &'f mut DataFlowGraph)
fn build( self, data: InstructionData, ctrl_typevar: Type ) -> (Inst, &'f mut DataFlowGraph)
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<'f, T> InstBuilder<'f> for Twhere
T: InstBuilderBase<'f>,
impl<'f, T> InstBuilder<'f> for Twhere T: InstBuilderBase<'f>,
source§fn br_icmp<T1: Into<IntCC>>(
self,
Cond: T1,
x: Value,
y: Value,
block: Block,
args: &[Value]
) -> Inst
fn br_icmp<T1: Into<IntCC>>( self, Cond: T1, x: Value, y: Value, block: Block, args: &[Value] ) -> Inst
source§fn brif<T1: Into<IntCC>>(
self,
Cond: T1,
f: Value,
block: Block,
args: &[Value]
) -> Inst
fn brif<T1: Into<IntCC>>( self, Cond: T1, f: Value, block: Block, args: &[Value] ) -> Inst
source§fn brff<T1: Into<FloatCC>>(
self,
Cond: T1,
f: Value,
block: Block,
args: &[Value]
) -> Inst
fn brff<T1: Into<FloatCC>>( self, Cond: T1, f: Value, block: Block, args: &[Value] ) -> Inst
source§fn br_table(self, x: Value, block: Block, JT: JumpTable) -> Inst
fn br_table(self, x: Value, block: Block, JT: JumpTable) -> Inst
source§fn trap<T1: Into<TrapCode>>(self, code: T1) -> Inst
fn trap<T1: Into<TrapCode>>(self, code: T1) -> Inst
source§fn resumable_trapnz<T1: Into<TrapCode>>(self, c: Value, code: T1) -> Inst
fn resumable_trapnz<T1: Into<TrapCode>>(self, c: Value, code: T1) -> Inst
source§fn trapif<T1: Into<IntCC>, T2: Into<TrapCode>>(
self,
Cond: T1,
f: Value,
code: T2
) -> Inst
fn trapif<T1: Into<IntCC>, T2: Into<TrapCode>>( self, Cond: T1, f: Value, code: T2 ) -> Inst
source§fn trapff<T1: Into<FloatCC>, T2: Into<TrapCode>>(
self,
Cond: T1,
f: Value,
code: T2
) -> Inst
fn trapff<T1: Into<FloatCC>, T2: Into<TrapCode>>( self, Cond: T1, f: Value, code: T2 ) -> Inst
source§fn call_indirect(self, SIG: SigRef, callee: Value, args: &[Value]) -> Inst
fn call_indirect(self, SIG: SigRef, callee: Value, args: &[Value]) -> Inst
source§fn func_addr(self, iAddr: Type, FN: FuncRef) -> Value
fn func_addr(self, iAddr: Type, FN: FuncRef) -> Value
source§fn avg_round(self, x: Value, y: Value) -> Value
fn avg_round(self, x: Value, y: Value) -> Value
a := (x + y + 1) // 2
Read moresource§fn load<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
Mem: Type,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn load<T1: Into<MemFlags>, T2: Into<Offset32>>( self, Mem: Type, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
. Read moresource§fn store<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
x: Value,
p: Value,
Offset: T2
) -> Inst
fn store<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, x: Value, p: Value, Offset: T2 ) -> Inst
source§fn uload8<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
iExt8: Type,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn uload8<T1: Into<MemFlags>, T2: Into<Offset32>>( self, iExt8: Type, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and zero-extend. Read moresource§fn sload8<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
iExt8: Type,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn sload8<T1: Into<MemFlags>, T2: Into<Offset32>>( self, iExt8: Type, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and sign-extend. Read moresource§fn istore8<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
x: Value,
p: Value,
Offset: T2
) -> Inst
fn istore8<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, x: Value, p: Value, Offset: T2 ) -> Inst
source§fn uload16<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
iExt16: Type,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn uload16<T1: Into<MemFlags>, T2: Into<Offset32>>( self, iExt16: Type, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and zero-extend. Read moresource§fn sload16<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
iExt16: Type,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn sload16<T1: Into<MemFlags>, T2: Into<Offset32>>( self, iExt16: Type, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and sign-extend. Read moresource§fn istore16<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
x: Value,
p: Value,
Offset: T2
) -> Inst
fn istore16<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, x: Value, p: Value, Offset: T2 ) -> Inst
source§fn uload32<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn uload32<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and zero-extend. Read moresource§fn sload32<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn sload32<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and sign-extend. Read moresource§fn istore32<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
x: Value,
p: Value,
Offset: T2
) -> Inst
fn istore32<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, x: Value, p: Value, Offset: T2 ) -> Inst
source§fn uload8x8<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn uload8x8<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and zero-extend into an i16x8
vector. Read moresource§fn sload8x8<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn sload8x8<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and sign-extend into an i16x8
vector. Read moresource§fn uload16x4<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn uload16x4<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and zero-extend into an i32x4
vector. Read moresource§fn sload16x4<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn sload16x4<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and sign-extend into an i32x4
vector. Read moresource§fn uload32x2<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn uload32x2<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and zero-extend into an i64x2
vector. Read moresource§fn sload32x2<T1: Into<MemFlags>, T2: Into<Offset32>>(
self,
MemFlags: T1,
p: Value,
Offset: T2
) -> Value
fn sload32x2<T1: Into<MemFlags>, T2: Into<Offset32>>( self, MemFlags: T1, p: Value, Offset: T2 ) -> Value
p + Offset
and sign-extend into an i64x2
vector. Read moresource§fn stack_load<T1: Into<Offset32>>(
self,
Mem: Type,
SS: StackSlot,
Offset: T1
) -> Value
fn stack_load<T1: Into<Offset32>>( self, Mem: Type, SS: StackSlot, Offset: T1 ) -> Value
source§fn stack_store<T1: Into<Offset32>>(
self,
x: Value,
SS: StackSlot,
Offset: T1
) -> Inst
fn stack_store<T1: Into<Offset32>>( self, x: Value, SS: StackSlot, Offset: T1 ) -> Inst
source§fn stack_addr<T1: Into<Offset32>>(
self,
iAddr: Type,
SS: StackSlot,
Offset: T1
) -> Value
fn stack_addr<T1: Into<Offset32>>( self, iAddr: Type, SS: StackSlot, Offset: T1 ) -> Value
source§fn dynamic_stack_load(self, Mem: Type, DSS: DynamicStackSlot) -> Value
fn dynamic_stack_load(self, Mem: Type, DSS: DynamicStackSlot) -> Value
source§fn dynamic_stack_store(self, x: Value, DSS: DynamicStackSlot) -> Inst
fn dynamic_stack_store(self, x: Value, DSS: DynamicStackSlot) -> Inst
source§fn dynamic_stack_addr(self, iAddr: Type, DSS: DynamicStackSlot) -> Value
fn dynamic_stack_addr(self, iAddr: Type, DSS: DynamicStackSlot) -> Value
source§fn global_value(self, Mem: Type, GV: GlobalValue) -> Value
fn global_value(self, Mem: Type, GV: GlobalValue) -> Value
source§fn symbol_value(self, Mem: Type, GV: GlobalValue) -> Value
fn symbol_value(self, Mem: Type, GV: GlobalValue) -> Value
source§fn tls_value(self, Mem: Type, GV: GlobalValue) -> Value
fn tls_value(self, Mem: Type, GV: GlobalValue) -> Value
source§fn heap_addr<T1: Into<Uimm32>>(
self,
iAddr: Type,
H: Heap,
p: Value,
Size: T1
) -> Value
fn heap_addr<T1: Into<Uimm32>>( self, iAddr: Type, H: Heap, p: Value, Size: T1 ) -> Value
source§fn get_pinned_reg(self, iAddr: Type) -> Value
fn get_pinned_reg(self, iAddr: Type) -> Value
source§fn set_pinned_reg(self, addr: Value) -> Inst
fn set_pinned_reg(self, addr: Value) -> Inst
source§fn get_frame_pointer(self, iAddr: Type) -> Value
fn get_frame_pointer(self, iAddr: Type) -> Value
source§fn get_stack_pointer(self, iAddr: Type) -> Value
fn get_stack_pointer(self, iAddr: Type) -> Value
source§fn get_return_address(self, iAddr: Type) -> Value
fn get_return_address(self, iAddr: Type) -> Value
source§fn table_addr<T1: Into<Offset32>>(
self,
iAddr: Type,
T: Table,
p: Value,
Offset: T1
) -> Value
fn table_addr<T1: Into<Offset32>>( self, iAddr: Type, T: Table, p: Value, Offset: T1 ) -> Value
source§fn vconst<T1: Into<Constant>>(self, TxN: Type, N: T1) -> Value
fn vconst<T1: Into<Constant>>(self, TxN: Type, N: T1) -> Value
source§fn shuffle<T1: Into<Immediate>>(self, a: Value, b: Value, mask: T1) -> Value
fn shuffle<T1: Into<Immediate>>(self, a: Value, b: Value, mask: T1) -> Value
source§fn selectif<T1: Into<IntCC>>(
self,
Any: Type,
cc: T1,
flags: Value,
x: Value,
y: Value
) -> Value
fn selectif<T1: Into<IntCC>>( self, Any: Type, cc: T1, flags: Value, x: Value, y: Value ) -> Value
source§fn selectif_spectre_guard<T1: Into<IntCC>>(
self,
Any: Type,
cc: T1,
flags: Value,
x: Value,
y: Value
) -> Value
fn selectif_spectre_guard<T1: Into<IntCC>>( self, Any: Type, cc: T1, flags: Value, x: Value, y: Value ) -> Value
source§fn bitselect(self, c: Value, x: Value, y: Value) -> Value
fn bitselect(self, c: Value, x: Value, y: Value) -> Value
source§fn vhigh_bits(self, Int: Type, a: Value) -> Value
fn vhigh_bits(self, Int: Type, a: Value) -> Value
source§fn icmp<T1: Into<IntCC>>(self, Cond: T1, x: Value, y: Value) -> Value
fn icmp<T1: Into<IntCC>>(self, Cond: T1, x: Value, y: Value) -> Value
source§fn icmp_imm<T1: Into<IntCC>, T2: Into<Imm64>>(
self,
Cond: T1,
x: Value,
Y: T2
) -> Value
fn icmp_imm<T1: Into<IntCC>, T2: Into<Imm64>>( self, Cond: T1, x: Value, Y: T2 ) -> Value
source§fn ifcmp(self, x: Value, y: Value) -> Value
fn ifcmp(self, x: Value, y: Value) -> Value
source§fn ifcmp_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn ifcmp_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn iadd(self, x: Value, y: Value) -> Value
fn iadd(self, x: Value, y: Value) -> Value
a := x + y \pmod{2^B}
. Read moresource§fn isub(self, x: Value, y: Value) -> Value
fn isub(self, x: Value, y: Value) -> Value
a := x - y \pmod{2^B}
. Read moresource§fn imul(self, x: Value, y: Value) -> Value
fn imul(self, x: Value, y: Value) -> Value
a := x y \pmod{2^B}
. Read moresource§fn umulhi(self, x: Value, y: Value) -> Value
fn umulhi(self, x: Value, y: Value) -> Value
source§fn smulhi(self, x: Value, y: Value) -> Value
fn smulhi(self, x: Value, y: Value) -> Value
source§fn sqmul_round_sat(self, x: Value, y: Value) -> Value
fn sqmul_round_sat(self, x: Value, y: Value) -> Value
a := signed_saturate((x * y + 1 << (Q - 1)) >> Q)
Read moresource§fn udiv(self, x: Value, y: Value) -> Value
fn udiv(self, x: Value, y: Value) -> Value
a := \lfloor {x \over y} \rfloor
. Read moresource§fn sdiv(self, x: Value, y: Value) -> Value
fn sdiv(self, x: Value, y: Value) -> Value
a := sign(xy) \lfloor {|x| \over |y|}\rfloor
. Read moresource§fn srem(self, x: Value, y: Value) -> Value
fn srem(self, x: Value, y: Value) -> Value
source§fn imul_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn imul_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn udiv_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn udiv_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn sdiv_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn sdiv_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn urem_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn urem_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn srem_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn srem_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn irsub_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn irsub_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
a := Y - x \pmod{2^B}
. Read moresource§fn iadd_cin(self, x: Value, y: Value, c_in: Value) -> Value
fn iadd_cin(self, x: Value, y: Value, c_in: Value) -> Value
source§fn iadd_ifcin(self, x: Value, y: Value, c_in: Value) -> Value
fn iadd_ifcin(self, x: Value, y: Value, c_in: Value) -> Value
source§fn iadd_cout(self, x: Value, y: Value) -> (Value, Value)
fn iadd_cout(self, x: Value, y: Value) -> (Value, Value)
source§fn iadd_ifcout(self, x: Value, y: Value) -> (Value, Value)
fn iadd_ifcout(self, x: Value, y: Value) -> (Value, Value)
source§fn iadd_carry(self, x: Value, y: Value, c_in: Value) -> (Value, Value)
fn iadd_carry(self, x: Value, y: Value, c_in: Value) -> (Value, Value)
source§fn iadd_ifcarry(self, x: Value, y: Value, c_in: Value) -> (Value, Value)
fn iadd_ifcarry(self, x: Value, y: Value, c_in: Value) -> (Value, Value)
source§fn isub_bin(self, x: Value, y: Value, b_in: Value) -> Value
fn isub_bin(self, x: Value, y: Value, b_in: Value) -> Value
source§fn isub_ifbin(self, x: Value, y: Value, b_in: Value) -> Value
fn isub_ifbin(self, x: Value, y: Value, b_in: Value) -> Value
source§fn isub_bout(self, x: Value, y: Value) -> (Value, Value)
fn isub_bout(self, x: Value, y: Value) -> (Value, Value)
source§fn isub_ifbout(self, x: Value, y: Value) -> (Value, Value)
fn isub_ifbout(self, x: Value, y: Value) -> (Value, Value)
source§fn isub_borrow(self, x: Value, y: Value, b_in: Value) -> (Value, Value)
fn isub_borrow(self, x: Value, y: Value, b_in: Value) -> (Value, Value)
source§fn isub_ifborrow(self, x: Value, y: Value, b_in: Value) -> (Value, Value)
fn isub_ifborrow(self, x: Value, y: Value, b_in: Value) -> (Value, Value)
source§fn band_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn band_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn bor_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn bor_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn bxor_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn bxor_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn rotl_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn rotl_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn rotr_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn rotr_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn ishl(self, x: Value, y: Value) -> Value
fn ishl(self, x: Value, y: Value) -> Value
x
towards the MSB by y
places. Shift in zero bits to the LSB. Read moresource§fn ushr(self, x: Value, y: Value) -> Value
fn ushr(self, x: Value, y: Value) -> Value
x
towards the LSB by y
places, shifting in zero bits to the MSB. Also called a logical
shift. Read moresource§fn sshr(self, x: Value, y: Value) -> Value
fn sshr(self, x: Value, y: Value) -> Value
x
towards the LSB by y
places, shifting in sign bits to the MSB. Also called an arithmetic
shift. Read moresource§fn ishl_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn ishl_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn ushr_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn ushr_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn sshr_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
fn sshr_imm<T1: Into<Imm64>>(self, x: Value, Y: T1) -> Value
source§fn fcmp<T1: Into<FloatCC>>(self, Cond: T1, x: Value, y: Value) -> Value
fn fcmp<T1: Into<FloatCC>>(self, Cond: T1, x: Value, y: Value) -> Value
source§fn ffcmp(self, x: Value, y: Value) -> Value
fn ffcmp(self, x: Value, y: Value) -> Value
source§fn fma(self, x: Value, y: Value, z: Value) -> Value
fn fma(self, x: Value, y: Value, z: Value) -> Value
source§fn fmin(self, x: Value, y: Value) -> Value
fn fmin(self, x: Value, y: Value) -> Value
source§fn fmin_pseudo(self, x: Value, y: Value) -> Value
fn fmin_pseudo(self, x: Value, y: Value) -> Value
fmin
.
See https://github.com/WebAssembly/simd/pull/122 for background. Read moresource§fn fmax(self, x: Value, y: Value) -> Value
fn fmax(self, x: Value, y: Value) -> Value
source§fn fmax_pseudo(self, x: Value, y: Value) -> Value
fn fmax_pseudo(self, x: Value, y: Value) -> Value
fmax
.
See https://github.com/WebAssembly/simd/pull/122 for background. Read moresource§fn ceil(self, x: Value) -> Value
fn ceil(self, x: Value) -> Value
source§fn floor(self, x: Value) -> Value
fn floor(self, x: Value) -> Value
source§fn trunc(self, x: Value) -> Value
fn trunc(self, x: Value) -> Value
source§fn nearest(self, x: Value) -> Value
fn nearest(self, x: Value) -> Value
source§fn trueif<T1: Into<IntCC>>(self, Cond: T1, f: Value) -> Value
fn trueif<T1: Into<IntCC>>(self, Cond: T1, f: Value) -> Value
source§fn trueff<T1: Into<FloatCC>>(self, Cond: T1, f: Value) -> Value
fn trueff<T1: Into<FloatCC>>(self, Cond: T1, f: Value) -> Value
source§fn bitcast(self, MemTo: Type, x: Value) -> Value
fn bitcast(self, MemTo: Type, x: Value) -> Value
x
as a different type. Read moresource§fn raw_bitcast(self, AnyTo: Type, x: Value) -> Value
fn raw_bitcast(self, AnyTo: Type, x: Value) -> Value
x
as a different type of the same bit width. Read moresource§fn scalar_to_vector(self, TxN: Type, s: Value) -> Value
fn scalar_to_vector(self, TxN: Type, s: Value) -> Value
source§fn breduce(self, BoolTo: Type, x: Value) -> Value
fn breduce(self, BoolTo: Type, x: Value) -> Value
x
to a smaller boolean type by discarding the most significant bits. Read moresource§fn bextend(self, BoolTo: Type, x: Value) -> Value
fn bextend(self, BoolTo: Type, x: Value) -> Value
x
to a larger boolean type Read moresource§fn ireduce(self, IntTo: Type, x: Value) -> Value
fn ireduce(self, IntTo: Type, x: Value) -> Value
x
to a smaller integer type by discarding
the most significant bits. Read moresource§fn snarrow(self, x: Value, y: Value) -> Value
fn snarrow(self, x: Value, y: Value) -> Value
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 moresource§fn unarrow(self, x: Value, y: Value) -> Value
fn unarrow(self, x: Value, y: Value) -> Value
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 moresource§fn uunarrow(self, x: Value, y: Value) -> Value
fn uunarrow(self, x: Value, y: Value) -> Value
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 moresource§fn swiden_low(self, x: Value) -> Value
fn swiden_low(self, x: Value) -> Value
x
using signed extension. Read moresource§fn swiden_high(self, x: Value) -> Value
fn swiden_high(self, x: Value) -> Value
x
using signed extension. Read moresource§fn uwiden_low(self, x: Value) -> Value
fn uwiden_low(self, x: Value) -> Value
x
using unsigned extension. Read moresource§fn uwiden_high(self, x: Value) -> Value
fn uwiden_high(self, x: Value) -> Value
x
using unsigned extension. Read moresource§fn iadd_pairwise(self, x: Value, y: Value) -> Value
fn iadd_pairwise(self, x: Value, y: Value) -> Value
source§fn widening_pairwise_dot_product_s(self, x: Value, y: Value) -> Value
fn widening_pairwise_dot_product_s(self, x: Value, y: Value) -> Value
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 moresource§fn uextend(self, IntTo: Type, x: Value) -> Value
fn uextend(self, IntTo: Type, x: Value) -> Value
x
to a larger integer type by zero-extending. Read moresource§fn sextend(self, IntTo: Type, x: Value) -> Value
fn sextend(self, IntTo: Type, x: Value) -> Value
x
to a larger integer type by sign-extending. Read moresource§fn fpromote(self, FloatTo: Type, x: Value) -> Value
fn fpromote(self, FloatTo: Type, x: Value) -> Value
x
to a larger floating point format. Read moresource§fn fdemote(self, FloatTo: Type, x: Value) -> Value
fn fdemote(self, FloatTo: Type, x: Value) -> Value
x
to a smaller floating point format. Read moresource§fn fvpromote_low(self, a: Value) -> Value
fn fvpromote_low(self, a: Value) -> Value
source§fn fcvt_to_uint(self, IntTo: Type, x: Value) -> Value
fn fcvt_to_uint(self, IntTo: Type, x: Value) -> Value
source§fn fcvt_to_sint(self, IntTo: Type, x: Value) -> Value
fn fcvt_to_sint(self, IntTo: Type, x: Value) -> Value
source§fn fcvt_to_uint_sat(self, IntTo: Type, x: Value) -> Value
fn fcvt_to_uint_sat(self, IntTo: Type, x: Value) -> Value
source§fn fcvt_to_sint_sat(self, IntTo: Type, x: Value) -> Value
fn fcvt_to_sint_sat(self, IntTo: Type, x: Value) -> Value
source§fn fcvt_from_uint(self, FloatTo: Type, x: Value) -> Value
fn fcvt_from_uint(self, FloatTo: Type, x: Value) -> Value
source§fn fcvt_from_sint(self, FloatTo: Type, x: Value) -> Value
fn fcvt_from_sint(self, FloatTo: Type, x: Value) -> Value
source§fn fcvt_low_from_sint(self, FloatTo: Type, x: Value) -> Value
fn fcvt_low_from_sint(self, FloatTo: Type, x: Value) -> Value
source§fn isplit(self, x: Value) -> (Value, Value)
fn isplit(self, x: Value) -> (Value, Value)
source§fn iconcat(self, lo: Value, hi: Value) -> Value
fn iconcat(self, lo: Value, hi: Value) -> Value
source§fn atomic_rmw<T1: Into<MemFlags>, T2: Into<AtomicRmwOp>>(
self,
AtomicMem: Type,
MemFlags: T1,
AtomicRmwOp: T2,
p: Value,
x: Value
) -> Value
fn atomic_rmw<T1: Into<MemFlags>, T2: Into<AtomicRmwOp>>( self, AtomicMem: Type, MemFlags: T1, AtomicRmwOp: T2, p: Value, x: Value ) -> Value
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 moresource§fn atomic_cas<T1: Into<MemFlags>>(
self,
MemFlags: T1,
p: Value,
e: Value,
x: Value
) -> Value
fn atomic_cas<T1: Into<MemFlags>>( self, MemFlags: T1, p: Value, e: Value, x: Value ) -> Value
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 moresource§fn atomic_load<T1: Into<MemFlags>>(
self,
AtomicMem: Type,
MemFlags: T1,
p: Value
) -> Value
fn atomic_load<T1: Into<MemFlags>>( self, AtomicMem: Type, MemFlags: T1, p: Value ) -> Value
p
. Read more