diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-03-31 10:11:03 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-04-01 23:47:37 +0200 |
| commit | 8e9957cba631f1c3640b18af30f129d88e9b3912 (patch) | |
| tree | f96a5f7c84164299c42eef16df57f8381a59f3be /miasm2/arch/arm/arch.py | |
| parent | 89680eb28d75e8313ab59dbd8c31930596138bad (diff) | |
| download | miasm-8e9957cba631f1c3640b18af30f129d88e9b3912.tar.gz miasm-8e9957cba631f1c3640b18af30f129d88e9b3912.zip | |
Clean get_asm_offset
Diffstat (limited to 'miasm2/arch/arm/arch.py')
| -rw-r--r-- | miasm2/arch/arm/arch.py | 8 |
1 files changed, 4 insertions, 4 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): |