From 11524fe292cfd4f40d9c7127c0e82ff1ef3e9793 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 30 Mar 2019 15:27:43 -0700 Subject: starting to get into some system instructions now --- src/display.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/display.rs') 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 Colorize 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 Colorize 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)) } } } -- cgit v1.1