summaryrefslogtreecommitdiff
path: root/src/display.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2025-04-11 23:50:27 -0700
committeriximeow <me@iximeow.net>2025-04-11 23:50:27 -0700
commitb5b1947a9c37d60f5e9d6bd9e082fd81fd0a43da (patch)
treeb4bc44ab9be518ba4e3d32667b1b27730ef7f90b /src/display.rs
parent7a87391a990f396b4e54c5b6f331a9fe95332c5a (diff)
more registers as lower case, pc-relative shown like every other arch
Diffstat (limited to 'src/display.rs')
-rw-r--r--src/display.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/display.rs b/src/display.rs
index e730cee..eb19107 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -932,7 +932,11 @@ impl fmt::Display for Operand {
f.write_str("BUG (operand)")
}
Operand::PCRel32 { rel } => {
- write!(f, "$+#{}", rel)
+ if *rel >= 0 {
+ write!(f, "$+{:#x}", *rel)
+ } else {
+ write!(f, "$-{:#x}", -*rel)
+ }
}
Operand::Gpr { reg } => {
const NAMES: [&'static str; 32] = [