about summary refs log tree commit diff stats
path: root/miasm2/arch/msp430/sem.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2018-05-18 14:43:57 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-06-09 00:33:48 +0200
commit61551fa78e9dd22ed1f982b4fe171fd6383c39a6 (patch)
treeb10543391f9a66ddd5e3f6852c30d96b169b623d /miasm2/arch/msp430/sem.py
parenta2637cdf0b40df074865d23a7fd71f082ad7f40a (diff)
downloadmiasm-61551fa78e9dd22ed1f982b4fe171fd6383c39a6.tar.gz
miasm-61551fa78e9dd22ed1f982b4fe171fd6383c39a6.zip
Core: replace AsmLabel by LocKey
Diffstat (limited to 'miasm2/arch/msp430/sem.py')
-rw-r--r--miasm2/arch/msp430/sem.py54
1 files changed, 27 insertions, 27 deletions
diff --git a/miasm2/arch/msp430/sem.py b/miasm2/arch/msp430/sem.py
index 42f6474e..877c2a70 100644
--- a/miasm2/arch/msp430/sem.py
+++ b/miasm2/arch/msp430/sem.py
@@ -239,10 +239,10 @@ def push_w(ir, instr, a):
 def call(ir, instr, a):
     e, a, dummy = mng_autoinc(a, None, 16)
 
-    lbl_next = ir.get_next_label(instr)
-    lbl_next_expr = ExprLoc(lbl_next.loc_key, 16)
+    loc_next = ir.get_next_loc_key(instr)
+    loc_next_expr = ExprLoc(loc_next, 16)
 
-    e.append(ExprAff(ExprMem(SP - ExprInt(2, 16), 16), lbl_next_expr))
+    e.append(ExprAff(ExprMem(SP - ExprInt(2, 16), 16), loc_next_expr))
     e.append(ExprAff(SP, SP - ExprInt(2, 16)))
     e.append(ExprAff(PC, a))
     e.append(ExprAff(ir.IRDst, a))
@@ -275,56 +275,56 @@ def cmp_b(ir, instr, a, b):
 
 
 def jz(ir, instr, a):
-    lbl_next = ir.get_next_label(instr)
-    lbl_next_expr = ExprLoc(lbl_next.loc_key, 16)
+    loc_next = ir.get_next_loc_key(instr)
+    loc_next_expr = ExprLoc(loc_next, 16)
     e = []
-    e.append(ExprAff(PC, ExprCond(zf, a, lbl_next_expr)))
-    e.append(ExprAff(ir.IRDst, ExprCond(zf, a, lbl_next_expr)))
+    e.append(ExprAff(PC, ExprCond(zf, a, loc_next_expr)))
+    e.append(ExprAff(ir.IRDst, ExprCond(zf, a, loc_next_expr)))
     return e, []
 
 
 def jnz(ir, instr, a):
-    lbl_next = ir.get_next_label(instr)
-    lbl_next_expr = ExprLoc(lbl_next.loc_key, 16)
+    loc_next = ir.get_next_loc_key(instr)
+    loc_next_expr = ExprLoc(loc_next, 16)
     e = []
-    e.append(ExprAff(PC, ExprCond(zf, lbl_next_expr, a)))
-    e.append(ExprAff(ir.IRDst, ExprCond(zf, lbl_next_expr, a)))
+    e.append(ExprAff(PC, ExprCond(zf, loc_next_expr, a)))
+    e.append(ExprAff(ir.IRDst, ExprCond(zf, loc_next_expr, a)))
     return e, []
 
 
 def jl(ir, instr, a):
-    lbl_next = ir.get_next_label(instr)
-    lbl_next_expr = ExprLoc(lbl_next.loc_key, 16)
+    loc_next = ir.get_next_loc_key(instr)
+    loc_next_expr = ExprLoc(loc_next, 16)
     e = []
-    e.append(ExprAff(PC, ExprCond(nf ^ of, a, lbl_next_expr)))
-    e.append(ExprAff(ir.IRDst, ExprCond(nf ^ of, a, lbl_next_expr)))
+    e.append(ExprAff(PC, ExprCond(nf ^ of, a, loc_next_expr)))
+    e.append(ExprAff(ir.IRDst, ExprCond(nf ^ of, a, loc_next_expr)))
     return e, []
 
 
 def jc(ir, instr, a):
-    lbl_next = ir.get_next_label(instr)
-    lbl_next_expr = ExprLoc(lbl_next.loc_key, 16)
+    loc_next = ir.get_next_loc_key(instr)
+    loc_next_expr = ExprLoc(loc_next, 16)
     e = []
-    e.append(ExprAff(PC, ExprCond(cf, a, lbl_next_expr)))
-    e.append(ExprAff(ir.IRDst, ExprCond(cf, a, lbl_next_expr)))
+    e.append(ExprAff(PC, ExprCond(cf, a, loc_next_expr)))
+    e.append(ExprAff(ir.IRDst, ExprCond(cf, a, loc_next_expr)))
     return e, []
 
 
 def jnc(ir, instr, a):
-    lbl_next = ir.get_next_label(instr)
-    lbl_next_expr = ExprLoc(lbl_next.loc_key, 16)
+    loc_next = ir.get_next_loc_key(instr)
+    loc_next_expr = ExprLoc(loc_next, 16)
     e = []
-    e.append(ExprAff(PC, ExprCond(cf, lbl_next_expr, a)))
-    e.append(ExprAff(ir.IRDst, ExprCond(cf, lbl_next_expr, a)))
+    e.append(ExprAff(PC, ExprCond(cf, loc_next_expr, a)))
+    e.append(ExprAff(ir.IRDst, ExprCond(cf, loc_next_expr, a)))
     return e, []
 
 
 def jge(ir, instr, a):
-    lbl_next = ir.get_next_label(instr)
-    lbl_next_expr = ExprLoc(lbl_next.loc_key, 16)
+    loc_next = ir.get_next_loc_key(instr)
+    loc_next_expr = ExprLoc(loc_next, 16)
     e = []
-    e.append(ExprAff(PC, ExprCond(nf ^ of, lbl_next_expr, a)))
-    e.append(ExprAff(ir.IRDst, ExprCond(nf ^ of, lbl_next_expr, a)))
+    e.append(ExprAff(PC, ExprCond(nf ^ of, loc_next_expr, a)))
+    e.append(ExprAff(ir.IRDst, ExprCond(nf ^ of, loc_next_expr, a)))
     return e, []