aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode
diff options
context:
space:
mode:
Diffstat (limited to 'src/long_mode')
-rw-r--r--src/long_mode/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs
index bb3eb7c..f593f16 100644
--- a/src/long_mode/mod.rs
+++ b/src/long_mode/mod.rs
@@ -5250,7 +5250,7 @@ enum OperandCode {
ModRM_0x0f00 = OperandCodeBuilder::new().read_modrm().operand_case(OperandCase::ModRM_0x0f00).bits(),
ModRM_0x0f01 = OperandCodeBuilder::new().read_modrm().operand_case(OperandCase::ModRM_0x0f01).bits(),
- ModRM_0x0f0d = OperandCodeBuilder::new().read_modrm().operand_case(OperandCase::ModRM_0x0f0d).bits(),
+ ModRM_0x0f0d = OperandCodeBuilder::new().read_E().operand_case(OperandCase::ModRM_0x0f0d).bits(),
ModRM_0x0f0f = OperandCodeBuilder::new().read_modrm().operand_case(OperandCase::ModRM_0x0f0f).bits(), // 3dnow
ModRM_0x0fae = OperandCodeBuilder::new().read_modrm().operand_case(OperandCase::ModRM_0x0fae).bits(),
ModRM_0x0fba = OperandCodeBuilder::new().read_modrm().operand_case(OperandCase::ModRM_0x0fba).bits(),
@@ -8180,12 +8180,11 @@ fn read_operands<
instruction.regs[0].bank = RegisterBank::X;
if mem_oper == OperandSpec::RegMMM {
instruction.regs[1].bank = RegisterBank::X;
+ } else {
+ instruction.mem_size = 16;
}
instruction.imm =
read_num(words, 1)? as u8 as u64;
- if instruction.operands[1] != OperandSpec::RegMMM {
- instruction.mem_size = 16;
- }
instruction.operands[2] = OperandSpec::ImmU8;
instruction.operand_count = 3;
}
@@ -8508,8 +8507,7 @@ fn read_operands<
}
}
OperandCase::ModRM_0x0f0d => {
- let modrm = read_modrm(words)?;
- let r = (modrm >> 3) & 0b111;
+ let r = instruction.regs[0].num & 0b111;
let bank = bank_from_prefixes_64(SizeCode::vq, instruction.prefixes);
@@ -8521,9 +8519,11 @@ fn read_operands<
instruction.opcode = Opcode::NOP;
}
}
- instruction.operands[0] = read_E(words, instruction, modrm, bank, sink)?;
+ instruction.operands[0] = mem_oper;
if instruction.operands[0] != OperandSpec::RegMMM {
instruction.mem_size = 64;
+ } else {
+ instruction.regs[1].bank = bank;
}
instruction.operand_count = 1;
}