add rest of basic mov instructions
This commit is contained in:
+10
-2
@@ -51,6 +51,14 @@ impl Reg {
|
||||
self.width
|
||||
}
|
||||
|
||||
pub fn not8(&self) -> u8 {
|
||||
self.width.not8()
|
||||
}
|
||||
|
||||
pub fn high(&self) -> bool {
|
||||
self.high
|
||||
}
|
||||
|
||||
/// if self has 64 bit width, changes width to 32 bit
|
||||
pub fn lower64(&self) -> Self {
|
||||
let mut new = *self;
|
||||
@@ -101,8 +109,8 @@ impl Width {
|
||||
}
|
||||
|
||||
/// greater than 8 bits
|
||||
pub const fn gt8(&self) -> bool {
|
||||
!matches!(self, Self::B8)
|
||||
pub const fn not8(&self) -> u8 {
|
||||
!matches!(self, Self::B8) as u8
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user