diff options
author | iximeow <me@iximeow.net> | 2020-08-08 18:11:31 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-08-09 01:38:57 -0700 |
commit | 1b47026b5c108e87b7233736aa67506ef32e3713 (patch) | |
tree | dc31bce1cc302c27ec9395eb1e5671f4c029f2e7 /src/long_mode/mod.rs | |
parent | 38b524b6f9e18222108958d97c6867ee71516258 (diff) |
this makes it faster i guess
Diffstat (limited to 'src/long_mode/mod.rs')
-rw-r--r-- | src/long_mode/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index e6b322b..80398e7 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -5390,12 +5390,12 @@ fn read_M<T: Iterator<Item=u8>>(bytes_iter: &mut T, instr: &mut Instruction, mod } else { instr.modrm_mmm.num = 0; } + if instr.prefixes.rex().x() { + instr.sib_index.num = 0b1000; + } else { + instr.sib_index.num = 0; + } let op_spec = if mmm == 4 { - if instr.prefixes.rex().x() { - instr.sib_index.num = 0b1000; - } else { - instr.sib_index.num = 0; - } return read_sib(bytes_iter, instr, modrm, length); } else if mmm == 5 && modbits == 0b00 { *length += 4; |