From 0a39607d690755c5f7f7462677fb75580946be2c Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 21 Aug 2021 17:10:39 -0700 Subject: add description reporting for segment prefixes and opcodes for 32-bit and 16-bit --- src/long_mode/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/long_mode') diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index 228efee..111ba69 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -7486,10 +7486,12 @@ fn read_with_annotations< .with_id(words.offset() as u32 * 8 - 9) ); } - sink.record((words.offset() - 1) as u32 * 8, (words.offset() - 1) as u32 * 8 + 7, FieldDescription { - desc: InnerDescription::Opcode(opc), - id: words.offset() as u32 * 8 - 8, - }); + if opc != Opcode::Invalid { + sink.record((words.offset() - 1) as u32 * 8, (words.offset() - 1) as u32 * 8 + 7, FieldDescription { + desc: InnerDescription::Opcode(opc), + id: words.offset() as u32 * 8 - 8, + }); + } sink.record((words.offset() - 1) as u32 * 8, (words.offset() - 1) as u32 * 8 + 7, FieldDescription { desc: InnerDescription::OperandCode(record.1), id: words.offset() as u32 * 8 - 8 + 1, -- cgit v1.1