about summary refs log tree commit diff stats
path: root/test/arch/x86/sem.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2018-05-14 13:53:04 +0200
committerGitHub <noreply@github.com>2018-05-14 13:53:04 +0200
commitd7c7527fbc4dea0f340402b62e7146b1d1916d2a (patch)
tree45413ece50186f74a046ef2e2f30b4df8a19b963 /test/arch/x86/sem.py
parentf6e1c074f6a17b6a895dcf5352c213a1b6bacb99 (diff)
parentab3635f44ab45e22150bc373e33b7cf11ea46f63 (diff)
downloadmiasm-d7c7527fbc4dea0f340402b62e7146b1d1916d2a.tar.gz
miasm-d7c7527fbc4dea0f340402b62e7146b1d1916d2a.zip
Merge pull request #734 from serpilliere/enhance_parser
Enhance parser
Diffstat (limited to '')
-rwxr-xr-xtest/arch/x86/sem.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/arch/x86/sem.py b/test/arch/x86/sem.py
index eb3c15c0..b3b7e940 100755
--- a/test/arch/x86/sem.py
+++ b/test/arch/x86/sem.py
@@ -14,11 +14,14 @@ from miasm2.arch.x86.regs import *
 from miasm2.expression.expression import *
 from miasm2.expression.simplifications      import expr_simp
 from miasm2.core import parse_asm, asmblock
+from miasm2.core.asmblock import AsmSymbolPool
 
 
 logging.getLogger('cpuhelper').setLevel(logging.ERROR)
 EXCLUDE_REGS = set([ir_32().IRDst, ir_64().IRDst])
 
+symbol_pool = AsmSymbolPool()
+
 m32 = 32
 m64 = 64
 
@@ -35,7 +38,7 @@ def symb_exec(interm, inputstate, debug):
             if k not in EXCLUDE_REGS and regs_init.get(k, None) != v}
 
 def compute(ir, mode, asm, inputstate={}, debug=False):
-    instr = mn.fromstring(asm, mode)
+    instr = mn.fromstring(asm, symbol_pool, mode)
     code = mn.asm(instr)[0]
     instr = mn.dis(code, mode)
     instr.offset = inputstate.get(EIP, 0)