diff options
Diffstat (limited to 'src/decode.rs')
| -rw-r--r-- | src/decode.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/decode.rs b/src/decode.rs index 616f7f7..7f58516 100644 --- a/src/decode.rs +++ b/src/decode.rs @@ -6,9 +6,15 @@ const MASK_REGISTER: u32 = 0x1f; -#[derive(Debug, Clone, Copy)] +#[derive(Clone, Copy)] pub struct Instruction(pub u32); +impl std::fmt::Debug for Instruction { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_fmt(format_args!("{:08x}", self.0)) + } +} + #[allow(dead_code)] impl Instruction { #[inline] |
