about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--miasm2/arch/x86/sem.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py
index 5d564fb1..81da8107 100644
--- a/miasm2/arch/x86/sem.py
+++ b/miasm2/arch/x86/sem.py
@@ -4648,7 +4648,9 @@ class ir_x86_16(IntermediateRepresentation):
         # get instruction size
         s = {"B": 8, "W": 16, "D": 32, 'Q': 64}[instr.name[-1]]
         size = instr.v_opmode()
-        c_reg = mRCX[instr.mode][:size]
+        admode = instr.v_admode()
+        c_reg = mRCX[instr.mode][:admode]
+
         out_ir = []
         zf_val = None
         # set if zf is tested (cmps, scas)