aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2020-10-27 00:57:33 -0700
committeriximeow <me@iximeow.net>2020-10-27 00:57:33 -0700
commit39aaebeb48c30b96b4ff8b66663a1452e2571426 (patch)
tree6d87158a84ab9e9865bdb86a2ab27290cdb94436 /src
parentfb9ead64e6c7d96c02627b01b6a85921e2d8f7a4 (diff)
fix misdecode of instructions in opcode 0x800.1.3
Diffstat (limited to 'src')
-rw-r--r--src/long_mode/mod.rs1
-rw-r--r--src/protected_mode/mod.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs
index 94e34ae..363c605 100644
--- a/src/long_mode/mod.rs
+++ b/src/long_mode/mod.rs
@@ -6171,6 +6171,7 @@ fn read_operands<T: Iterator<Item=u8>>(decoder: &InstDecoder, mut bytes_iter: T,
instruction.operand_count = 1;
},
1 => {
+ instruction.opcode = base_opcode_map((modrm >> 3) & 7);
instruction.operands[0] = mem_oper;
instruction.operands[1] = OperandSpec::ImmI8;
instruction.operand_count = 2;
diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs
index 29c2750..b60ff34 100644
--- a/src/protected_mode/mod.rs
+++ b/src/protected_mode/mod.rs
@@ -6023,6 +6023,7 @@ fn read_operands<T: Iterator<Item=u8>>(decoder: &InstDecoder, mut bytes_iter: T,
instruction.operand_count = 1;
},
1 => {
+ instruction.opcode = base_opcode_map((modrm >> 3) & 7);
instruction.operands[0] = mem_oper;
instruction.operands[1] = OperandSpec::ImmI8;
instruction.operand_count = 2;