summaryrefslogtreecommitdiff
path: root/src/display.rs
diff options
context:
space:
mode:
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] = [