diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-05-18 14:43:57 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-06-09 00:33:48 +0200 |
| commit | 61551fa78e9dd22ed1f982b4fe171fd6383c39a6 (patch) | |
| tree | b10543391f9a66ddd5e3f6852c30d96b169b623d /miasm2/arch/arm/arch.py | |
| parent | a2637cdf0b40df074865d23a7fd71f082ad7f40a (diff) | |
| download | miasm-61551fa78e9dd22ed1f982b4fe171fd6383c39a6.tar.gz miasm-61551fa78e9dd22ed1f982b4fe171fd6383c39a6.zip | |
Core: replace AsmLabel by LocKey
Diffstat (limited to 'miasm2/arch/arm/arch.py')
| -rw-r--r-- | miasm2/arch/arm/arch.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/miasm2/arch/arm/arch.py b/miasm2/arch/arm/arch.py index 204bf1b0..17b57ba4 100644 --- a/miasm2/arch/arm/arch.py +++ b/miasm2/arch/arm/arch.py @@ -347,9 +347,9 @@ class instruction_arm(instruction): wb = False if expr.is_id() or expr.is_int(): return str(expr) - elif expr.is_label(): + elif expr.is_loc(): if symbol_pool is not None: - return str(symbol_pool.loc_key_to_label(expr.loc_key)) + return symbol_pool.str_loc_key(expr.loc_key) else: return str(expr) if isinstance(expr, ExprOp) and expr.op in expr2shift_dct: @@ -430,8 +430,8 @@ class instruction_arm(instruction): addr = expr.arg + self.offset else: addr = expr.arg + 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: @@ -512,8 +512,8 @@ class instruction_armt(instruction_arm): else: addr = expr.arg + self.offset - label = symbol_pool.getby_offset_create(addr) - dst = ExprLoc(label.loc_key, expr.size) + loc_key = symbol_pool.getby_offset_create(addr) + dst = ExprLoc(loc_key, expr.size) if self.name in ["CBZ", "CBNZ"]: self.args[1] = dst @@ -780,8 +780,8 @@ class arm_arg(m_arg): return arg.name if arg.name in gpregs.str: return None - label = symbol_pool.getby_name_create(arg.name) - return ExprLoc(label.loc_key, 32) + loc_key = symbol_pool.getby_name_create(arg.name) + return ExprLoc(loc_key, 32) if isinstance(arg, AstOp): args = [self.asm_ast_to_expr(tmp, symbol_pool) for tmp in arg.args] if None in args: |