aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode/display.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2024-06-18 23:37:41 -0700
committeriximeow <me@iximeow.net>2024-06-19 00:05:35 -0700
commit6b0a7aa23f1f125213081cee1f37079e53f05882 (patch)
tree083e6c6bd1a176e5e21af0d6b76cf0225d6c5078 /src/long_mode/display.rs
parentcc6f7cabfdd7e48f71241ffc8e4860be6d26ba93 (diff)
configurable inlining to help with opts
Diffstat (limited to 'src/long_mode/display.rs')
-rw-r--r--src/long_mode/display.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs
index 77111b8..d0aef26 100644
--- a/src/long_mode/display.rs
+++ b/src/long_mode/display.rs
@@ -384,7 +384,6 @@ pub trait DisplaySink: fmt::Write {
/// utf-8 string. this may corrupt Rust strings.
unsafe fn write_lt_32(&mut self, s: &str) -> Result<(), core::fmt::Error> {
self.write_str(s)
-
}
/// write a string to this sink that is less than 16 bytes. this is provided for optimization
/// opportunities when writing a variable-length string with known max size.
@@ -5769,12 +5768,14 @@ impl Instruction {
Ok(())
}
+ #[cfg_attr(feature="profiling", inline(never))]
pub fn write_to<T: DisplaySink>(&self, out: &mut T) -> fmt::Result {
contextualize_intel(self, out)
// self.display_with(DisplayStyle::Intel).contextualize(&NoColors, 0, Some(&NoContext), out)
}
}
+#[cfg_attr(feature="profiling", inline(never))]
fn contextualize_intel<T: DisplaySink>(instr: &Instruction, out: &mut T) -> fmt::Result {
if instr.xacquire() {
out.write_fixed_size("xacquire ")?;