about summary refs log tree commit diff stats
path: root/miasm2/core/cpu.py
diff options
context:
space:
mode:
authorFlorent <florent.monjalet@gmail.com>2015-10-29 15:47:55 +0100
committerFlorent <florent.monjalet@gmail.com>2015-10-29 15:47:55 +0100
commitfefb609f7ed8267815e3ab4b7467a8fada7040b8 (patch)
tree03b82bcf93d36fa36f7cdee28b36eba3c7d59d40 /miasm2/core/cpu.py
parent967be0c4e0f8d32f6bf3e8aa9f85d0abc9ab95da (diff)
parentc4e4273c2d4e459eddc96c8ef0af0e5eff9c3f7e (diff)
downloadmiasm-fefb609f7ed8267815e3ab4b7467a8fada7040b8.tar.gz
miasm-fefb609f7ed8267815e3ab4b7467a8fada7040b8.zip
Merge pull request #250 from serpilliere/ExprInt_api
Expression: normalize ExprInt api
Diffstat (limited to 'miasm2/core/cpu.py')
-rw-r--r--miasm2/core/cpu.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py
index c42de507..cfbc1dfb 100644
--- a/miasm2/core/cpu.py
+++ b/miasm2/core/cpu.py
@@ -260,7 +260,7 @@ def extract_ast_core(v, my_id2expr, my_int2expr):
         pass
     elif len(sizes) == 1:
         size = sizes.pop()
-        my_int2expr = lambda x: m2_expr.ExprInt_fromsize(size, x)
+        my_int2expr = lambda x: m2_expr.ExprInt(x, size)
     else:
         raise ValueError('multiple sizes in ids')
     e = ast_raw2expr(ast_tokens, my_id2expr, my_int2expr)
@@ -965,7 +965,7 @@ class instruction(object):
                     if size is None:
                         default_size = self.get_symbol_size(x, symbols)
                         size = default_size
-                    value = m2_expr.ExprInt_fromsize(size, symbols[name].offset)
+                    value = m2_expr.ExprInt(symbols[name].offset, size)
                 fixed_ids[x] = value
             e = e.replace_expr(fixed_ids)
             e = expr_simp(e)
@@ -1468,7 +1468,7 @@ class imm_noarg(object):
     def int2expr(self, v):
         if (v & ~self.intmask) != 0:
             return None
-        return m2_expr.ExprInt_fromsize(self.intsize, v)
+        return m2_expr.ExprInt(v, self.intsize)
 
     def expr2int(self, e):
         if not isinstance(e, m2_expr.ExprInt):