about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2016-02-26 09:31:21 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2016-02-26 15:53:53 +0100
commit75271c4e1f1917eee58ce71aeaf4bd6acb228ebf (patch)
treeb318bc0227f6e8be341855db3a771f6f2b22c71a
parent35ead949d8c0d9788ddc602d9dc206f416adcd7b (diff)
downloadmiasm-75271c4e1f1917eee58ce71aeaf4bd6acb228ebf.tar.gz
miasm-75271c4e1f1917eee58ce71aeaf4bd6acb228ebf.zip
x86/sem: fix xadd
-rw-r--r--miasm2/arch/x86/sem.py3
1 files changed, 2 insertions, 1 deletions
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, []