mirror of
https://github.com/Zenithsiz/dcb.git
synced 2026-02-08 19:34:27 +00:00
Fixed missing 0x when printing signed hex in some places.
This commit is contained in:
@@ -133,6 +133,6 @@ impl InstFmt for Inst {
|
||||
let Self { dst, src, offset, kind } = self;
|
||||
let mnemonic = kind.mnemonic();
|
||||
|
||||
write!(f, "{mnemonic} {dst}, {}({src})", SignedHex(offset))
|
||||
write!(f, "{mnemonic} {dst}, {:#}({src})", SignedHex(offset))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,6 +120,6 @@ impl InstFmt for Inst {
|
||||
let Self { dst, src, offset, kind } = self;
|
||||
let mnemonic = kind.mnemonic();
|
||||
|
||||
write!(f, "{mnemonic} {dst}, {}({src})", SignedHex(offset))
|
||||
write!(f, "{mnemonic} {dst}, {:#}({src})", SignedHex(offset))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ impl Kind {
|
||||
Self::Address(address) => write!(f, "{address:#x}"),
|
||||
Self::Word(value) => write!(f, "{value:#x}"),
|
||||
Self::HalfWordUnsigned(value) => write!(f, "{value:#x}"),
|
||||
Self::HalfWordSigned(value) => write!(f, "{}", SignedHex(value)),
|
||||
Self::HalfWordSigned(value) => write!(f, "{:#}", SignedHex(value)),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user