From e5557e2d8a9195998dee5c9a529321fe26615ec7 Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Wed, 24 Feb 2016 11:05:07 +0100 Subject: x86/sem: Fix lodsq --- miasm2/arch/x86/sem.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'miasm2') diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index f66570a7..e843cd2b 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -1664,7 +1664,10 @@ def lods(ir, instr, size): e1 = irbloc(lbl_df_1.name, [e1]) e = [] - e.append(m2_expr.ExprAff(b, m2_expr.ExprMem(addr, size))) + if instr.mode == 64 and b.size == 32: + e.append(m2_expr.ExprAff(mRAX[instr.mode], m2_expr.ExprMem(addr, size).zeroExtend(64))) + else: + e.append(m2_expr.ExprAff(b, m2_expr.ExprMem(addr, size))) e.append(m2_expr.ExprAff(ir.IRDst, m2_expr.ExprCond(df, lbl_df_1, lbl_df_0))) -- cgit 1.4.1