diff options
| author | Ajax <commial@gmail.com> | 2017-03-29 15:44:15 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2017-03-30 16:04:40 +0200 |
| commit | f81c3e4b42d0ce487101b8e0802e43b32b261b1d (patch) | |
| tree | 91fcd0b4317685bc4685acbb17affc3ec0f78afc /miasm2/expression/simplifications_cond.py | |
| parent | fd76e24c84825072ce18cab33fbcc496bd4d8d65 (diff) | |
| download | miasm-f81c3e4b42d0ce487101b8e0802e43b32b261b1d.tar.gz miasm-f81c3e4b42d0ce487101b8e0802e43b32b261b1d.zip | |
Replace ExprInt[num](x) -> ExprInt(x, num)
Diffstat (limited to 'miasm2/expression/simplifications_cond.py')
| -rw-r--r-- | miasm2/expression/simplifications_cond.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/miasm2/expression/simplifications_cond.py b/miasm2/expression/simplifications_cond.py index 03bf6166..0d194d9a 100644 --- a/miasm2/expression/simplifications_cond.py +++ b/miasm2/expression/simplifications_cond.py @@ -169,7 +169,7 @@ def expr_simp_inverse(expr_simp, e): def expr_simp_equal(expr_simp, e): """(x - y)?(0:1) == (x == y)""" - to_match = m2_expr.ExprCond(jok1 + jok2, m2_expr.ExprInt1(0), m2_expr.ExprInt1(1)) + to_match = m2_expr.ExprCond(jok1 + jok2, m2_expr.ExprInt(0, 1), m2_expr.ExprInt(1, 1)) r = __MatchExprWrap(e, to_match, [jok1, jok2]) @@ -188,13 +188,13 @@ def exec_inf_unsigned(expr_simp, e): arg1, arg2 = e.args if isinstance(arg1, m2_expr.ExprInt) and isinstance(arg2, m2_expr.ExprInt): - return m2_expr.ExprInt1(1) if (arg1.arg < arg2.arg) else m2_expr.ExprInt1(0) + return m2_expr.ExprInt(1, 1) if (arg1.arg < arg2.arg) else m2_expr.ExprInt(0, 1) else: return e def __comp_signed(arg1, arg2): - """Return ExprInt1(1) if arg1 <s arg2 else ExprInt1(0) + """Return ExprInt(1, 1) if arg1 <s arg2 else ExprInt(0, 1) @arg1, @arg2: ExprInt""" val1 = int(arg1) @@ -205,7 +205,7 @@ def __comp_signed(arg1, arg2): if val2 >> (arg2.size - 1) == 1: val2 = - ((int(arg2.mask) ^ val2) + 1) - return m2_expr.ExprInt1(1) if (val1 < val2) else m2_expr.ExprInt1(0) + return m2_expr.ExprInt(1, 1) if (val1 < val2) else m2_expr.ExprInt(0, 1) def exec_inf_signed(expr_simp, e): "Compute x <s y" @@ -228,6 +228,6 @@ def exec_equal(expr_simp, e): arg1, arg2 = e.args if isinstance(arg1, m2_expr.ExprInt) and isinstance(arg2, m2_expr.ExprInt): - return m2_expr.ExprInt1(1) if (arg1.arg == arg2.arg) else m2_expr.ExprInt1(0) + return m2_expr.ExprInt(1, 1) if (arg1.arg == arg2.arg) else m2_expr.ExprInt(0, 1) else: return e |