about summary refs log tree commit diff stats
path: root/miasm2/arch/x86/sem.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2014-09-05 16:09:55 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2014-09-05 16:09:55 +0200
commit75399c706160678a724d2c6f9d288f62b29f494d (patch)
tree292f22b07d06497e203428afcd886631a84070bd /miasm2/arch/x86/sem.py
parentc3463980ca9a3ac261cc52f9191a86811159d3c7 (diff)
downloadmiasm-75399c706160678a724d2c6f9d288f62b29f494d.tar.gz
miasm-75399c706160678a724d2c6f9d288f62b29f494d.zip
x86 sem: fix sar/shr multiple irdst
Diffstat (limited to 'miasm2/arch/x86/sem.py')
-rw-r--r--miasm2/arch/x86/sem.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py
index 5dd1168a..c304def6 100644
--- a/miasm2/arch/x86/sem.py
+++ b/miasm2/arch/x86/sem.py
@@ -392,7 +392,6 @@ def sar(ir, instr, a, b):
         ExprAff(cf, new_cf),
         ExprAff(of, ExprInt_from(of, 0)),
         ExprAff(a, c),
-        ExprAff(ir.IRDst, lbl_skip)
     ]
 
     e_do += update_flag_znp(c)
@@ -404,6 +403,8 @@ def sar(ir, instr, a, b):
         else:
             return [], []
 
+    e_do.append(ExprAff(ir.IRDst, lbl_skip))
+
     e = []
     e.append(ExprAff(ir.IRDst, ExprCond(shifter, lbl_do, lbl_skip)))
     return e, [irbloc(lbl_do.name, [e_do])]
@@ -423,7 +424,6 @@ def shr(ir, instr, a, b):
         ExprAff(cf, new_cf),
         ExprAff(of, ExprInt_from(of, 0)),
         ExprAff(a, c),
-        ExprAff(ir.IRDst, lbl_skip)
     ]
 
     e_do += update_flag_znp(c)
@@ -435,6 +435,8 @@ def shr(ir, instr, a, b):
         else:
             return [], []
 
+    e_do.append(ExprAff(ir.IRDst, lbl_skip))
+
     e = []
     e.append(ExprAff(ir.IRDst, ExprCond(shifter, lbl_do, lbl_skip)))
     return e, [irbloc(lbl_do.name, [e_do])]