add rest of basic mov instructions

This commit is contained in:
2026-06-12 21:53:22 -04:00
parent 397176759d
commit 715a50b1fa
6 changed files with 109 additions and 36 deletions
+10 -2
View File
@@ -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
}
}