From 060fb29180f354e04ec8d48f0128433b634fa3c5 Mon Sep 17 00:00:00 2001
From: iximeow <me@iximeow.net>
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/real_mode/evex.rs | 4 ----
 1 file changed, 4 deletions(-)

(limited to 'src/real_mode')

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");
-- 
cgit v1.1