pub enum LOp {
Show 14 variants
Const(u32),
Mov(LReg),
Add {
a: LReg,
b: LReg,
cin: LReg,
},
Sub {
a: LReg,
b: LReg,
bin: LReg,
},
Mul {
a: LReg,
b: LReg,
},
And {
a: LReg,
b: LReg,
},
Or {
a: LReg,
b: LReg,
},
Xor {
a: LReg,
b: LReg,
},
Not {
a: LReg,
},
Shl {
a: LReg,
k: u32,
},
Shr {
a: LReg,
k: u32,
},
Ltu {
a: LReg,
b: LReg,
},
Eq {
a: LReg,
b: LReg,
},
Sel {
c: LReg,
t: LReg,
f: LReg,
},
}Expand description
One lane operation. Operands are registers; results are words, carries and predicates are 0 or 1.
Variants§
Const(u32)
dst = k.
Mov(LReg)
dst = a.
Add
dst = (a + b + cin) mod 2^w, dst2 = (a + b + cin) >> w; cin is 0 or 1.
Sub
dst = (a − b − bin) mod 2^w, dst2 = 1 when it borrowed; bin is 0 or 1.
Mul
dst = a × b for mul-bit operands: the exact product, one word.
And
Or
Xor
Not
dst = !a within the word.
Shl
dst = (a << k) mod 2^w, k < w.
Shr
dst = a >> k (logical), k < w.
Ltu
dst = 1 when a < b (unsigned), else 0.
Eq
dst = 1 when a == b, else 0.
Sel
dst = c != 0 ? t : f.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LOp
impl<'de> Deserialize<'de> for LOp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for LOp
impl Eq for LOp
impl StructuralPartialEq for LOp
Auto Trait Implementations§
impl Freeze for LOp
impl RefUnwindSafe for LOp
impl Send for LOp
impl Sync for LOp
impl Unpin for LOp
impl UnsafeUnpin for LOp
impl UnwindSafe for LOp
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.