diff options
Diffstat (limited to 'src/long_mode/display.rs')
-rw-r--r-- | src/long_mode/display.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index b67acd4..0d11e33 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -450,13 +450,20 @@ impl <T: DisplaySink, Y: YaxColors> crate::long_mode::OperandVisitor for Coloriz Ok(()) } fn visit_reg(&mut self, reg: RegSpec) -> Result<Self::Ok, Self::Error> { - self.f.write_str(regspec_label(®)) + self.f.span_enter(TokenType::Register); + self.f.write_str(regspec_label(®))?; + self.f.span_end(TokenType::Register); + Ok(()) } fn visit_reg_mask_merge(&mut self, spec: RegSpec, mask: RegSpec, merge_mode: MergeMode) -> Result<Self::Ok, Self::Error> { + self.f.span_enter(TokenType::Register); self.f.write_str(regspec_label(&spec))?; + self.f.span_end(TokenType::Register); if mask.num != 0 { self.f.write_str("{")?; + self.f.span_enter(TokenType::Register); self.f.write_str(regspec_label(&mask))?; + self.f.span_end(TokenType::Register); self.f.write_str("}")?; } if let MergeMode::Zero = merge_mode { |