aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2024-06-18 15:25:28 -0700
committeriximeow <me@iximeow.net>2024-06-18 15:25:28 -0700
commit4fb654284c9dcd2409300b58b11f3a6906d7e4f8 (patch)
tree21be6c4a5ab1069013325744311360cc995ca407 /src/long_mode
parent166695d09ab3c30a0147ac74aa856bae1f5542a8 (diff)
actually use small-string specializations when available
Diffstat (limited to 'src/long_mode')
-rw-r--r--src/long_mode/display.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs
index 575765c..cf2edae 100644
--- a/src/long_mode/display.rs
+++ b/src/long_mode/display.rs
@@ -5646,17 +5646,12 @@ impl Instruction {
}
pub fn write_to<T: DisplaySink>(&self, out: &mut T) -> fmt::Result {
- self.display_with(DisplayStyle::Intel).contextualize(&NoColors, 0, Some(&NoContext), out)
+ contextualize_intel(self, &NoColors, 0, Some(&NoContext), out)
+// self.display_with(DisplayStyle::Intel).contextualize(&NoColors, 0, Some(&NoContext), out)
}
}
-fn contextualize_intel<T: fmt::Write, Y: YaxColors>(instr: &Instruction, colors: &Y, _address: u64, _context: Option<&NoContext>, out: &mut T) -> fmt::Result {
- let mut out = NoColorsSink {
- out,
- };
- let mut out = &mut out;
- use core::fmt::Write;
-
+fn contextualize_intel<T: DisplaySink, Y: YaxColors>(instr: &Instruction, colors: &Y, _address: u64, _context: Option<&NoContext>, out: &mut T) -> fmt::Result {
if instr.xacquire() {
out.write_fixed_size("xacquire ")?;
}
@@ -6107,6 +6102,11 @@ impl <'instr, T: fmt::Write, Y: YaxColors> ShowContextual<u64, NoContext, T, Y>
match style {
DisplayStyle::Intel => {
+ let mut out = NoColorsSink {
+ out,
+ };
+ let mut out = &mut out;
+
contextualize_intel(instr, colors, address, context, out)
}
DisplayStyle::C => {