From a4b6304bd0df5fbab311a037d7c04b1ecbef7b14 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 3 Jul 2021 10:17:17 -0700 Subject: port over x86_64 improvements to x86_32 --- src/long_mode/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/long_mode') 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::Address, { + 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; -- cgit v1.1