diff options
Diffstat (limited to '')
| -rw-r--r-- | miasm2/arch/msp430/sem.py | 22 |
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): |