diff options
| author | Ajax <commial@gmail.com> | 2015-11-13 14:09:31 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-11-13 14:09:31 +0100 |
| commit | 23523f31b741ed1a901cdb56e862ab7ed9bc9474 (patch) | |
| tree | 84b29d9042efd4d8b6668e8ad4fa82b2766fc577 | |
| parent | aacbb36ce44c91ccb51137df8e8f8f841dac2d36 (diff) | |
| download | miasm-23523f31b741ed1a901cdb56e862ab7ed9bc9474.tar.gz miasm-23523f31b741ed1a901cdb56e862ab7ed9bc9474.zip | |
x86/sem: fix rol semantics (handle 0-round case)
| -rw-r--r-- | miasm2/arch/x86/sem.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index d8f1726c..dc7841b9 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -461,16 +461,7 @@ def _rotate_tpl(ir, instr, a, b, op, left=False, include_cf=False): def l_rol(ir, instr, a, b): - e = [] - shifter = get_shift(a, b) - c = m2_expr.ExprOp('<<<', a, shifter) - - new_cf = c[:1] - e.append(m2_expr.ExprAff(cf, new_cf)) - # hack (only valid if b=1) - e.append(m2_expr.ExprAff(of, c.msb() ^ new_cf)) - e.append(m2_expr.ExprAff(a, c)) - return e, [] + return _rotate_tpl(ir, instr, a, b, '<<<', left=True) def l_ror(ir, instr, a, b): |