diff options
| author | Camille Mougey <commial@gmail.com> | 2016-03-15 17:09:06 +0100 |
|---|---|---|
| committer | Camille Mougey <commial@gmail.com> | 2016-03-15 17:09:06 +0100 |
| commit | fd90bd76db35d3cb077d72e4782c3c1d5e3820ec (patch) | |
| tree | e08c53675646d2f216d939d13077cf3b8734876e /miasm2/arch/x86/sem.py | |
| parent | 4c9f108ab0ce059532b7f1f776898912fce49278 (diff) | |
| parent | 1bf8fe58d6580a7af1cc0a6b6599d2cc0bdc986c (diff) | |
| download | miasm-fd90bd76db35d3cb077d72e4782c3c1d5e3820ec.tar.gz miasm-fd90bd76db35d3cb077d72e4782c3c1d5e3820ec.zip | |
Merge pull request #335 from serpilliere/x86_sal_shl
X86 sal shl
Diffstat (limited to 'miasm2/arch/x86/sem.py')
| -rw-r--r-- | miasm2/arch/x86/sem.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index cd456f7b..cc227819 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -597,22 +597,6 @@ def shrd(ir, instr, a, b, c): return _shift_tpl(">>>", ir, instr, a, b, c, "<<<") -def sal(ir, instr, a, b): - e = [] - shifter = get_shift(a, b) - c = m2_expr.ExprOp('a<<', 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, [] - - def shl(ir, instr, a, b): return _shift_tpl("<<", ir, instr, a, b, left=True) @@ -3623,7 +3607,7 @@ def ps_rl_ll(ir, instr, a, b, op, size): e_do = [] slices = [] for i in xrange(0, a.size, size): - slices.append((m2_expr.ExprOp(op,a[i:i + size], count[:size]), + slices.append((m2_expr.ExprOp(op, a[i:i + size], count[:size]), i, i + size)) e.append(m2_expr.ExprAff(a[0:a.size], m2_expr.ExprCompose(slices))) e_do.append(m2_expr.ExprAff(ir.IRDst, lbl_next)) @@ -3995,7 +3979,7 @@ mnemo_func = {'mov': mov, 'rcr': rcr, 'sar': sar, 'shr': shr, - 'sal': sal, + 'sal': shl, 'shl': shl, 'shld': shld, 'cmc': cmc, |