From 060fb29180f354e04ec8d48f0128433b634fa3c5 Mon Sep 17 00:00:00 2001 From: iximeow Date: Fri, 17 Dec 2021 11:03:37 -0800 Subject: write `apply_disp_scale` in a mode-agnostic way `apply_disp_scale` forgot that `wrapping_mul` exists, so we don't need to explicitly write the size of value that `mem_size` should be cast to, in casting to/from a signed integer. taken with `.into()`, we don't need per-architecture stubs to make evex decoding work. --- src/shared/evex.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shared') 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); } -- cgit v1.1