From 49e910b50066161fcf581c4aec775655f85cffe3 Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 19 Jun 2024 10:22:03 -0700 Subject: more profiling outlining --- src/long_mode/display.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index d9f7f9e..a60b2fd 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -1275,6 +1275,7 @@ impl crate::long_mode::OperandVisitor for ColorizingOperandVisi type Ok = (); type Error = core::fmt::Error; + #[cfg_attr(feature="profiling", inline(never))] fn visit_u8(&mut self, imm: u8) -> Result { self.f.span_enter(TokenType::Immediate); self.f.write_fixed_size("0x")?; @@ -1282,6 +1283,7 @@ impl crate::long_mode::OperandVisitor for ColorizingOperandVisi self.f.span_end(TokenType::Immediate); Ok(()) } + #[cfg_attr(feature="profiling", inline(never))] fn visit_i8(&mut self, imm: i8) -> Result { self.f.span_enter(TokenType::Immediate); let mut v = imm as u8; @@ -1294,6 +1296,7 @@ impl crate::long_mode::OperandVisitor for ColorizingOperandVisi self.f.span_end(TokenType::Immediate); Ok(()) } + #[cfg_attr(feature="profiling", inline(never))] fn visit_u16(&mut self, imm: u16) -> Result { self.f.span_enter(TokenType::Immediate); self.f.write_fixed_size("0x")?; @@ -1301,6 +1304,7 @@ impl crate::long_mode::OperandVisitor for ColorizingOperandVisi self.f.span_end(TokenType::Immediate); Ok(()) } + #[cfg_attr(feature="profiling", inline(never))] fn visit_i16(&mut self, imm: i16) -> Result { self.f.span_enter(TokenType::Immediate); let mut v = imm as u16; @@ -1313,6 +1317,7 @@ impl crate::long_mode::OperandVisitor for ColorizingOperandVisi self.f.span_end(TokenType::Immediate); Ok(()) } + #[cfg_attr(feature="profiling", inline(never))] fn visit_u32(&mut self, imm: u32) -> Result { self.f.span_enter(TokenType::Immediate); self.f.write_fixed_size("0x")?; @@ -1332,6 +1337,7 @@ impl crate::long_mode::OperandVisitor for ColorizingOperandVisi self.f.span_end(TokenType::Immediate); Ok(()) } + #[cfg_attr(feature="profiling", inline(never))] fn visit_u64(&mut self, imm: u64) -> Result { self.f.span_enter(TokenType::Immediate); self.f.write_fixed_size("0x")?; @@ -1339,6 +1345,7 @@ impl crate::long_mode::OperandVisitor for ColorizingOperandVisi self.f.span_end(TokenType::Immediate); Ok(()) } + #[cfg_attr(feature="profiling", inline(never))] fn visit_i64(&mut self, imm: i64) -> Result { self.f.span_enter(TokenType::Immediate); let mut v = imm as u64; @@ -1351,6 +1358,7 @@ impl crate::long_mode::OperandVisitor for ColorizingOperandVisi self.f.span_end(TokenType::Immediate); Ok(()) } + #[cfg_attr(feature="profiling", inline(never))] fn visit_reg(&mut self, reg: RegSpec) -> Result { self.f.span_enter(TokenType::Register); unsafe { self.f.write_lt_8(regspec_label(®))?; } -- cgit v1.1