From f81c3e4b42d0ce487101b8e0802e43b32b261b1d Mon Sep 17 00:00:00 2001 From: Ajax Date: Wed, 29 Mar 2017 15:44:15 +0200 Subject: Replace ExprInt[num](x) -> ExprInt(x, num) --- miasm2/expression/simplifications_cond.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'miasm2/expression/simplifications_cond.py') 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 > (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