about summary refs log tree commit diff stats
path: root/miasm2/arch/msp430/sem.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2016-11-07 12:24:51 +0100
committerGitHub <noreply@github.com>2016-11-07 12:24:51 +0100
commit3af8c4a5a6668cc89a4df3fb66222f4147a896b9 (patch)
tree21a7d7ad5d6da120e8e23e0b92725073d4d4e27c /miasm2/arch/msp430/sem.py
parenta15e0faca425c6e2591448e510bf14f1c3f04e14 (diff)
parentf0fbc59a663774dc4f4861308bee3f91ccd9746d (diff)
downloadmiasm-3af8c4a5a6668cc89a4df3fb66222f4147a896b9.tar.gz
miasm-3af8c4a5a6668cc89a4df3fb66222f4147a896b9.zip
Merge pull request #445 from serpilliere/symb_exec_clean
Symb exec clean
Diffstat (limited to '')
-rw-r--r--miasm2/arch/msp430/sem.py22
1 files changed, 4 insertions, 18 deletions
diff --git a/miasm2/arch/msp430/sem.py b/miasm2/arch/msp430/sem.py
index 169a631f..a99e500c 100644
--- a/miasm2/arch/msp430/sem.py
+++ b/miasm2/arch/msp430/sem.py
@@ -250,8 +250,7 @@ def call(ir, instr, a):
 def swpb(ir, instr, a):
     e = []
     x, y = a[:8], a[8:16]
-    e.append(ExprAff(a, ExprCompose([(y, 0, 8),
-                                     (x, 8, 16)])))
+    e.append(ExprAff(a, ExprCompose(y, x)))
     return e, []
 
 
@@ -330,8 +329,7 @@ def jmp(ir, instr, a):
 
 def rrc_w(ir, instr, a):
     e = []
-    c = ExprCompose([(a[1:16], 0, 15),
-                   (cf, 15, 16)])
+    c = ExprCompose(a[1:16], cf)
     e.append(ExprAff(a, c))
     e.append(ExprAff(cf, a[:1]))
     # e += update_flag_zn_r(c)
@@ -347,8 +345,7 @@ def rrc_w(ir, instr, a):
 
 def rra_w(ir, instr, a):
     e = []
-    c = ExprCompose([(a[1:16], 0, 15),
-                   (a[15:16], 15, 16)])
+    c = ExprCompose(a[1:16], a[15:16])
     e.append(ExprAff(a, c))
     # TODO: error in disasm microcorruption?
     # e.append(ExprAff(cf, a[:1]))
@@ -406,18 +403,7 @@ mnemo_func = {
 }
 
 
-composed_sr = ExprCompose([
-    (cf,   0,  1),
-    (zf,   1,  2),
-    (nf,   2,  3),
-    (gie,  3,  4),
-    (cpuoff,  4,  5),
-    (osc,  5,  6),
-    (scg0, 6,  7),
-    (scg1, 7,  8),
-    (of, 8,  9),
-    (res, 9, 16),
-])
+composed_sr = ExprCompose(cf, zf, nf, gie, cpuoff, osc, scg0, scg1, of, res)
 
 
 def ComposeExprAff(dst, src):