pub struct FuncInstBuilder<'short, 'long: 'short> { /* private fields */ }
Expand description
Implementation of the InstBuilder
that has
one convenience method per Cranelift IR instruction.
Trait Implementations§
source§impl<'short, 'long> InstBuilderBase<'short> for FuncInstBuilder<'short, 'long>
impl<'short, 'long> InstBuilderBase<'short> for FuncInstBuilder<'short, 'long>
source§fn data_flow_graph(&self) -> &DataFlowGraph
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
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, &'short mut DataFlowGraph)
fn build( self, data: InstructionData, ctrl_typevar: Type, ) -> (Inst, &'short mut DataFlowGraph)
Insert an instruction and return a reference to it, consuming the builder. Read more
Auto Trait Implementations§
impl<'short, 'long> Freeze for FuncInstBuilder<'short, 'long>
impl<'short, 'long> RefUnwindSafe for FuncInstBuilder<'short, 'long>
impl<'short, 'long> Send for FuncInstBuilder<'short, 'long>
impl<'short, 'long> Sync for FuncInstBuilder<'short, 'long>
impl<'short, 'long> Unpin for FuncInstBuilder<'short, 'long>
impl<'short, 'long> !UnwindSafe for FuncInstBuilder<'short, 'long>
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
Mutably borrows from an owned value. Read more
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
Conditional branch when cond is non-zero. Read more
source§fn call_indirect(self, SIG: SigRef, callee: Value, args: &[Value]) -> Inst
fn call_indirect(self, SIG: SigRef, callee: Value, args: &[Value]) -> Inst
Indirect function call. Read more
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
Indirect tail call. Read more
source§fn func_addr(self, iAddr: Type, FN: FuncRef) -> Value
fn func_addr(self, iAddr: Type, FN: FuncRef) -> Value
Get the address of a function. Read more
source§fn x86_pshufb(self, x: Value, y: Value) -> Value
fn x86_pshufb(self, x: Value, y: Value) -> Value
A vector swizzle lookalike which has the semantics of
pshufb
on x64. Read moresource§fn extractlane<T1>(self, x: Value, Idx: T1) -> Value
fn extractlane<T1>(self, x: Value, Idx: T1) -> Value
source§fn avg_round(self, x: Value, y: Value) -> Value
fn avg_round(self, x: Value, y: Value) -> Value
Unsigned average with rounding:
a := (x + y + 1) // 2
Read moresource§fn load<T1, T2>(self, Mem: Type, MemFlags: T1, p: Value, Offset: T2) -> Value
fn load<T1, T2>(self, Mem: Type, MemFlags: T1, p: Value, Offset: T2) -> Value
Load from memory at
p + Offset
. Read moresource§fn uload8<T1, T2>(
self,
iExt8: Type,
MemFlags: T1,
p: Value,
Offset: T2,
) -> Value
fn uload8<T1, T2>( self, iExt8: Type, MemFlags: T1, p: Value, Offset: T2, ) -> Value
Load 8 bits from memory at
p + Offset
and zero-extend. Read moresource§fn sload8<T1, T2>(
self,
iExt8: Type,
MemFlags: T1,
p: Value,
Offset: T2,
) -> Value
fn sload8<T1, T2>( self, iExt8: Type, MemFlags: T1, p: Value, Offset: T2, ) -> Value
Load 8 bits from memory at
p + Offset
and sign-extend. Read moresource§fn uload16<T1, T2>(
self,
iExt16: Type,
MemFlags: T1,
p: Value,
Offset: T2,
) -> Value
fn uload16<T1, T2>( self, iExt16: Type, MemFlags: T1, p: Value, Offset: T2, ) -> Value
Load 16 bits from memory at
p + Offset
and zero-extend. Read moresource§fn sload16<T1, T2>(
self,
iExt16: Type,
MemFlags: T1,
p: Value,
Offset: T2,
) -> Value
fn sload16<T1, T2>( self, iExt16: Type, MemFlags: T1, p: Value, Offset: T2, ) -> Value
Load 16 bits from memory at
p + Offset
and sign-extend. Read moresource§fn uload32<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
fn uload32<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
Load 32 bits from memory at
p + Offset
and zero-extend. Read moresource§fn sload32<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
fn sload32<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
Load 32 bits from memory at
p + Offset
and sign-extend. Read moresource§fn uload8x8<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
fn uload8x8<T1, T2>(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 moresource§fn sload8x8<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
fn sload8x8<T1, T2>(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 moresource§fn uload16x4<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
fn uload16x4<T1, T2>(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 moresource§fn sload16x4<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
fn sload16x4<T1, T2>(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 moresource§fn uload32x2<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
fn uload32x2<T1, T2>(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 moresource§fn sload32x2<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
fn sload32x2<T1, T2>(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 moresource§fn stack_load<T1>(self, Mem: Type, SS: StackSlot, Offset: T1) -> Value
fn stack_load<T1>(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>(self, x: Value, SS: StackSlot, Offset: T1) -> Inst
fn stack_store<T1>(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>(self, iAddr: Type, SS: StackSlot, Offset: T1) -> Value
fn stack_addr<T1>(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
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
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
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
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
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
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 get_pinned_reg(self, iAddr: Type) -> Value
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
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
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
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
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 select_spectre_guard(self, c: Value, x: Value, y: Value) -> Value
fn select_spectre_guard(self, c: 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
fn bitselect(self, c: Value, x: Value, y: Value) -> Value
Conditional select of bits. Read more
source§fn x86_blendv(self, c: Value, x: Value, y: Value) -> Value
fn x86_blendv(self, c: Value, x: Value, y: Value) -> Value
A bitselect-lookalike instruction except with the semantics of
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
Reduce a vector to a scalar integer. Read more
source§fn icmp_imm<T1, T2>(self, Cond: T1, x: Value, Y: T2) -> Value
fn icmp_imm<T1, T2>(self, Cond: T1, x: Value, Y: T2) -> Value
Compare scalar integer to a constant. Read more
source§fn iadd(self, x: Value, y: Value) -> Value
fn iadd(self, x: Value, y: Value) -> Value
Wrapping integer addition:
a := x + y \pmod{2^B}
. Read moresource§fn isub(self, x: Value, y: Value) -> Value
fn isub(self, x: Value, y: Value) -> Value
Wrapping integer subtraction:
a := x - y \pmod{2^B}
. Read moresource§fn imul(self, x: Value, y: Value) -> Value
fn imul(self, x: Value, y: Value) -> Value
Wrapping integer multiplication:
a := x y \pmod{2^B}
. Read moresource§fn umulhi(self, x: Value, y: Value) -> Value
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
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
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 moresource§fn x86_pmulhrsw(self, x: Value, y: Value) -> Value
fn x86_pmulhrsw(self, x: Value, y: Value) -> Value
A similar instruction to
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
Unsigned integer division:
a := \lfloor {x \over y} \rfloor
. Read moresource§fn sdiv(self, x: Value, y: Value) -> Value
fn sdiv(self, x: Value, y: Value) -> Value
Signed integer division rounded toward zero:
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
Signed integer remainder. The result has the sign of the dividend. Read more
source§fn imul_imm<T1>(self, x: Value, Y: T1) -> Value
fn imul_imm<T1>(self, x: Value, Y: T1) -> Value
Integer multiplication by immediate constant. Read more
source§fn udiv_imm<T1>(self, x: Value, Y: T1) -> Value
fn udiv_imm<T1>(self, x: Value, Y: T1) -> Value
Unsigned integer division by an immediate constant. Read more
source§fn sdiv_imm<T1>(self, x: Value, Y: T1) -> Value
fn sdiv_imm<T1>(self, x: Value, Y: T1) -> Value
Signed integer division by an immediate constant. Read more
source§fn urem_imm<T1>(self, x: Value, Y: T1) -> Value
fn urem_imm<T1>(self, x: Value, Y: T1) -> Value
Unsigned integer remainder with immediate divisor. Read more
source§fn srem_imm<T1>(self, x: Value, Y: T1) -> Value
fn srem_imm<T1>(self, x: Value, Y: T1) -> Value
Signed integer remainder with immediate divisor. Read more
source§fn irsub_imm<T1>(self, x: Value, Y: T1) -> Value
fn irsub_imm<T1>(self, x: Value, Y: T1) -> Value
Immediate reverse wrapping subtraction:
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
Add integers with carry in. Read more
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)
Add integers with carry in and out. Read more
source§fn uadd_overflow(self, x: Value, y: Value) -> (Value, Value)
fn uadd_overflow(self, x: Value, y: Value) -> (Value, Value)
Add integers unsigned with overflow out.
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)
Add integers signed with overflow out.
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)
Subtract integers unsigned with overflow out.
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)
Subtract integers signed with overflow out.
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)
Multiply integers unsigned with overflow out.
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)
Multiply integers signed with overflow out.
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>(self, x: Value, y: Value, code: T1) -> Value
fn uadd_overflow_trap<T1>(self, x: Value, y: Value, code: T1) -> Value
Unsigned addition of x and y, trapping if the result overflows. Read more
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
Subtract integers with borrow in. Read more
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)
Subtract integers with borrow in and out. Read more
source§fn ishl(self, x: Value, y: Value) -> Value
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 moresource§fn ushr(self, x: Value, y: Value) -> Value
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 moresource§fn sshr(self, x: Value, y: Value) -> Value
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 moresource§fn fma(self, x: Value, y: Value, z: Value) -> Value
fn fma(self, x: Value, y: Value, z: Value) -> Value
Floating point fused multiply-and-add. Read more
source§fn fmin(self, x: Value, y: Value) -> Value
fn fmin(self, x: Value, y: Value) -> Value
Floating point minimum, propagating NaNs using the WebAssembly rules. Read more
source§fn fmax(self, x: Value, y: Value) -> Value
fn fmax(self, x: Value, y: Value) -> Value
Floating point maximum, propagating NaNs using the WebAssembly rules. Read more
source§fn ceil(self, x: Value) -> Value
fn ceil(self, x: Value) -> Value
Round floating point round to integral, towards positive infinity. Read more
source§fn floor(self, x: Value) -> Value
fn floor(self, x: Value) -> Value
Round floating point round to integral, towards negative infinity. Read more
source§fn trunc(self, x: Value) -> Value
fn trunc(self, x: Value) -> Value
Round floating point round to integral, towards zero. Read more
source§fn nearest(self, x: Value) -> Value
fn nearest(self, x: Value) -> Value
Round floating point round to integral, towards nearest with ties to
even. Read more
source§fn bitcast<T1>(self, MemTo: Type, MemFlags: T1, x: Value) -> Value
fn bitcast<T1>(self, MemTo: Type, MemFlags: T1, x: Value) -> Value
Reinterpret the bits in
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
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 ireduce(self, Int: Type, x: Value) -> Value
fn ireduce(self, Int: Type, x: Value) -> Value
Convert
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
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 moresource§fn unarrow(self, x: Value, y: Value) -> Value
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 moresource§fn uunarrow(self, x: Value, y: Value) -> Value
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 moresource§fn swiden_low(self, x: Value) -> Value
fn swiden_low(self, x: Value) -> Value
Widen the low lanes of
x
using signed extension. Read moresource§fn swiden_high(self, x: Value) -> Value
fn swiden_high(self, x: Value) -> Value
Widen the high lanes of
x
using signed extension. Read moresource§fn uwiden_low(self, x: Value) -> Value
fn uwiden_low(self, x: Value) -> Value
Widen the low lanes of
x
using unsigned extension. Read moresource§fn uwiden_high(self, x: Value) -> Value
fn uwiden_high(self, x: Value) -> Value
Widen the high lanes of
x
using unsigned extension. Read moresource§fn iadd_pairwise(self, x: Value, y: Value) -> Value
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 x86_pmaddubsw(self, x: Value, y: Value) -> Value
fn x86_pmaddubsw(self, x: Value, y: Value) -> Value
An instruction with equivalent semantics to
pmaddubsw
on x86. Read moresource§fn uextend(self, Int: Type, x: Value) -> Value
fn uextend(self, Int: Type, x: Value) -> Value
Convert
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
Convert
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
Convert
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
Convert
x
to a smaller floating point format. Read moresource§fn fvpromote_low(self, a: Value) -> Value
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
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
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
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
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 x86_cvtt2dq(self, IntTo: Type, x: Value) -> Value
fn x86_cvtt2dq(self, IntTo: Type, x: Value) -> Value
A float-to-integer conversion instruction for vectors-of-floats which
has the same semantics as
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
Convert unsigned integer to floating point. Read more
source§fn fcvt_from_sint(self, FloatTo: Type, x: Value) -> Value
fn fcvt_from_sint(self, FloatTo: Type, x: Value) -> Value
Convert signed integer to floating point. Read more
source§fn isplit(self, x: Value) -> (Value, Value)
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
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, T2>(
self,
AtomicMem: Type,
MemFlags: T1,
AtomicRmwOp: T2,
p: Value,
x: Value,
) -> Value
fn atomic_rmw<T1, T2>( 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 moresource§fn atomic_cas<T1>(self, MemFlags: T1, p: Value, e: Value, x: Value) -> Value
fn atomic_cas<T1>(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 moresource§fn atomic_load<T1>(self, AtomicMem: Type, MemFlags: T1, p: Value) -> Value
fn atomic_load<T1>(self, AtomicMem: Type, MemFlags: T1, p: Value) -> Value
Atomically load from memory at
p
. Read moresource§fn fence(self) -> Inst
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>(self, x: Value, y: T1) -> Value
fn extract_vector<T1>(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)
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, blocks=0)
source§fn AtomicRmw(
self,
opcode: Opcode,
ctrl_typevar: Type,
flags: MemFlags,
op: AtomicRmwOp,
arg0: Value,
arg1: Value,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn Binary(
self,
opcode: Opcode,
ctrl_typevar: Type,
arg0: Value,
arg1: Value,
) -> (Inst, &'f mut DataFlowGraph)
fn Binary( self, opcode: Opcode, ctrl_typevar: Type, arg0: Value, arg1: Value, ) -> (Inst, &'f mut DataFlowGraph)
Binary(imms=(), vals=2, blocks=0)
source§fn BinaryImm64(
self,
opcode: Opcode,
ctrl_typevar: Type,
imm: Imm64,
arg0: Value,
) -> (Inst, &'f mut DataFlowGraph)
fn BinaryImm64( self, opcode: Opcode, ctrl_typevar: Type, imm: Imm64, arg0: Value, ) -> (Inst, &'f mut DataFlowGraph)
BinaryImm64(imms=(imm: ir::immediates::Imm64), vals=1, blocks=0)
source§fn BinaryImm8(
self,
opcode: Opcode,
ctrl_typevar: Type,
imm: u8,
arg0: Value,
) -> (Inst, &'f mut DataFlowGraph)
fn BinaryImm8( self, opcode: Opcode, ctrl_typevar: Type, imm: u8, arg0: Value, ) -> (Inst, &'f mut DataFlowGraph)
BinaryImm8(imms=(imm: ir::immediates::Uimm8), vals=1, blocks=0)
source§fn BranchTable(
self,
opcode: Opcode,
ctrl_typevar: Type,
table: JumpTable,
arg0: Value,
) -> (Inst, &'f mut DataFlowGraph)
fn BranchTable( self, opcode: Opcode, ctrl_typevar: Type, table: JumpTable, arg0: Value, ) -> (Inst, &'f mut DataFlowGraph)
BranchTable(imms=(table: ir::JumpTable), vals=1, blocks=0)
source§fn Brif(
self,
opcode: Opcode,
ctrl_typevar: Type,
block0: BlockCall,
block1: BlockCall,
arg0: Value,
) -> (Inst, &'f mut DataFlowGraph)
fn Brif( self, opcode: Opcode, ctrl_typevar: Type, block0: BlockCall, block1: BlockCall, arg0: Value, ) -> (Inst, &'f mut DataFlowGraph)
Brif(imms=(), vals=1, blocks=2)
source§fn Call(
self,
opcode: Opcode,
ctrl_typevar: Type,
func_ref: FuncRef,
args: EntityList<Value>,
) -> (Inst, &'f mut DataFlowGraph)
fn Call( self, opcode: Opcode, ctrl_typevar: Type, func_ref: FuncRef, args: EntityList<Value>, ) -> (Inst, &'f mut DataFlowGraph)
Call(imms=(func_ref: ir::FuncRef), vals=0, blocks=0)
source§fn CallIndirect(
self,
opcode: Opcode,
ctrl_typevar: Type,
sig_ref: SigRef,
args: EntityList<Value>,
) -> (Inst, &'f mut DataFlowGraph)
fn CallIndirect( self, opcode: Opcode, ctrl_typevar: Type, sig_ref: SigRef, args: EntityList<Value>, ) -> (Inst, &'f mut DataFlowGraph)
CallIndirect(imms=(sig_ref: ir::SigRef), vals=1, blocks=0)
source§fn CondTrap(
self,
opcode: Opcode,
ctrl_typevar: Type,
code: TrapCode,
arg0: Value,
) -> (Inst, &'f mut DataFlowGraph)
fn CondTrap( self, opcode: Opcode, ctrl_typevar: Type, code: TrapCode, arg0: Value, ) -> (Inst, &'f mut DataFlowGraph)
CondTrap(imms=(code: ir::TrapCode), vals=1, blocks=0)
source§fn DynamicStackLoad(
self,
opcode: Opcode,
ctrl_typevar: Type,
dynamic_stack_slot: DynamicStackSlot,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn DynamicStackStore(
self,
opcode: Opcode,
ctrl_typevar: Type,
dynamic_stack_slot: DynamicStackSlot,
arg0: Value,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn FloatCompare(
self,
opcode: Opcode,
ctrl_typevar: Type,
cond: FloatCC,
arg0: Value,
arg1: Value,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn FuncAddr(
self,
opcode: Opcode,
ctrl_typevar: Type,
func_ref: FuncRef,
) -> (Inst, &'f mut DataFlowGraph)
fn FuncAddr( self, opcode: Opcode, ctrl_typevar: Type, func_ref: FuncRef, ) -> (Inst, &'f mut DataFlowGraph)
FuncAddr(imms=(func_ref: ir::FuncRef), vals=0, blocks=0)
source§fn IntAddTrap(
self,
opcode: Opcode,
ctrl_typevar: Type,
code: TrapCode,
arg0: Value,
arg1: Value,
) -> (Inst, &'f mut DataFlowGraph)
fn IntAddTrap( self, opcode: Opcode, ctrl_typevar: Type, code: TrapCode, arg0: Value, arg1: Value, ) -> (Inst, &'f mut DataFlowGraph)
IntAddTrap(imms=(code: ir::TrapCode), vals=2, blocks=0)
source§fn IntCompare(
self,
opcode: Opcode,
ctrl_typevar: Type,
cond: IntCC,
arg0: Value,
arg1: Value,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn IntCompareImm(
self,
opcode: Opcode,
ctrl_typevar: Type,
cond: IntCC,
imm: Imm64,
arg0: Value,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn Jump(
self,
opcode: Opcode,
ctrl_typevar: Type,
block0: BlockCall,
) -> (Inst, &'f mut DataFlowGraph)
fn Jump( self, opcode: Opcode, ctrl_typevar: Type, block0: BlockCall, ) -> (Inst, &'f mut DataFlowGraph)
Jump(imms=(), vals=0, blocks=1)
source§fn Load(
self,
opcode: Opcode,
ctrl_typevar: Type,
flags: MemFlags,
offset: Offset32,
arg0: Value,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn LoadNoOffset(
self,
opcode: Opcode,
ctrl_typevar: Type,
flags: MemFlags,
arg0: Value,
) -> (Inst, &'f mut DataFlowGraph)
fn LoadNoOffset( self, opcode: Opcode, ctrl_typevar: Type, flags: MemFlags, arg0: Value, ) -> (Inst, &'f mut DataFlowGraph)
LoadNoOffset(imms=(flags: ir::MemFlags), vals=1, blocks=0)
source§fn MultiAry(
self,
opcode: Opcode,
ctrl_typevar: Type,
args: EntityList<Value>,
) -> (Inst, &'f mut DataFlowGraph)
fn MultiAry( self, opcode: Opcode, ctrl_typevar: Type, args: EntityList<Value>, ) -> (Inst, &'f mut DataFlowGraph)
MultiAry(imms=(), vals=0, blocks=0)
source§fn NullAry(
self,
opcode: Opcode,
ctrl_typevar: Type,
) -> (Inst, &'f mut DataFlowGraph)
fn NullAry( self, opcode: Opcode, ctrl_typevar: Type, ) -> (Inst, &'f mut DataFlowGraph)
NullAry(imms=(), vals=0, blocks=0)
source§fn Shuffle(
self,
opcode: Opcode,
ctrl_typevar: Type,
imm: Immediate,
arg0: Value,
arg1: Value,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn StackLoad(
self,
opcode: Opcode,
ctrl_typevar: Type,
stack_slot: StackSlot,
offset: Offset32,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn StackStore(
self,
opcode: Opcode,
ctrl_typevar: Type,
stack_slot: StackSlot,
offset: Offset32,
arg0: Value,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn Store(
self,
opcode: Opcode,
ctrl_typevar: Type,
flags: MemFlags,
offset: Offset32,
arg0: Value,
arg1: Value,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn StoreNoOffset(
self,
opcode: Opcode,
ctrl_typevar: Type,
flags: MemFlags,
arg0: Value,
arg1: Value,
) -> (Inst, &'f mut DataFlowGraph)
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, blocks=0)
source§fn Ternary(
self,
opcode: Opcode,
ctrl_typevar: Type,
arg0: Value,
arg1: Value,
arg2: Value,
) -> (Inst, &'f mut DataFlowGraph)
fn Ternary( self, opcode: Opcode, ctrl_typevar: Type, arg0: Value, arg1: Value, arg2: Value, ) -> (Inst, &'f mut DataFlowGraph)
Ternary(imms=(), vals=3, blocks=0)
source§fn TernaryImm8(
self,
opcode: Opcode,
ctrl_typevar: Type,
imm: u8,
arg0: Value,
arg1: Value,
) -> (Inst, &'f mut DataFlowGraph)
fn TernaryImm8( self, opcode: Opcode, ctrl_typevar: Type, imm: u8, arg0: Value, arg1: Value, ) -> (Inst, &'f mut DataFlowGraph)
TernaryImm8(imms=(imm: ir::immediates::Uimm8), vals=2, blocks=0)
source§fn Trap(
self,
opcode: Opcode,
ctrl_typevar: Type,
code: TrapCode,
) -> (Inst, &'f mut DataFlowGraph)
fn Trap( self, opcode: Opcode, ctrl_typevar: Type, code: TrapCode, ) -> (Inst, &'f mut DataFlowGraph)
Trap(imms=(code: ir::TrapCode), vals=0, blocks=0)
source§fn Unary(
self,
opcode: Opcode,
ctrl_typevar: Type,
arg0: Value,
) -> (Inst, &'f mut DataFlowGraph)
fn Unary( self, opcode: Opcode, ctrl_typevar: Type, arg0: Value, ) -> (Inst, &'f mut DataFlowGraph)
Unary(imms=(), vals=1, blocks=0)
source§fn UnaryConst(
self,
opcode: Opcode,
ctrl_typevar: Type,
constant_handle: Constant,
) -> (Inst, &'f mut DataFlowGraph)
fn UnaryConst( self, opcode: Opcode, ctrl_typevar: Type, constant_handle: Constant, ) -> (Inst, &'f mut DataFlowGraph)
UnaryConst(imms=(constant_handle: ir::Constant), vals=0, blocks=0)
source§fn UnaryGlobalValue(
self,
opcode: Opcode,
ctrl_typevar: Type,
global_value: GlobalValue,
) -> (Inst, &'f mut DataFlowGraph)
fn UnaryGlobalValue( self, opcode: Opcode, ctrl_typevar: Type, global_value: GlobalValue, ) -> (Inst, &'f mut DataFlowGraph)
UnaryGlobalValue(imms=(global_value: ir::GlobalValue), vals=0, blocks=0)
source§fn UnaryIeee32(
self,
opcode: Opcode,
ctrl_typevar: Type,
imm: Ieee32,
) -> (Inst, &'f mut DataFlowGraph)
fn UnaryIeee32( self, opcode: Opcode, ctrl_typevar: Type, imm: Ieee32, ) -> (Inst, &'f mut DataFlowGraph)
UnaryIeee32(imms=(imm: ir::immediates::Ieee32), vals=0, blocks=0)
source§fn UnaryIeee64(
self,
opcode: Opcode,
ctrl_typevar: Type,
imm: Ieee64,
) -> (Inst, &'f mut DataFlowGraph)
fn UnaryIeee64( self, opcode: Opcode, ctrl_typevar: Type, imm: Ieee64, ) -> (Inst, &'f mut DataFlowGraph)
UnaryIeee64(imms=(imm: ir::immediates::Ieee64), vals=0, blocks=0)