chore: add nice debug output
This commit is contained in:
@@ -13,6 +13,9 @@ pub type DWord = u32;
|
||||
#[derive(Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
/// Encodes either Byte- or Word-sized operands.
|
||||
/// Also sometimes used to decide if an instruction is Byte- or Word-sized,
|
||||
/// which is usually indicated by using a value of 0 and the disregarding
|
||||
/// the value when read.
|
||||
pub enum Operand {
|
||||
Byte(Byte),
|
||||
Word(Word),
|
||||
@@ -37,7 +40,7 @@ impl fmt::LowerHex for Operand {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
/// ModRM byte can either target a memory location or some register
|
||||
/// ModRM byte can either target a memory location or some register.
|
||||
pub enum ModRmTarget {
|
||||
Memory(MemoryIndex),
|
||||
Register(Register),
|
||||
@@ -53,11 +56,11 @@ impl std::fmt::Display for ModRmTarget {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
/// Memory displacements are signed versions of u8 and u16.
|
||||
/// Memory displacements are signed versions of Byte and Word operands.
|
||||
/// Encodes either Byte- or Word-sized operands.
|
||||
pub enum Displacement {
|
||||
IByte(i8),
|
||||
IWord(i16),
|
||||
IByte(IByte),
|
||||
IWord(IWord),
|
||||
}
|
||||
|
||||
impl fmt::LowerHex for Displacement {
|
||||
|
||||
Reference in New Issue
Block a user