diff options
author | iximeow <me@iximeow.net> | 2019-03-30 15:27:43 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 16:10:13 -0800 |
commit | 11524fe292cfd4f40d9c7127c0e82ff1ef3e9793 (patch) | |
tree | fa993663fe8096a16171bde8aa03cc716d19b81b /src/display.rs | |
parent | 9ca5adc847098d6f74f49707b94ed0df23626c18 (diff) |
starting to get into some system instructions now
Diffstat (limited to 'src/display.rs')
-rw-r--r-- | src/display.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/display.rs b/src/display.rs index 6846174..d11c7c5 100644 --- a/src/display.rs +++ b/src/display.rs @@ -174,6 +174,15 @@ 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::CPUID => write!(f, "{}", "cpuid"), + &Opcode::UD2 => write!(f, "{}", "ud2"), + &Opcode::WBINVD => write!(f, "{}", "wbinvd"), + &Opcode::INVD => write!(f, "{}", "invd"), + &Opcode::SYSRET => write!(f, "{}", "sysret"), + &Opcode::CLTS => write!(f, "{}", "clts"), + &Opcode::SYSCALL => write!(f, "{}", "syscall"), + &Opcode::LSL => write!(f, "{}", "lsl"), + &Opcode::LAR => write!(f, "{}", "lar"), &Opcode::INC => write!(f, "{}", "inc"), &Opcode::DEC => write!(f, "{}", "dec"), &Opcode::HLT => write!(f, "{}", "hlt"), @@ -406,6 +415,16 @@ impl <T: std::fmt::Write> Colorize<T> for Opcode { Opcode::CMP | Opcode::CMPXCHG => { write!(out, "{}", colors.comparison_op(self)) } + Opcode::CPUID | + Opcode::WBINVD | + Opcode::INVD | + Opcode::SYSRET | + Opcode::CLTS | + Opcode::SYSCALL | + Opcode::LSL | + Opcode::LAR => { write!(out, "{}", colors.platform_op(self)) } + + Opcode::UD2 | Opcode::Invalid => { write!(out, "{}", colors.invalid_op(self)) } } } |