diff options
author | iximeow <me@iximeow.net> | 2021-03-13 14:19:55 -0800 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2021-03-13 14:54:47 -0800 |
commit | 93c53657c2289e979672ee6c4612af7e9eac109c (patch) | |
tree | a0acdc143595f64a796827bc849a122dd49cc4e3 /src/long_mode/display.rs | |
parent | 6232e8b1daf7067cb2e8065687530d5f88ecb46d (diff) |
split ffi crate to support distinct 16, 32, and 64-bit builds
initial work to optionally discard any instruction printing support
when using `-Z build-std` to fully remove .eh_frame, a stripped
long_mode_no_fmt .so is 61kb!
Diffstat (limited to 'src/long_mode/display.rs')
-rw-r--r-- | src/long_mode/display.rs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index c3f4413..1be4a32 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -5,20 +5,7 @@ use core::fmt; use yaxpeax_arch::{Colorize, ShowContextual, NoColors, YaxColors}; use yaxpeax_arch::display::*; -use crate::long_mode::{RegSpec, Opcode, Operand, InstDecoder, Instruction, Segment, PrefixRex, OperandSpec, DecodeError}; - -impl fmt::Display for DecodeError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - DecodeError::ExhaustedInput => { write!(f, "exhausted input") }, - DecodeError::InvalidOpcode => { write!(f, "invalid opcode") }, - DecodeError::InvalidOperand => { write!(f, "invalid operand") }, - DecodeError::InvalidPrefixes => { write!(f, "invalid prefixes") }, - DecodeError::TooLong => { write!(f, "too long") }, - DecodeError::IncompleteDecoder => { write!(f, "the decoder is incomplete") }, - } - } -} +use crate::long_mode::{RegSpec, Opcode, Operand, InstDecoder, Instruction, Segment, PrefixRex, OperandSpec}; impl fmt::Display for InstDecoder { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |