diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/long_mode/evex.rs | 4 | ||||
-rw-r--r-- | src/protected_mode/evex.rs | 4 | ||||
-rw-r--r-- | src/real_mode/evex.rs | 4 | ||||
-rw-r--r-- | src/shared/evex.in | 2 |
4 files changed, 1 insertions, 13 deletions
diff --git a/src/long_mode/evex.rs b/src/long_mode/evex.rs index 5c0967b..2c0d765 100644 --- a/src/long_mode/evex.rs +++ b/src/long_mode/evex.rs @@ -10,9 +10,5 @@ fn isa_has_qwords() -> bool { true } -fn apply_disp_scale(inst: &mut Instruction) { - inst.disp = ((inst.disp as i64) * (inst.mem_size as i64)) as u64; -} - include!("../shared/generated_evex.in"); include!("../shared/evex.in"); diff --git a/src/protected_mode/evex.rs b/src/protected_mode/evex.rs index 2ef91b6..b42433c 100644 --- a/src/protected_mode/evex.rs +++ b/src/protected_mode/evex.rs @@ -10,9 +10,5 @@ fn isa_has_qwords() -> bool { false } -fn apply_disp_scale(inst: &mut Instruction) { - inst.disp = ((inst.disp as i32) * (inst.mem_size as i32)) as u32; -} - include!("../shared/generated_evex.in"); include!("../shared/evex.in"); diff --git a/src/real_mode/evex.rs b/src/real_mode/evex.rs index b63c08d..8ab1c77 100644 --- a/src/real_mode/evex.rs +++ b/src/real_mode/evex.rs @@ -10,9 +10,5 @@ fn isa_has_qwords() -> bool { false } -fn apply_disp_scale(inst: &mut Instruction) { - inst.disp = ((inst.disp as i32) * (inst.mem_size as i32)) as u32; -} - include!("../shared/generated_evex.in"); include!("../shared/evex.in"); diff --git a/src/shared/evex.in b/src/shared/evex.in index 5d3b053..31fc3a7 100644 --- a/src/shared/evex.in +++ b/src/shared/evex.in @@ -240,7 +240,7 @@ pub(crate) fn read_evex< if let Some(size) = overridden_size { instruction.disp = instruction.disp.wrapping_mul(size); } else { - apply_disp_scale(instruction); + instruction.disp = instruction.disp.wrapping_mul(instruction.mem_size.into()); } instruction.prefixes.apply_compressed_disp(false); } |