[−][src]Struct llhd::ir::InstBuilder
A temporary object used to construct a single instruction.
Methods
impl<B> InstBuilder<B>
[src]
impl<'_, B: UnitBuilder> InstBuilder<&'_ mut B>
[src]
pub fn const_int(
&mut self,
width: usize,
sig: bool,
value: impl Into<BigInt>
) -> Value
[src]
&mut self,
width: usize,
sig: bool,
value: impl Into<BigInt>
) -> Value
a = const iN[$]? imm
pub fn const_time(&mut self, value: impl Into<ConstTime>) -> Value
[src]
a = const time imm
pub fn alias(&mut self, x: Value) -> Value
[src]
a = x
pub fn array_uniform(&mut self, imm: usize, x: Value) -> Value
[src]
a = array imm, type x
pub fn array(&mut self, args: Vec<Value>) -> Value
[src]
a = array args
pub fn strukt(&mut self, args: Vec<Value>) -> Value
[src]
a = struct args
pub fn not(&mut self, x: Value) -> Value
[src]
a = not type x, y
pub fn neg(&mut self, x: Value) -> Value
[src]
a = neg type x, y
pub fn add(&mut self, x: Value, y: Value) -> Value
[src]
a = add type x, y
pub fn sub(&mut self, x: Value, y: Value) -> Value
[src]
a = sub type x, y
pub fn and(&mut self, x: Value, y: Value) -> Value
[src]
a = and type x, y
pub fn or(&mut self, x: Value, y: Value) -> Value
[src]
a = or type x, y
pub fn xor(&mut self, x: Value, y: Value) -> Value
[src]
a = xor type x, y
pub fn smul(&mut self, x: Value, y: Value) -> Value
[src]
a = smul type x, y
pub fn sdiv(&mut self, x: Value, y: Value) -> Value
[src]
a = sdiv type x, y
pub fn smod(&mut self, x: Value, y: Value) -> Value
[src]
a = smod type x, y
pub fn srem(&mut self, x: Value, y: Value) -> Value
[src]
a = srem type x, y
pub fn umul(&mut self, x: Value, y: Value) -> Value
[src]
a = umul type x, y
pub fn udiv(&mut self, x: Value, y: Value) -> Value
[src]
a = udiv type x, y
pub fn umod(&mut self, x: Value, y: Value) -> Value
[src]
a = umod type x, y
pub fn urem(&mut self, x: Value, y: Value) -> Value
[src]
a = urem type x, y
pub fn eq(&mut self, x: Value, y: Value) -> Value
[src]
a = eq type x, y
pub fn neq(&mut self, x: Value, y: Value) -> Value
[src]
a = neq type x, y
pub fn slt(&mut self, x: Value, y: Value) -> Value
[src]
a = slt type x, y
pub fn sgt(&mut self, x: Value, y: Value) -> Value
[src]
a = sgt type x, y
pub fn sle(&mut self, x: Value, y: Value) -> Value
[src]
a = sle type x, y
pub fn sge(&mut self, x: Value, y: Value) -> Value
[src]
a = sge type x, y
pub fn ult(&mut self, x: Value, y: Value) -> Value
[src]
a = ult type x, y
pub fn ugt(&mut self, x: Value, y: Value) -> Value
[src]
a = ugt type x, y
pub fn ule(&mut self, x: Value, y: Value) -> Value
[src]
a = ule type x, y
pub fn uge(&mut self, x: Value, y: Value) -> Value
[src]
a = uge type x, y
pub fn shl(&mut self, x: Value, y: Value, z: Value) -> Value
[src]
a = shl type x, y, z
pub fn shr(&mut self, x: Value, y: Value, z: Value) -> Value
[src]
a = shr type x, y, z
pub fn mux(&mut self, x: Value, y: Value) -> Value
[src]
a = mux type x, y
pub fn reg(&mut self, x: Value, data: Vec<(Value, RegMode, Value)>) -> Value
[src]
a = reg type init (, data mode trigger)*
pub fn ins_field(&mut self, x: Value, y: Value, imm: usize) -> Value
[src]
a = insf type x, y, imm
pub fn ins_slice(
&mut self,
x: Value,
y: Value,
imm0: usize,
imm1: usize
) -> Value
[src]
&mut self,
x: Value,
y: Value,
imm0: usize,
imm1: usize
) -> Value
a = inss type x, y, imm0, imm1
pub fn ext_field(&mut self, x: Value, imm: usize) -> Value
[src]
a = extf type x, imm
pub fn ext_slice(&mut self, x: Value, imm0: usize, imm1: usize) -> Value
[src]
a = exts type x, imm0, imm1
pub fn con(&mut self, x: Value, y: Value) -> Inst
[src]
con type x, y
pub fn del(&mut self, x: Value, y: Value) -> Inst
[src]
a = del type x, y
pub fn call(&mut self, unit: ExtUnit, args: Vec<Value>) -> Inst
[src]
a = call type unit (args...)
pub fn inst(
&mut self,
unit: ExtUnit,
inputs: Vec<Value>,
outputs: Vec<Value>
) -> Inst
[src]
&mut self,
unit: ExtUnit,
inputs: Vec<Value>,
outputs: Vec<Value>
) -> Inst
inst unit (inputs...) -> (outputs...)
pub fn sig(&mut self, x: Value) -> Value
[src]
a = sig type x
pub fn prb(&mut self, x: Value) -> Value
[src]
a = prb type x
pub fn drv(&mut self, x: Value, y: Value, z: Value) -> Inst
[src]
drv type x, y, z
pub fn var(&mut self, x: Value) -> Value
[src]
a = var type x
pub fn ld(&mut self, x: Value) -> Value
[src]
a = ld type x
pub fn st(&mut self, x: Value, y: Value) -> Inst
[src]
st type x, y
pub fn halt(&mut self) -> Inst
[src]
halt
pub fn ret(&mut self) -> Inst
[src]
ret
pub fn ret_value(&mut self, x: Value) -> Inst
[src]
ret type x
pub fn br(&mut self, bb: Block) -> Inst
[src]
br bb
pub fn br_cond(&mut self, x: Value, bb0: Block, bb1: Block) -> Inst
[src]
br x, bb0, bb1
pub fn wait(&mut self, bb: Block, args: Vec<Value>) -> Inst
[src]
wait bb, args
pub fn wait_time(&mut self, bb: Block, time: Value, args: Vec<Value>) -> Inst
[src]
wait bb, time, args
Auto Trait Implementations
impl<B> Sync for InstBuilder<B> where
B: Sync,
B: Sync,
impl<B> Send for InstBuilder<B> where
B: Send,
B: Send,
impl<B> Unpin for InstBuilder<B> where
B: Unpin,
B: Unpin,
impl<B> RefUnwindSafe for InstBuilder<B> where
B: RefUnwindSafe,
B: RefUnwindSafe,
impl<B> UnwindSafe for InstBuilder<B> where
B: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,