aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2019-11-29 17:21:28 -0800
committeriximeow <me@iximeow.net>2020-01-12 16:10:13 -0800
commitd37aefee4edb15ca58534454c7d5dd87af696fef (patch)
treecde69751aabb07ea52a7184f974dacbbbb59aa05 /src/lib.rs
parent5c86aaf06d0f638d3fc1d302ef4d401b0222bee1 (diff)
hack to handle prefixed sequences that might appear to be escaped opcodes
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d507f3c..312be7c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1237,7 +1237,8 @@ const BITWISE_OPCODE_MAP: [Opcode; 8] = [
Opcode::SAR
];
fn read_opcode_660f_map<T: Iterator<Item=u8>>(_bytes_iter: &mut T, _length: &mut u8) -> Option<OpcodeRecord> {
- panic!("660f opcode map unsupported".to_string());
+ None
+// panic!("660f opcode map unsupported".to_string());
}
const OPCODE_F20F_MAP: [OpcodeRecord; 256] = [
@@ -2645,7 +2646,10 @@ pub fn read_instr<T: Iterator<Item=u8>>(mut bytes_iter: T, instruction: &mut Ins
} else if b == 0x0f {
if let Some(record) = match alternate_opcode_map {
Some(OpcodeMap::Map66) => {
- read_opcode_660f_map(&mut bytes_iter, &mut length)
+ // read_opcode_660f_map(&mut bytes_iter, &mut length)
+ prefixes.set_operand_size();
+ length += 1;
+ Some(OPCODES[bytes_iter.next().unwrap() as usize])
},
Some(OpcodeMap::MapF2) => {
read_opcode_f20f_map(&mut bytes_iter, &mut length)