aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-07-03 10:17:17 -0700
committeriximeow <me@iximeow.net>2021-07-03 10:17:17 -0700
commita4b6304bd0df5fbab311a037d7c04b1ecbef7b14 (patch)
tree4284a813316d427d65de357d1e0647045c42093a /src/long_mode
parente095342c536ce282a80b010ddedcd43900b85f7b (diff)
port over x86_64 improvements to x86_32
Diffstat (limited to 'src/long_mode')
-rw-r--r--src/long_mode/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs
index 125716f..254ccc7 100644
--- a/src/long_mode/mod.rs
+++ b/src/long_mode/mod.rs
@@ -9133,6 +9133,10 @@ fn unlikely_operands<T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as y
}
}
OperandCode::ModRM_0x0f01 => {
+ if instruction.prefixes.rep() || instruction.prefixes.repnz() {
+ return Err(DecodeError::InvalidOperand);
+ }
+
let opwidth = imm_width_from_prefixes_64(SizeCode::vq, instruction.prefixes);
let modrm = read_modrm(words)?;
let r = (modrm >> 3) & 7;