diff options
author | iximeow <me@iximeow.net> | 2019-01-05 02:05:27 -0800 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 16:10:13 -0800 |
commit | a2fdcc2106024e7e9b1b119c9de50242706c9424 (patch) | |
tree | 42c52312c3b3d0bce5532925a7838cb62f810f61 /src | |
parent | b14958d55dd098d43719ef0284fe3de2d8f7c020 (diff) |
fix incorrect handling of scale in some sib instances
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1379,10 +1379,10 @@ fn read_E(bytes_iter: &mut Iterator<Item=&u8>, prefixes: &Prefixes, m: u8, modbi bank: width_to_gp_reg_bank(width) }; if disp == 0 { - *result = Operand::RegIndexBaseScale(base_reg, index_reg, ss); + *result = Operand::RegIndexBaseScale(base_reg, index_reg, 1u8 << ss); Ok(()) } else { - *result = Operand::RegIndexBaseScaleDisp(base_reg, index_reg, ss, disp as i32); + *result = Operand::RegIndexBaseScaleDisp(base_reg, index_reg, 1u8 << ss, disp as i32); Ok(()) } } |