From 75271c4e1f1917eee58ce71aeaf4bd6acb228ebf Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Fri, 26 Feb 2016 09:31:21 +0100 Subject: x86/sem: fix xadd --- miasm2/arch/x86/sem.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'miasm2') diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index c14d6f97..f2cedb34 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -319,7 +319,8 @@ def xadd(ir, instr, a, b): e += update_flag_arith(c) e += update_flag_af(a, b, c) e += update_flag_add(b, a, c) - e.append(m2_expr.ExprAff(b, a)) + if a != b: + e.append(m2_expr.ExprAff(b, a)) e.append(m2_expr.ExprAff(a, c)) return e, [] -- cgit 1.4.1