diff options
| author | serpilliere <fabrice.desclaux@cea.fr> | 2015-04-05 23:48:24 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-04-22 11:31:21 +0200 |
| commit | 65feb2335c3fd525efde115932b512e7bbc720d1 (patch) | |
| tree | d945f7f094beb6be3c822b67d06bb888f2e67712 /miasm2/jitter/jitcore_python.py | |
| parent | e6676c92ea2ea3e1f69c10902313094c1b83e375 (diff) | |
| download | focaccia-miasm-65feb2335c3fd525efde115932b512e7bbc720d1.tar.gz focaccia-miasm-65feb2335c3fd525efde115932b512e7bbc720d1.zip | |
Jitter: get/set mem is now wrapped in cpu
The get/set mem used during jit is wrapped by cpu. This allows cpu object to callback (or not, depending on arch) a cache update.
Diffstat (limited to 'miasm2/jitter/jitcore_python.py')
| -rw-r--r-- | miasm2/jitter/jitcore_python.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/miasm2/jitter/jitcore_python.py b/miasm2/jitter/jitcore_python.py index 0df9f615..b768b338 100644 --- a/miasm2/jitter/jitcore_python.py +++ b/miasm2/jitter/jitcore_python.py @@ -71,7 +71,7 @@ class JitCore_Python(jitcore.JitCore): addr = expr_mem.arg.arg.arg size = expr_mem.size / 8 - value = self.vmmngr.get_mem(addr, size) + value = self.cpu.get_mem(addr, size) return m2_expr.ExprInt_fromsize(expr_mem.size, int(value[::-1].encode("hex"), 16)) @@ -97,7 +97,7 @@ class JitCore_Python(jitcore.JitCore): content = content.decode("hex")[::-1] # Write in VmMngr context - self.vmmngr.set_mem(addr, content) + self.cpu.set_mem(addr, content) def jitirblocs(self, label, irblocs): """Create a python function corresponding to an irblocs' group. @@ -195,6 +195,7 @@ class JitCore_Python(jitcore.JitCore): # Update memory state self.vmmngr = vmmngr + self.cpu = cpu # Execute the function return fc_ptr(cpu, vmmngr) |