diff options
| author | Camille Mougey <commial@gmail.com> | 2015-02-23 13:35:38 +0100 |
|---|---|---|
| committer | Camille Mougey <commial@gmail.com> | 2015-02-23 13:35:38 +0100 |
| commit | 4713279e25625b33b8867c35d7da686781b8b9a7 (patch) | |
| tree | df358b3d6cc18ca7f8d4060b5266c394a3ce299f /miasm2/arch/msp430/sem.py | |
| parent | 855bc7be4f06a0ea7eb4c8a6f009b21703272a30 (diff) | |
| parent | 319c5da3966c9d29ab50c241562dc92b9e0fdc27 (diff) | |
| download | miasm-4713279e25625b33b8867c35d7da686781b8b9a7.tar.gz miasm-4713279e25625b33b8867c35d7da686781b8b9a7.zip | |
Merge pull request #83 from serpilliere/expr_immutable
Expr immutable
Diffstat (limited to '')
| -rw-r--r-- | miasm2/arch/msp430/sem.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/miasm2/arch/msp430/sem.py b/miasm2/arch/msp430/sem.py index ac4c7e9c..cec8f36f 100644 --- a/miasm2/arch/msp430/sem.py +++ b/miasm2/arch/msp430/sem.py @@ -432,11 +432,12 @@ class ir_msp430(ir): def mod_sr(self, instr, instr_ir, extra_ir): for i, x in enumerate(instr_ir): - x.src = x.src.replace_expr({SR: composed_sr}) + x = ExprAff(x.dst, x.src.replace_expr({SR: composed_sr})) + instr_ir[i] = x if x.dst != SR: continue xx = ComposeExprAff(composed_sr, x.src) - instr_ir[i:i + 1] = xx + instr_ir[i] = xx for i, x in enumerate(instr_ir): x = ExprAff(x.dst, x.src.replace_expr( {self.pc: ExprInt16(instr.offset + instr.l)})) |