diff options
| -rw-r--r-- | miasm2/arch/arm/arch.py | 8 | ||||
| -rw-r--r-- | miasm2/core/cpu.py | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/miasm2/arch/arm/arch.py b/miasm2/arch/arm/arch.py index 4ecfbd97..539b4778 100644 --- a/miasm2/arch/arm/arch.py +++ b/miasm2/arch/arm/arch.py @@ -416,9 +416,9 @@ class instruction_arm(instruction): args = [a for a in self.args] return args - def get_asm_offset(self, x): + def get_asm_offset(self, expr): # LDR XXX, [PC, offset] => PC is self.offset+8 - return ExprInt_from(x, self.offset+8) + return ExprInt_from(expr, self.offset+8) class instruction_armt(instruction_arm): @@ -485,10 +485,10 @@ class instruction_armt(instruction_arm): raise ValueError('strange offset! %r' % off) self.args[0] = ExprInt32(off) - def get_asm_offset(self, x): + def get_asm_offset(self, expr): # ADR XXX, PC, imm => PC is 4 aligned + imm new_offset = ((self.offset+self.l)/4)*4 - return ExprInt_from(x, new_offset) + return ExprInt_from(expr, new_offset) class mn_arm(cls_mn): diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py index faba895a..ed124462 100644 --- a/miasm2/core/cpu.py +++ b/miasm2/core/cpu.py @@ -932,8 +932,8 @@ class instruction(object): o += self.gen_args(args) return o - def get_asm_offset(self, x): - return m2_expr.ExprInt_from(x, self.offset) + def get_asm_offset(self, expr): + return m2_expr.ExprInt_from(expr, self.offset) def resolve_args_with_symbols(self, symbols=None): if symbols is None: |