diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-12-23 13:45:25 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-12-23 15:11:48 +0100 |
| commit | 494ba6e2b3711b519d7f99f2867e293b0f1650eb (patch) | |
| tree | 7eb36c35e792baa5806a68daeb16d4856ff9323b /example/expression | |
| parent | 103c1ea91b7cbeef86041974ac493f341513efd8 (diff) | |
| download | miasm-494ba6e2b3711b519d7f99f2867e293b0f1650eb.tar.gz miasm-494ba6e2b3711b519d7f99f2867e293b0f1650eb.zip | |
Expr: Remove exprint_from
Diffstat (limited to 'example/expression')
| -rw-r--r-- | example/expression/simplification_add.py | 4 | ||||
| -rw-r--r-- | example/expression/solve_condition_stp.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/example/expression/simplification_add.py b/example/expression/simplification_add.py index 008e094b..06b683fe 100644 --- a/example/expression/simplification_add.py +++ b/example/expression/simplification_add.py @@ -30,7 +30,7 @@ def simp_add_mul(expr_simp, expr): # Effective simplification return m2_expr.ExprOp("*", expr.args[0], - m2_expr.ExprInt_from(expr.args[0], 3)) + m2_expr.ExprInt(3, expr.args[0].size)) else: # Do not simplify return expr @@ -48,4 +48,4 @@ print "\t%s = %s" % (base_expr, expr_simp(base_expr)) # Automatic fail assert(expr_simp(base_expr) == m2_expr.ExprOp("*", a, - m2_expr.ExprInt_from(a, 3))) + m2_expr.ExprInt(3, a.size))) diff --git a/example/expression/solve_condition_stp.py b/example/expression/solve_condition_stp.py index 93c17018..67d536d5 100644 --- a/example/expression/solve_condition_stp.py +++ b/example/expression/solve_condition_stp.py @@ -80,11 +80,11 @@ def emul_symb(ir_arch, mdis, states_todo, states_done): # Create 2 states, each including complementary conditions p1 = sb.symbols.copy() p2 = sb.symbols.copy() - c1 = {ad.cond: ExprInt_from(ad.cond, 0)} - c2 = {ad.cond: ExprInt_from(ad.cond, 1)} + c1 = {ad.cond: ExprInt(0, ad.cond.size)} + c2 = {ad.cond: ExprInt(1, ad.cond.size)} print ad.cond - p1[ad.cond] = ExprInt_from(ad.cond, 0) - p2[ad.cond] = ExprInt_from(ad.cond, 1) + p1[ad.cond] = ExprInt(0, ad.cond.size) + p2[ad.cond] = ExprInt(1, ad.cond.size) ad1 = expr_simp(sb.eval_expr(ad.replace_expr(c1), {})) ad2 = expr_simp(sb.eval_expr(ad.replace_expr(c2), {})) if not (isinstance(ad1, ExprInt) or (isinstance(ad1, ExprId) and isinstance(ad1.name, asmbloc.asm_label)) and |