about summary refs log tree commit diff stats
path: root/miasm2/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/arch/arm')
-rw-r--r--miasm2/arch/arm/arch.py8
-rw-r--r--miasm2/arch/arm/disasm.py2
-rw-r--r--miasm2/arch/arm/sem.py12
3 files changed, 11 insertions, 11 deletions
diff --git a/miasm2/arch/arm/arch.py b/miasm2/arch/arm/arch.py
index 498de94c..1810cd6a 100644
--- a/miasm2/arch/arm/arch.py
+++ b/miasm2/arch/arm/arch.py
@@ -349,7 +349,7 @@ class instruction_arm(instruction):
             return str(expr)
         elif expr.is_loc():
             if loc_db is not None:
-                return loc_db.str_loc_key(expr.loc_key)
+                return loc_db.pretty_str(expr.loc_key)
             else:
                 return str(expr)
         if isinstance(expr, ExprOp) and expr.op in expr2shift_dct:
@@ -430,7 +430,7 @@ class instruction_arm(instruction):
             addr = expr.arg + self.offset
         else:
             addr = expr.arg + self.offset
-        loc_key = loc_db.getby_offset_create(addr)
+        loc_key = loc_db.get_or_create_offset_location(addr)
         self.args[0] = ExprLoc(loc_key, expr.size)
 
     def breakflow(self):
@@ -512,7 +512,7 @@ class instruction_armt(instruction_arm):
         else:
             addr = expr.arg + self.offset
 
-        loc_key = loc_db.getby_offset_create(addr)
+        loc_key = loc_db.get_or_create_offset_location(addr)
         dst = ExprLoc(loc_key, expr.size)
 
         if self.name in ["CBZ", "CBNZ"]:
@@ -780,7 +780,7 @@ class arm_arg(m_arg):
                 return arg.name
             if arg.name in gpregs.str:
                 return None
-            loc_key = loc_db.getby_name_create(arg.name)
+            loc_key = loc_db.get_or_create_name_location(arg.name)
             return ExprLoc(loc_key, 32)
         if isinstance(arg, AstOp):
             args = [self.asm_ast_to_expr(tmp, loc_db) for tmp in arg.args]
diff --git a/miasm2/arch/arm/disasm.py b/miasm2/arch/arm/disasm.py
index 41034211..5e21778d 100644
--- a/miasm2/arch/arm/disasm.py
+++ b/miasm2/arch/arm/disasm.py
@@ -24,7 +24,7 @@ def cb_arm_fix_call(mn, cur_bloc, loc_db, offsets_to_dis, *args, **kwargs):
         return
     if not l2.args[1] in values:
         return
-    loc_key_cst = loc_db.getby_offset_create(l1.offset + 4)
+    loc_key_cst = loc_db.get_or_create_offset_location(l1.offset + 4)
     cur_bloc.add_cst(loc_key_cst, AsmConstraint.c_next)
     offsets_to_dis.add(l1.offset + 4)
 
diff --git a/miasm2/arch/arm/sem.py b/miasm2/arch/arm/sem.py
index 6e311f8e..a3d12514 100644
--- a/miasm2/arch/arm/sem.py
+++ b/miasm2/arch/arm/sem.py
@@ -441,8 +441,8 @@ def sdiv(ir, instr, a, b, c=None):
     if c is None:
         b, c = a, b
 
-    loc_div = ExprLoc(ir.loc_db.gen_loc_key(), ir.IRDst.size)
-    loc_except = ExprId(ir.loc_db.gen_loc_key(), ir.IRDst.size)
+    loc_div = ExprLoc(ir.loc_db.add_location(), ir.IRDst.size)
+    loc_except = ExprId(ir.loc_db.add_location(), ir.IRDst.size)
     loc_next = ExprLoc(ir.get_next_loc_key(instr), ir.IRDst.size)
 
     e.append(ExprAff(ir.IRDst, ExprCond(c, loc_div, loc_except)))
@@ -474,8 +474,8 @@ def udiv(ir, instr, a, b, c=None):
 
 
 
-    loc_div = ExprLoc(ir.loc_db.gen_loc_key(), ir.IRDst.size)
-    loc_except = ExprLoc(ir.loc_db.gen_loc_key(), ir.IRDst.size)
+    loc_div = ExprLoc(ir.loc_db.add_location(), ir.IRDst.size)
+    loc_except = ExprLoc(ir.loc_db.add_location(), ir.IRDst.size)
     loc_next = ExprLoc(ir.get_next_loc_key(instr), ir.IRDst.size)
 
     e.append(ExprAff(ir.IRDst, ExprCond(c, loc_div, loc_except)))
@@ -1266,7 +1266,7 @@ def add_condition_expr(ir, instr, cond, instr_ir, extra_ir):
 
     loc_next = ir.get_next_loc_key(instr)
     loc_next_expr = ExprLoc(loc_next, 32)
-    loc_do = ir.loc_db.gen_loc_key()
+    loc_do = ir.loc_db.add_location()
     loc_do_expr = ExprLoc(loc_do, 32)
 
     dst_cond = ExprCond(cond, loc_do_expr, loc_next_expr)
@@ -1556,7 +1556,7 @@ class ir_arml(IntermediateRepresentation):
             instr = block.lines[index]
 
             # Add conditionnal jump to current irblock
-            loc_do = self.loc_db.gen_loc_key()
+            loc_do = self.loc_db.add_location()
             loc_next = self.get_next_loc_key(instr)
 
             if hint: