aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2019-07-01 16:44:24 -0700
committeriximeow <me@iximeow.net>2020-01-12 16:10:13 -0800
commitae2dd6a1a39e58db83369f83b1dc46e1f3aa0b84 (patch)
tree2bda007637401c7875329981b37640af24e59386
parent2f9867664191bcfe0b7f7209de7463df30f775de (diff)
"support" a few 0f01 instructions
-rw-r--r--src/lib.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 7dcfb5a..ca86006 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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;