diff options
| author | iximeow <me@iximeow.net> | 2021-08-21 17:22:07 -0700 | 
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2021-08-21 19:20:41 -0700 | 
| commit | b6f83fa1b4859a6de2d7017e9709b9520d933f6b (patch) | |
| tree | 17988288f2d126a34569b0dfd1fc00f8f639c40b /src/real_mode | |
| parent | 0a39607d690755c5f7f7462677fb75580946be2c (diff) | |
add descriptions for other prefixes, 16-bit addressing
Diffstat (limited to 'src/real_mode')
| -rw-r--r-- | src/real_mode/mod.rs | 26 | 
1 files changed, 23 insertions, 3 deletions
diff --git a/src/real_mode/mod.rs b/src/real_mode/mod.rs index df0ba07..b60e3ee 100644 --- a/src/real_mode/mod.rs +++ b/src/real_mode/mod.rs @@ -5897,7 +5897,7 @@ fn read_M_16bit<              sink.record(                  modrm_start + 6,                  modrm_start + 7, -                InnerDescription::Misc("mod bits of 00 selects a dereference with no displacement") +                InnerDescription::Misc("mmm selects a dereference with no displacement (mod bits: 00)")                      .with_id(modrm_start + 0)              );              if mmm > 3 { @@ -5913,7 +5913,7 @@ fn read_M_16bit<              sink.record(                  modrm_start + 6,                  modrm_start + 7, -                InnerDescription::Misc("mod bits of 01 selects a dereference with 8-bit displacement") +                InnerDescription::Misc("mmm selects registers for deref address with 8-bit displacement (mod bits: 01)")                      .with_id(modrm_start + 0)              );              sink.record( @@ -5943,7 +5943,7 @@ fn read_M_16bit<              sink.record(                  modrm_start + 6,                  modrm_start + 7, -                InnerDescription::Misc("mod bits of 10 selects a dereference with 16-bit displacement") +                InnerDescription::Misc("mmm selects registers for deref address with 16-bit displacement (mod bits: 10)")                      .with_id(modrm_start + 0)              );              sink.record( @@ -7576,18 +7576,38 @@ 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 32 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();                  },                  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(); } }  | 
