From 9967fba9f8f8449626692e336ff4d44823f036fc Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 29 Dec 2021 01:58:05 -0800 Subject: write immediates in arm-style --- src/armv8/a64.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/armv8/a64.rs b/src/armv8/a64.rs index 27bc173..9d94c1a 100644 --- a/src/armv8/a64.rs +++ b/src/armv8/a64.rs @@ -2305,24 +2305,24 @@ impl Display for Operand { } } Operand::Immediate(i) => { - write!(fmt, "{:#x}", i) + write!(fmt, "#{:x}", i) }, Operand::ImmediateDouble(d) => { write!(fmt, "{:}", d) }, Operand::Imm16(i) => { - write!(fmt, "{:#x}", *i) + write!(fmt, "#{:x}", *i) }, Operand::Imm64(i) => { - write!(fmt, "{:#x}", *i) + write!(fmt, "#{:x}", *i) }, Operand::ImmShift(i, shift) => { match shift { 0 => { - write!(fmt, "{:#x}", i) + write!(fmt, "#{:x}", i) }, _ => { - write!(fmt, "{:#x}, lsl {}", i, shift) + write!(fmt, "#{:x}, lsl {}", i, shift) } } }, -- cgit v1.1