diff options
author | iximeow <me@iximeow.net> | 2024-06-18 13:42:10 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2024-06-18 13:42:10 -0700 |
commit | 4af752a76094e921a614fa4bec0bcf7fae3d8f6f (patch) | |
tree | 2d576882b134644c0c303f7f8e3e312356bfc8df /src | |
parent | 00dc2b64849328cc48c809163ad9fd105d8439aa (diff) |
a few more accurate hints
Diffstat (limited to 'src')
-rw-r--r-- | src/long_mode/display.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index a49cbd0..b9c9f79 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -5358,7 +5358,8 @@ fn contextualize_intel<T: fmt::Write, Y: YaxColors>(instr: &Instruction, colors: } } - out.write_str(instr.opcode.name())?; + // TODO: no x86 instruction longer than 32 bytes? + unsafe { out.write_lt_32(instr.opcode.name())? }; if instr.operand_count > 0 { out.write_fixed_size(" ")?; @@ -5940,7 +5941,8 @@ impl<'a, Y: YaxColors, F: DisplaySink> crate::long_mode::OperandVisitor for Rela core::mem::transmute::<&[core::mem::MaybeUninit<u8>], &str>(buf) }; - self.out.write_str(s)?; + // not actually fixed size, but this should optimize right i hope.. + self.out.write_fixed_size(s)?; // anguished_string_write(&mut self.out, s); Ok(true) } else { @@ -5983,7 +5985,8 @@ impl<'a, Y: YaxColors, F: DisplaySink> crate::long_mode::OperandVisitor for Rela // danger_anguished_string_write(&mut self.out, s); // danger_anguished_variable_length_bstring_write(unsafe { self.out.as_mut_vec() }, s.as_bytes()); - self.out.write_str(s)?; + // not actually fixed size, but this should optimize right i hope.. + self.out.write_fixed_size(s)?; Ok(true) } else { Ok(false) |