diff options
| author | Ajax <commial@gmail.com> | 2015-11-13 14:25:22 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-11-13 14:25:22 +0100 |
| commit | dfe2e8bc8fd761c5c05623564742c18daafaf48d (patch) | |
| tree | 662cc3446959bfc5b93deefab16756f8fbd969ce | |
| parent | 9f5e46bffb5db36e79451f61a1b73a0bb4fc25ed (diff) | |
| download | miasm-dfe2e8bc8fd761c5c05623564742c18daafaf48d.tar.gz miasm-dfe2e8bc8fd761c5c05623564742c18daafaf48d.zip | |
x86/sem: fix SHL (handle 0-round case)
| -rw-r--r-- | miasm2/arch/x86/sem.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 5bf4a7a1..521062c5 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -605,19 +605,7 @@ def sal(ir, instr, a, b): def shl(ir, instr, a, b): - e = [] - shifter = get_shift(a, b) - c = a << shifter - new_cf = (a >> (m2_expr.ExprInt_from(a, a.size) - shifter))[:1] - e.append(m2_expr.ExprAff(cf, m2_expr.ExprCond(shifter, - new_cf, - cf) - ) - ) - e += update_flag_znp(c) - e.append(m2_expr.ExprAff(of, c.msb() ^ new_cf)) - e.append(m2_expr.ExprAff(a, c)) - return e, [] + return _shift_tpl("<<", ir, instr, a, b, left=True) def shld_cl(ir, instr, a, b): |