(&self, f: &mut Formatter)
| 149 | |
| 150 | impl Display for Imm64 { |
| 151 | fn fmt(&self, f: &mut Formatter) -> fmt::Result { |
| 152 | let x = self.0; |
| 153 | if x < 10_000 { |
| 154 | // Use decimal for small and negative numbers. |
| 155 | write!(f, "{x}") |
| 156 | } else { |
| 157 | write_hex(x as u64, f) |
| 158 | } |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | /// Parse a 64-bit signed number. |