diff options
Diffstat (limited to 'src/protected_mode/display.rs')
-rw-r--r-- | src/protected_mode/display.rs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/protected_mode/display.rs b/src/protected_mode/display.rs index ed8d44c..77d39ff 100644 --- a/src/protected_mode/display.rs +++ b/src/protected_mode/display.rs @@ -291,6 +291,9 @@ impl fmt::Display for Opcode { &Opcode::BTC => write!(f, "btc"), &Opcode::BSF => write!(f, "bsf"), &Opcode::BSR => write!(f, "bsr"), + &Opcode::BZHI => write!(f, "bzhi"), + &Opcode::PDEP => write!(f, "pdep"), + &Opcode::PEXT => write!(f, "pext"), &Opcode::TZCNT => write!(f, "tzcnt"), &Opcode::MOVSS => write!(f, "movss"), &Opcode::SQRTSS => write!(f, "sqrtss"), @@ -339,17 +342,27 @@ impl fmt::Display for Opcode { &Opcode::RDMSR => write!(f, "rdmsr"), &Opcode::RDTSC => write!(f, "rdtsc"), &Opcode::RDPMC => write!(f, "rdpmc"), + &Opcode::RDPID => write!(f, "rdpid"), + &Opcode::RDFSBASE => write!(f, "rdfsbase"), + &Opcode::RDGSBASE => write!(f, "rdgsbase"), + &Opcode::WRFSBASE => write!(f, "wrfsbase"), + &Opcode::WRGSBASE => write!(f, "wrgsbase"), &Opcode::FXSAVE => write!(f, "fxsave"), &Opcode::FXRSTOR => write!(f, "fxrstor"), &Opcode::LDMXCSR => write!(f, "ldmxcsr"), &Opcode::STMXCSR => write!(f, "stmxcsr"), &Opcode::XSAVE => write!(f, "xsave"), + &Opcode::XSAVEC => write!(f, "xsavec"), + &Opcode::XSAVES => write!(f, "xsaves"), &Opcode::XRSTOR => write!(f, "xrstor"), + &Opcode::XRSTORS => write!(f, "xrstors"), &Opcode::XSAVEOPT => write!(f, "xsaveopt"), &Opcode::LFENCE => write!(f, "lfence"), &Opcode::MFENCE => write!(f, "mfence"), &Opcode::SFENCE => write!(f, "sfence"), &Opcode::CLFLUSH => write!(f, "clflush"), + &Opcode::CLFLUSHOPT => write!(f, "clflushopt"), + &Opcode::CLWB => write!(f, "clwb"), &Opcode::LDS => write!(f, "lds"), &Opcode::LES => write!(f, "les"), &Opcode::SGDT => write!(f, "sgdt"), @@ -437,11 +450,15 @@ impl fmt::Display for Opcode { &Opcode::SAR => write!(f, "sar"), &Opcode::SAL => write!(f, "sal"), &Opcode::SHR => write!(f, "shr"), + &Opcode::SARX => write!(f, "sarx"), + &Opcode::SHLX => write!(f, "shlx"), + &Opcode::SHRX => write!(f, "shrx"), &Opcode::SHRD => write!(f, "shrd"), &Opcode::SHL => write!(f, "shl"), &Opcode::RCR => write!(f, "rcr"), &Opcode::RCL => write!(f, "rcl"), &Opcode::ROR => write!(f, "ror"), + &Opcode::RORX => write!(f, "rorx"), &Opcode::ROL => write!(f, "rol"), &Opcode::CMOVA => write!(f, "cmova"), &Opcode::CMOVB => write!(f, "cmovb"), @@ -462,9 +479,11 @@ impl fmt::Display for Opcode { &Opcode::NEG => write!(f, "neg"), &Opcode::NOT => write!(f, "not"), &Opcode::MUL => write!(f, "mul"), + &Opcode::MULX => write!(f, "mulx"), &Opcode::DIV => write!(f, "div"), &Opcode::IDIV => write!(f, "idiv"), &Opcode::CMPXCHG => write!(f, "cmpxchg"), + &Opcode::CMPXCHG8B => write!(f, "cmpxchg8b"), &Opcode::MOVSX_b => write!(f, "movsx"), &Opcode::MOVSX_w => write!(f, "movsx"), &Opcode::MOVZX_b => write!(f, "movzx"), @@ -639,6 +658,8 @@ impl fmt::Display for Opcode { &Opcode::BLSMSK => write!(f, "blsmsk"), &Opcode::BLSR => write!(f, "blsr"), &Opcode::VMCLEAR => write!(f, "vmclear"), + &Opcode::VMPTRLD => write!(f, "vmptrld"), + &Opcode::VMPTRST => write!(f, "vmptrst"), &Opcode::VMXON => write!(f, "vmxon"), &Opcode::VMCALL => write!(f, "vmcall"), &Opcode::VMLAUNCH => write!(f, "vmlaunch"), @@ -1297,16 +1318,21 @@ impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color Opcode::DIV | Opcode::IDIV | Opcode::MUL | + Opcode::MULX | Opcode::NEG | Opcode::NOT | Opcode::SAR | Opcode::SAL | Opcode::SHR | + Opcode::SARX | + Opcode::SHLX | + Opcode::SHRX | Opcode::SHRD | Opcode::SHL | Opcode::RCR | Opcode::RCL | Opcode::ROR | + Opcode::RORX | Opcode::ROL | Opcode::INC | Opcode::DEC | @@ -1328,6 +1354,9 @@ impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color Opcode::BTC | Opcode::BSF | Opcode::BSR | + Opcode::BZHI | + Opcode::PDEP | + Opcode::PEXT | Opcode::TZCNT | Opcode::ANDN | Opcode::BEXTR | @@ -1819,23 +1848,34 @@ impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color Opcode::CMP | Opcode::CMPPS | Opcode::CMPPD | + Opcode::CMPXCHG8B | Opcode::CMPXCHG => { write!(out, "{}", colors.comparison_op(self)) } Opcode::WRMSR | Opcode::RDMSR | Opcode::RDTSC | Opcode::RDPMC | + Opcode::RDPID | + Opcode::RDFSBASE | + Opcode::RDGSBASE | + Opcode::WRFSBASE | + Opcode::WRGSBASE | Opcode::FXSAVE | Opcode::FXRSTOR | Opcode::LDMXCSR | Opcode::STMXCSR | Opcode::XSAVE | + Opcode::XSAVEC | + Opcode::XSAVES | Opcode::XRSTOR | + Opcode::XRSTORS | Opcode::XSAVEOPT | Opcode::LFENCE | Opcode::MFENCE | Opcode::SFENCE | Opcode::CLFLUSH | + Opcode::CLFLUSHOPT | + Opcode::CLWB | Opcode::LDS | Opcode::LES | Opcode::SGDT | @@ -1875,6 +1915,8 @@ impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color Opcode::VMREAD | Opcode::VMWRITE | Opcode::VMCLEAR | + Opcode::VMPTRST | + Opcode::VMPTRLD | Opcode::VMXON | Opcode::VMCALL | Opcode::VMLAUNCH | @@ -1982,6 +2024,10 @@ impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> ShowContextual<u6 self.opcode.colorize(colors, out)?; + if self.opcode == Opcode::XBEGIN { + return write!(out, " $+{}", colors.number(signed_i32_hex(self.imm as i32))); + } + match self.operands[0] { OperandSpec::Nothing => { return Ok(()); |