diff options
Diffstat (limited to 'miasm2/arch/mips32')
| -rw-r--r-- | miasm2/arch/mips32/arch.py | 8 | ||||
| -rw-r--r-- | miasm2/arch/mips32/ira.py | 2 | ||||
| -rw-r--r-- | miasm2/arch/mips32/jit.py | 2 | ||||
| -rw-r--r-- | miasm2/arch/mips32/sem.py | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/miasm2/arch/mips32/arch.py b/miasm2/arch/mips32/arch.py index a47c606b..974644dc 100644 --- a/miasm2/arch/mips32/arch.py +++ b/miasm2/arch/mips32/arch.py @@ -65,7 +65,7 @@ class instruction_mips32(cpu.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) assert(isinstance(expr, ExprMem)) @@ -97,7 +97,7 @@ class instruction_mips32(cpu.instruction): if self.name in ["J", 'JAL']: expr = self.args[0].arg addr = (self.offset & (0xFFFFFFFF ^ ((1<< 28)-1))) + expr - 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) return @@ -107,7 +107,7 @@ class instruction_mips32(cpu.instruction): if not isinstance(expr, ExprInt): return 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[ndx] = ExprLoc(loc_key, expr.size) def breakflow(self): @@ -265,7 +265,7 @@ class mips32_arg(cpu.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/mips32/ira.py b/miasm2/arch/mips32/ira.py index 791e67bf..53c2c6b3 100644 --- a/miasm2/arch/mips32/ira.py +++ b/miasm2/arch/mips32/ira.py @@ -28,7 +28,7 @@ class ir_a_mips32l(ir_mips32l, ira): new_irblocks.append(irb) continue if lr_val.is_loc(): - offset = self.loc_db.loc_key_to_offset(lr_val.loc_key) + offset = self.loc_db.get_location_offset(lr_val.loc_key) if offset is not None: lr_val = ExprInt(offset, 32) if not lr_val.is_int(): diff --git a/miasm2/arch/mips32/jit.py b/miasm2/arch/mips32/jit.py index 0c4eb85b..a0df64d6 100644 --- a/miasm2/arch/mips32/jit.py +++ b/miasm2/arch/mips32/jit.py @@ -70,7 +70,7 @@ class mipsCGen(CGen): """ loc_key = self.get_block_post_label(block) - offset = self.ir_arch.loc_db.loc_key_to_offset(loc_key) + offset = self.ir_arch.loc_db.get_location_offset(loc_key) out = (self.CODE_RETURN_NO_EXCEPTION % (loc_key, self.C_PC, m2_expr.ExprId('branch_dst_irdst', 32), diff --git a/miasm2/arch/mips32/sem.py b/miasm2/arch/mips32/sem.py index df13cd2c..acf7370f 100644 --- a/miasm2/arch/mips32/sem.py +++ b/miasm2/arch/mips32/sem.py @@ -490,10 +490,10 @@ class ir_mips32l(IntermediateRepresentation): return instr_ir, new_extra_ir def get_next_instr(self, instr): - return self.loc_db.getby_offset_create(instr.offset + 4) + return self.loc_db.get_or_create_offset_location(instr.offset + 4) def get_next_break_loc_key(self, instr): - return self.loc_db.getby_offset_create(instr.offset + 8) + return self.loc_db.get_or_create_offset_location(instr.offset + 8) class ir_mips32b(ir_mips32l): def __init__(self, loc_db=None): |