From 1b47026b5c108e87b7233736aa67506ef32e3713 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 8 Aug 2020 18:11:31 -0700 Subject: this makes it faster i guess --- src/long_mode/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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>(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; -- cgit v1.1