diff options
| author | Camille Mougey <commial@gmail.com> | 2018-07-05 17:52:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-05 17:52:12 +0200 |
| commit | a3961b92c47a9cc47510601b57267822fcbdcbdf (patch) | |
| tree | ac39a9859983baff15d52533829d95ffa760f633 /test/arch/arm/sem.py | |
| parent | f5fd096d35a9b3811097c40f553c90d3036cc035 (diff) | |
| parent | 045182c94d6bb1c9417b612d88fd469e0f87872f (diff) | |
| download | miasm-a3961b92c47a9cc47510601b57267822fcbdcbdf.tar.gz miasm-a3961b92c47a9cc47510601b57267822fcbdcbdf.zip | |
Merge pull request #784 from serpilliere/split_ir_graph
Split ir graph
Diffstat (limited to 'test/arch/arm/sem.py')
| -rwxr-xr-x | test/arch/arm/sem.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/arch/arm/sem.py b/test/arch/arm/sem.py index 57dd2b77..64cda610 100755 --- a/test/arch/arm/sem.py +++ b/test/arch/arm/sem.py @@ -15,23 +15,24 @@ from pdb import pm logging.getLogger('cpuhelper').setLevel(logging.ERROR) EXCLUDE_REGS = set([ir_arch().IRDst]) -loc_db = LocationDB() def M(addr): return ExprMem(ExprInt(addr, 16), 16) def compute(asm, inputstate={}, debug=False): + loc_db = LocationDB() sympool = dict(regs_init) sympool.update({k: ExprInt(v, k.size) for k, v in inputstate.iteritems()}) - interm = ir_arch(loc_db) - symexec = SymbolicExecutionEngine(interm, sympool) + ir_tmp = ir_arch(loc_db) + ircfg = ir_tmp.new_ircfg() + symexec = SymbolicExecutionEngine(ir_tmp, sympool) instr = mn.fromstring(asm, loc_db, "l") code = mn.asm(instr)[0] instr = mn.dis(code, "l") instr.offset = inputstate.get(PC, 0) - lbl = interm.add_instr(instr) - symexec.run_at(lbl) + lbl = ir_tmp.add_instr_to_ircfg(instr, ircfg) + symexec.run_at(ircfg, lbl) if debug: for k, v in symexec.symbols.items(): if regs_init.get(k, None) != v: |