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>
pub fn with_results<Array>( self, reuse: Array ) -> InsertReuseBuilder<'f, IIB, Array>
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> Freeze for InsertBuilder<'f, IIB>where
IIB: Freeze,
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 brif(
self,
c: Value,
block_then_label: Block,
block_then_args: &[Value],
block_else_label: Block,
block_else_args: &[Value]
) -> Inst
fn brif( self, c: Value, block_then_label: Block, block_then_args: &[Value], block_else_label: Block, block_else_args: &[Value] ) -> 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 call_indirect(self, SIG: SigRef, callee: Value, args: &[Value]) -> Inst
fn call_indirect(self, SIG: SigRef, callee: Value, args: &[Value]) -> Inst
source§fn return_call_indirect(
self,
SIG: SigRef,
callee: Value,
args: &[Value]
) -> Inst
fn return_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 x86_pshufb(self, x: Value, y: Value) -> Value
fn x86_pshufb(self, x: Value, y: Value) -> Value
pshufb
on x64. Read moresource§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 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 select_spectre_guard(self, c: Value, x: Value, y: Value) -> Value
fn select_spectre_guard(self, c: 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 x86_blendv(self, c: Value, x: Value, y: Value) -> Value
fn x86_blendv(self, c: Value, x: Value, y: Value) -> Value
blendv
-related instructions on x86. Read moresource§fn vhigh_bits(self, NarrowInt: Type, a: Value) -> Value
fn vhigh_bits(self, NarrowInt: 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 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 x86_pmulhrsw(self, x: Value, y: Value) -> Value
fn x86_pmulhrsw(self, x: Value, y: Value) -> Value
sqmul_round_sat
except with the semantics
of x86’s pmulhrsw
instruction. 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_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 uadd_overflow(self, x: Value, y: Value) -> (Value, Value)
fn uadd_overflow(self, x: Value, y: Value) -> (Value, Value)
of
is set when the addition overflowed. Read moresource§fn sadd_overflow(self, x: Value, y: Value) -> (Value, Value)
fn sadd_overflow(self, x: Value, y: Value) -> (Value, Value)
of
is set when the addition over- or underflowed.
Polymorphic over all scalar integer types, but does not support vector
types. Read moresource§fn usub_overflow(self, x: Value, y: Value) -> (Value, Value)
fn usub_overflow(self, x: Value, y: Value) -> (Value, Value)
of
is set when the subtraction underflowed. Read moresource§fn ssub_overflow(self, x: Value, y: Value) -> (Value, Value)
fn ssub_overflow(self, x: Value, y: Value) -> (Value, Value)
of
is set when the subtraction over- or underflowed.
Polymorphic over all scalar integer types, but does not support vector
types. Read moresource§fn umul_overflow(self, x: Value, y: Value) -> (Value, Value)
fn umul_overflow(self, x: Value, y: Value) -> (Value, Value)
of
is set when the multiplication overflowed. Read moresource§fn smul_overflow(self, x: Value, y: Value) -> (Value, Value)
fn smul_overflow(self, x: Value, y: Value) -> (Value, Value)
of
is set when the multiplication over- or underflowed.
Polymorphic over all scalar integer types except i128, but does not support vector
types. Read moresource§fn uadd_overflow_trap<T1: Into<TrapCode>>(
self,
x: Value,
y: Value,
code: T1
) -> Value
fn uadd_overflow_trap<T1: Into<TrapCode>>( self, x: Value, y: Value, code: T1 ) -> 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_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 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 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 fmax(self, x: Value, y: Value) -> Value
fn fmax(self, x: Value, y: Value) -> Value
source§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 bitcast<T1: Into<MemFlags>>(
self,
MemTo: Type,
MemFlags: T1,
x: Value
) -> Value
fn bitcast<T1: Into<MemFlags>>( self, MemTo: Type, MemFlags: T1, x: Value ) -> Value
x
as a different type. Read moresource§fn scalar_to_vector(self, TxN: Type, s: Value) -> Value
fn scalar_to_vector(self, TxN: Type, s: Value) -> Value
source§fn ireduce(self, Int: Type, x: Value) -> Value
fn ireduce(self, Int: 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 x86_pmaddubsw(self, x: Value, y: Value) -> Value
fn x86_pmaddubsw(self, x: Value, y: Value) -> Value
pmaddubsw
on x86. Read moresource§fn uextend(self, Int: Type, x: Value) -> Value
fn uextend(self, Int: Type, x: Value) -> Value
x
to a larger integer type by zero-extending. Read moresource§fn sextend(self, Int: Type, x: Value) -> Value
fn sextend(self, Int: Type, x: Value) -> Value
x
to a larger integer type by sign-extending. Read moresource§fn fpromote(self, FloatScalar: Type, x: Value) -> Value
fn fpromote(self, FloatScalar: Type, x: Value) -> Value
x
to a larger floating point format. Read moresource§fn fdemote(self, FloatScalar: Type, x: Value) -> Value
fn fdemote(self, FloatScalar: 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 x86_cvtt2dq(self, IntTo: Type, x: Value) -> Value
fn x86_cvtt2dq(self, IntTo: Type, x: Value) -> Value
cvttp{s,d}2dq
on x86. This specifically
returns INT_MIN
for NaN or out-of-bounds lanes. Read moresource§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 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