diff options
author | iximeow <me@iximeow.net> | 2021-12-16 19:58:15 -0800 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2021-12-16 20:01:26 -0800 |
commit | f063f747c21548329170fd09fd09d391b2277aed (patch) | |
tree | 38159b9379c7f7c081554d431f78872b5a465e92 /src/real_mode/evex.rs | |
parent | cd987288f0334b9888174f4ccc2d1f564388e994 (diff) |
displacements are stored as unsigned, but are functionally signed ints
so multiplying to expand EVEX compressed offsets can overflow, and that
needs to be okay.
Diffstat (limited to 'src/real_mode/evex.rs')
-rw-r--r-- | src/real_mode/evex.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/real_mode/evex.rs b/src/real_mode/evex.rs index 9840b35..b63c08d 100644 --- a/src/real_mode/evex.rs +++ b/src/real_mode/evex.rs @@ -11,7 +11,7 @@ fn isa_has_qwords() -> bool { } fn apply_disp_scale(inst: &mut Instruction) { - inst.disp *= inst.mem_size as u32; + inst.disp = ((inst.disp as i32) * (inst.mem_size as i32)) as u32; } include!("../shared/generated_evex.in"); |