Hexadecimal with a multiple of 4 digits and group separators: 0xfff0 0x0001_ffff 0xffff_ffff_fff8_4400
(x: u64, f: &mut Formatter)
| 229 | /// 0xffff_ffff_fff8_4400 |
| 230 | /// |
| 231 | fn write_hex(x: u64, f: &mut Formatter) -> fmt::Result { |
| 232 | let mut pos = (64 - x.leading_zeros() - 1) & 0xf0; |
| 233 | write!(f, "0x{:04x}", (x >> pos) & 0xffff)?; |
| 234 | while pos > 0 { |
| 235 | pos -= 16; |
| 236 | write!(f, "_{:04x}", (x >> pos) & 0xffff)?; |
| 237 | } |
| 238 | Ok(()) |
| 239 | } |
| 240 | |
| 241 | impl Display for Uimm64 { |
| 242 | fn fmt(&self, f: &mut Formatter) -> fmt::Result { |
no test coverage detected