diff options
| author | Ajax <commial@gmail.com> | 2015-11-12 18:54:13 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-11-12 18:54:13 +0100 |
| commit | ab17bd233f0000e8e95295742db7d1e8cf8a722c (patch) | |
| tree | 9e9c54836807191a7b0a4fe1f5f61744719d9e81 | |
| parent | f761f21ad0862e00a160155e37c0eea711b3d4ce (diff) | |
| download | miasm-ab17bd233f0000e8e95295742db7d1e8cf8a722c.tar.gz miasm-ab17bd233f0000e8e95295742db7d1e8cf8a722c.zip | |
x86/sem: handle overflow flag in shrd
Diffstat (limited to '')
| -rw-r--r-- | miasm2/arch/x86/sem.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 96f0bb62..9763b07c 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -512,7 +512,9 @@ def _shift_tpl(op, ir, instr, a, b, c=None, op_inv=None): e_do = [ m2_expr.ExprAff(cf, new_cf), - m2_expr.ExprAff(of, m2_expr.ExprInt_from(of, 0)), + m2_expr.ExprAff(of, m2_expr.ExprCond(shifter - m2_expr.ExprInt(1, size=shifter.size), + m2_expr.ExprInt_from(of, 0), + b[:1] ^ a.msb())), m2_expr.ExprAff(a, res), ] |