mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
ZJIT: Avoid double negative in Mem debug
Prior to this commit the debug output for negative offsets would look like: ``` Mem64[Reg(3) - -8 ``` That makes it look like we're adding instead of subtracting. After this commit we'll print: ``` Mem64[Reg(3) - 8 ```
This commit is contained in:
parent
d0fdbef4ea
commit
002d746418
@ -45,7 +45,7 @@ impl fmt::Debug for Mem {
|
||||
write!(fmt, "Mem{}[{:?}", self.num_bits, self.base)?;
|
||||
if self.disp != 0 {
|
||||
let sign = if self.disp > 0 { '+' } else { '-' };
|
||||
write!(fmt, " {sign} {}", self.disp)?;
|
||||
write!(fmt, " {sign} {}", self.disp.abs())?;
|
||||
}
|
||||
|
||||
write!(fmt, "]")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user