about summary refs log tree commit diff stats
path: root/miasm2/arch/x86/arch.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/arch/x86/arch.py')
-rw-r--r--miasm2/arch/x86/arch.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py
index 4a044d6a..2be64c0e 100644
--- a/miasm2/arch/x86/arch.py
+++ b/miasm2/arch/x86/arch.py
@@ -7,7 +7,6 @@ from miasm2.core.cpu import *
 from collections import defaultdict
 import miasm2.arch.x86.regs as regs_module
 from miasm2.arch.x86.regs import *
-from miasm2.core.asmblock import AsmLabel
 from miasm2.core.asm_ast import AstNode, AstInt, AstId, AstMem, AstOp
 
 
@@ -273,8 +272,8 @@ class x86_arg(m_arg):
             if value.name in ["FAR"]:
                 return None
 
-            label = symbol_pool.getby_name_create(value.name)
-            return ExprLoc(label.loc_key, size_hint)
+            loc_key = symbol_pool.getby_name_create(value.name)
+            return ExprLoc(loc_key, size_hint)
         if isinstance(value, AstOp):
             # First pass to retreive fixed_size
             if value.op == "segm":
@@ -477,8 +476,8 @@ class instruction_x86(instruction):
         if not expr.is_int():
             return
         addr = expr.arg + int(self.offset)
-        label = symbol_pool.getby_offset_create(addr)
-        self.args[0] = ExprLoc(label.loc_key, expr.size)
+        loc_key = symbol_pool.getby_offset_create(addr)
+        self.args[0] = ExprLoc(loc_key, expr.size)
 
     def breakflow(self):
         if self.name in conditional_branch + unconditional_branch:
@@ -515,8 +514,8 @@ class instruction_x86(instruction):
     def getdstflow(self, symbol_pool):
         if self.additional_info.g1.value & 6 and self.name in repeat_mn:
             addr = int(self.offset)
-            label = symbol_pool.getby_offset_create(addr)
-            return [ExprLoc(label.loc_key, self.v_opmode())]
+            loc_key = symbol_pool.getby_offset_create(addr)
+            return [ExprLoc(loc_key, self.v_opmode())]
         return [self.args[0]]
 
     def get_symbol_size(self, symbol, symbol_pool):
@@ -563,9 +562,9 @@ class instruction_x86(instruction):
     def arg2str(expr, index=None, symbol_pool=None):
         if expr.is_id() or expr.is_int():
             o = str(expr)
-        elif expr.is_label():
+        elif expr.is_loc():
             if symbol_pool is not None:
-                o = str(symbol_pool.loc_key_to_label(expr.loc_key))
+                o = symbol_pool.str_loc_key(expr.loc_key)
             else:
                 o = str(expr)
         elif ((isinstance(expr, ExprOp) and expr.op == 'far' and