From 22cbf99292d009c89a6e13c91f901c838a81180d Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 1 Jan 2022 13:20:03 -0800 Subject: fix float formatter integer floats need a .0, the rest get default precision --- src/armv8/a64.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/armv8/a64.rs b/src/armv8/a64.rs index c0d61e6..5ea7f8e 100644 --- a/src/armv8/a64.rs +++ b/src/armv8/a64.rs @@ -2865,7 +2865,11 @@ impl Display for Operand { write!(fmt, "#{:#x}", *i) }, Operand::ImmediateDouble(d) => { - write!(fmt, "#{:0.1}", d) + if *d as i64 as f64 == *d { + write!(fmt, "#{:0.1}", d) + } else { + write!(fmt, "#{:0.}", d) + } }, Operand::Imm16(i) => { write!(fmt, "#{:#x}", *i) -- cgit v1.1