aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode/mod.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2020-08-08 23:06:57 -0700
committeriximeow <me@iximeow.net>2020-08-09 01:39:01 -0700
commitc9ef98a4a703e202994ae73f43d7bb8e999f879d (patch)
treecd3bd9cf53a73c811a9699746f6dc87278d1f235 /src/long_mode/mod.rs
parentf6fb6d2bac3c6e812b3bfbfb25d854e324801a20 (diff)
Revert "bad idea"
This reverts commit 23cbcb390c723c4c39113ce93ccff89308b6623c.
Diffstat (limited to 'src/long_mode/mod.rs')
-rw-r--r--src/long_mode/mod.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs
index 3795999..ea92211 100644
--- a/src/long_mode/mod.rs
+++ b/src/long_mode/mod.rs
@@ -6245,6 +6245,16 @@ fn read_operands<T: Iterator<Item=u8>>(decoder: &InstDecoder, mut bytes_iter: T,
instruction.operand_count = 0;
return Ok(());
},
+ _ => {
+ unlikely_operands(decoder, bytes_iter, instruction, operand_code, mem_oper, length)?;
+ }
+ };
+ }
+
+ Ok(())
+}
+fn unlikely_operands<T: Iterator<Item=u8>>(decoder: &InstDecoder, mut bytes_iter: T, instruction: &mut Instruction, operand_code: OperandCode, mem_oper: OperandSpec, length: &mut u8) -> Result<(), DecodeError> {
+ match operand_code {
OperandCode::I_1 => {
instruction.imm = 1;
instruction.operands[0] = OperandSpec::ImmU8;
@@ -7967,7 +7977,6 @@ fn read_operands<T: Iterator<Item=u8>>(decoder: &InstDecoder, mut bytes_iter: T,
return Err(DecodeError::InvalidOperand);
}
};
- }
Ok(())
}