about summary refs log tree commit diff stats
path: root/miasm2/arch/msp430/sem.py
diff options
context:
space:
mode:
authorserpilliere <fabrice.desclaux@cea.fr>2015-02-21 21:09:57 +0100
committerserpilliere <fabrice.desclaux@cea.fr>2015-02-22 01:48:27 +0100
commit287109263e24e924e7ec551b1443d53e7d60da87 (patch)
treef42c490bf51de9733de0290aa92a51a534269067 /miasm2/arch/msp430/sem.py
parentdd2da246f676ff827201c9eee3ae698081875bf7 (diff)
downloadmiasm-287109263e24e924e7ec551b1443d53e7d60da87.tar.gz
miasm-287109263e24e924e7ec551b1443d53e7d60da87.zip
Arch: remove code which uses expression modifications
Diffstat (limited to 'miasm2/arch/msp430/sem.py')
-rw-r--r--miasm2/arch/msp430/sem.py5
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)}))