diff options
author | iximeow <me@iximeow.net> | 2019-05-25 07:52:41 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 16:10:13 -0800 |
commit | b6ace85e557fc69f155b60890929452ac5ef0fb9 (patch) | |
tree | 187380b9bddc8c502bf962e640574ed58f0e8c57 /src/display.rs | |
parent | 153e8b77d364893a460a7d779347febae36e5b5a (diff) |
more serde friendliness, cli, cld, clc, sti, std, stc support
Diffstat (limited to 'src/display.rs')
-rw-r--r-- | src/display.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/display.rs b/src/display.rs index b500992..50375f2 100644 --- a/src/display.rs +++ b/src/display.rs @@ -174,6 +174,12 @@ impl <T: std::fmt::Write> Colorize<T> for Operand { impl fmt::Display for Opcode { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { + &Opcode::STI => write!(f, "{}", "sti"), + &Opcode::STD => write!(f, "{}", "std"), + &Opcode::STC => write!(f, "{}", "stc"), + &Opcode::CLI => write!(f, "{}", "cli"), + &Opcode::CLD => write!(f, "{}", "cld"), + &Opcode::CLC => write!(f, "{}", "clc"), &Opcode::SLDT => write!(f, "{}", "sldt"), &Opcode::STR => write!(f, "{}", "str"), &Opcode::LLDT => write!(f, "{}", "lldt"), @@ -393,6 +399,12 @@ impl <T: std::fmt::Write> Colorize<T> for Opcode { Opcode::JG => { write!(out, "{}", colors.control_flow_op(self)) } /* Data transfer */ + Opcode::CLC | + Opcode::CLI | + Opcode::CLD | + Opcode::STC | + Opcode::STI | + Opcode::STD | Opcode::MOV | Opcode::CBW | Opcode::CDW | |