From b6f83fa1b4859a6de2d7017e9709b9520d933f6b Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 21 Aug 2021 17:22:07 -0700 Subject: add descriptions for other prefixes, 16-bit addressing --- src/long_mode/mod.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/long_mode/mod.rs') diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index 111ba69..d68bb95 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -7614,20 +7614,40 @@ fn read_with_annotations< prefixes.set_gs(); }, 0x66 => { + sink.record((words.offset() - 2) as u32 * 8, (words.offset() - 2) as u32 * 8 + 7, FieldDescription { + desc: InnerDescription::Misc("operand size override (to 16 bits)"), + id: words.offset() as u32 * 8 - 16, + }); prefixes.set_operand_size(); }, 0x67 => { + sink.record((words.offset() - 2) as u32 * 8, (words.offset() - 2) as u32 * 8 + 7, FieldDescription { + desc: InnerDescription::Misc("address size override (to 32 bits)"), + id: words.offset() as u32 * 8 - 16, + }); prefixes.set_address_size(); instruction.regs[1].bank = RegisterBank::D; instruction.regs[2].bank = RegisterBank::D; }, 0xf0 => { + sink.record((words.offset() - 2) as u32 * 8, (words.offset() - 2) as u32 * 8 + 7, FieldDescription { + desc: InnerDescription::Misc("lock prefix"), + id: words.offset() as u32 * 8 - 16, + }); prefixes.set_lock(); }, 0xf2 => { + sink.record((words.offset() - 2) as u32 * 8, (words.offset() - 2) as u32 * 8 + 7, FieldDescription { + desc: InnerDescription::Misc("repnz prefix"), + id: words.offset() as u32 * 8 - 16, + }); prefixes.set_repnz(); }, 0xf3 => { + sink.record((words.offset() - 2) as u32 * 8, (words.offset() - 2) as u32 * 8 + 7, FieldDescription { + desc: InnerDescription::Misc("rep prefix"), + id: words.offset() as u32 * 8 - 16, + }); prefixes.set_rep(); }, _ => { unsafe { unreachable_unchecked(); } } -- cgit v1.1