aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode/mod.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-08-21 17:10:39 -0700
committeriximeow <me@iximeow.net>2021-08-21 19:20:41 -0700
commit0a39607d690755c5f7f7462677fb75580946be2c (patch)
treeed23871a4c0d7ee722f766eb62230cd959879fd0 /src/long_mode/mod.rs
parent4016cd901ffd6f3a0d93330e734f04617f960666 (diff)
add description reporting for segment prefixes and opcodes for 32-bit and 16-bit
Diffstat (limited to 'src/long_mode/mod.rs')
-rw-r--r--src/long_mode/mod.rs10
1 files changed, 6 insertions, 4 deletions
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,