about summary refs log tree commit diff stats
path: root/test/arch/arm/sem.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2014-09-05 11:30:05 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2014-09-05 11:30:05 +0200
commit6e09df71a333bf87cd68c2d08ad068a3e501462d (patch)
tree7d76e0626e61ef5a9f15c62358337674fb0095aa /test/arch/arm/sem.py
parente8d0fcf8d28d82a8f33138d044f335634ac3a30c (diff)
downloadmiasm-6e09df71a333bf87cd68c2d08ad068a3e501462d.tar.gz
miasm-6e09df71a333bf87cd68c2d08ad068a3e501462d.zip
Modify irbloc destination mecanism. Rework API in consequence.
Fat patch here: some API have changed.

Each irbloc now affects a special "IRDst" register which is used to
describe the destination irbloc. It allows simple description of
architectures using delay slots. Architectures semantic and tcc/python
jitter are modified in consequence. LLVM jitter is disabled for now,
but should be patch soon.
Diffstat (limited to 'test/arch/arm/sem.py')
-rw-r--r--test/arch/arm/sem.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/arch/arm/sem.py b/test/arch/arm/sem.py
index be36e90b..7fcf9e85 100644
--- a/test/arch/arm/sem.py
+++ b/test/arch/arm/sem.py
@@ -6,12 +6,12 @@ import logging
 
 from miasm2.ir.symbexec import symbexec
 from miasm2.arch.arm.arch import mn_arm as mn, mode_arm as mode
-from miasm2.arch.arm.sem import ir_arm as ir
+from miasm2.arch.arm.sem import ir_arm as ir_arch
 from miasm2.arch.arm.regs import *
 from miasm2.expression.expression import *
 
 logging.getLogger('cpuhelper').setLevel(logging.ERROR)
-EXCLUDE_REGS = set()
+EXCLUDE_REGS = set([ir_arch().IRDst])
 
 
 def M(addr):
@@ -21,12 +21,12 @@ def M(addr):
 def compute(asm, inputstate={}, debug=False):
     sympool = dict(regs_init)
     sympool.update({k: ExprInt_from(k, v) for k, v in inputstate.iteritems()})
-    symexec = symbexec(mn, sympool)
+    interm = ir_arch()
+    symexec = symbexec(interm, sympool)
     instr = mn.fromstring(asm, mode)
     code = mn.asm(instr)[0]
     instr = mn.dis(code, mode)
     instr.offset = inputstate.get(PC, 0)
-    interm = ir()
     interm.add_instr(instr)
     symexec.emul_ir_blocs(interm, instr.offset)
     if debug: