about summary refs log tree commit diff stats
path: root/miasm2/core/sembuilder.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2015-11-17 12:57:03 +0100
committerAjax <commial@gmail.com>2015-11-17 13:16:21 +0100
commitbf4c21011c8396b939e147615d12998a11c91dcd (patch)
treeeed2791c9c96039c6603d0173646eb4265a85366 /miasm2/core/sembuilder.py
parent092909dfbdd87ddfd851f622951de461c6636da3 (diff)
downloadmiasm-bf4c21011c8396b939e147615d12998a11c91dcd.tar.gz
miasm-bf4c21011c8396b939e147615d12998a11c91dcd.zip
Semantic: instr.mode doesn't stand for ir.IRDst.size
These objects may represent two different things. In x86, they both have
the same value, but this is not always true for others architectures
Diffstat (limited to 'miasm2/core/sembuilder.py')
-rw-r--r--miasm2/core/sembuilder.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/miasm2/core/sembuilder.py b/miasm2/core/sembuilder.py
index ecced326..83981919 100644
--- a/miasm2/core/sembuilder.py
+++ b/miasm2/core/sembuilder.py
@@ -151,11 +151,11 @@ class SemBuilder(object):
     def _create_labels(lbl_else=False):
         """Return the AST standing for label creations
         @lbl_else (optional): if set, create a label 'lbl_else'"""
-        lbl_end = "lbl_end = ExprId(ir.get_next_label(instr), instr.mode)"
+        lbl_end = "lbl_end = ExprId(ir.get_next_label(instr), ir.IRDst.size)"
         out = ast.parse(lbl_end).body
-        out += ast.parse("lbl_if = ExprId(ir.gen_label())").body
+        out += ast.parse("lbl_if = ExprId(ir.gen_label(), ir.IRDst.size)").body
         if lbl_else:
-            out += ast.parse("lbl_else = ExprId(ir.gen_label())").body
+            out += ast.parse("lbl_else = ExprId(ir.gen_label(), ir.IRDst.size)").body
         return out
 
     def _parse_body(self, body, argument_names):