diff options
author | iximeow <me@iximeow.net> | 2019-07-01 16:44:24 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 16:10:13 -0800 |
commit | ae2dd6a1a39e58db83369f83b1dc46e1f3aa0b84 (patch) | |
tree | 2bda007637401c7875329981b37640af24e59386 | |
parent | 2f9867664191bcfe0b7f7209de7463df30f775de (diff) |
"support" a few 0f01 instructions
-rw-r--r-- | src/lib.rs | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -3007,7 +3007,10 @@ fn read_operands<T: Iterator<Item=u8>>( } } else if r == 1 { if mod_bits == 0b11 { - panic!("Unsupported instruction: 0x0f01 with modrm: 11 001 ___"); + // TOOD: MONITOR + instruction.opcode = Opcode::NOP; + instruction.operands[0] = Operand::Nothing; + Ok(()) } else { instruction.opcode = Opcode::SIDT; instruction.operands[1] = Operand::Nothing; @@ -3015,7 +3018,10 @@ fn read_operands<T: Iterator<Item=u8>>( } } else if r == 2 { if mod_bits == 0b11 { - panic!("Unsupported instruction: 0x0f01 with modrm: 11 010 ___"); + // TOOD: XGETBV + instruction.opcode = Opcode::NOP; + instruction.operands[0] = Operand::Nothing; + Ok(()) } else { instruction.opcode = Opcode::LGDT; instruction.operands[1] = Operand::Nothing; @@ -3023,7 +3029,10 @@ fn read_operands<T: Iterator<Item=u8>>( } } else if r == 3 { if mod_bits == 0b11 { - panic!("Unsupported instruction: 0x0f01 with modrm: 11 011 ___"); + // TOOD: VMRUN + instruction.opcode = Opcode::NOP; + instruction.operands[0] = Operand::Nothing; + Ok(()) } else { instruction.opcode = Opcode::LIDT; instruction.operands[1] = Operand::Nothing; |