diff options
Diffstat (limited to 'src/display.rs')
-rw-r--r-- | src/display.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/display.rs b/src/display.rs index 3074701..1d1e1ae 100644 --- a/src/display.rs +++ b/src/display.rs @@ -340,18 +340,23 @@ impl fmt::Display for Instruction { } if needs_parens { f.write_str(")")?; } + // ... vxaddsubh has the right shift after round, but cmpyiwh and friends have the left + // shift before round. + if let Some(shift) = self.flags.shift_left { + write!(f, ":<<{}", shift)?; + } if let Some(mode) = self.flags.rounded { write!(f, "{}", mode.as_label())?; } if self.flags.chop { f.write_str(":chop")?; } - if let Some(shift) = self.flags.shift_left { - write!(f, ":<<{}", shift)?; - } if let Some(shift) = self.flags.shift_right { write!(f, ":>>{}", shift)?; } + if self.flags.carry { + f.write_str(":carry")?; + } if self.flags.saturate { f.write_str(":sat")?; } |