diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2017-01-06 14:19:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-06 14:19:49 +0100 |
| commit | c5d47bd8cdb510c78501adae460b35d122042563 (patch) | |
| tree | bf79f51e70c2ad851c94a3af4920570cce73a88d /miasm2/jitter/jitcore_python.py | |
| parent | f89a4638923b89c4e17fa6811a62a7d01bccbdee (diff) | |
| parent | e653d822b5a2efc5531c8e153305769a6ab17713 (diff) | |
| download | miasm-c5d47bd8cdb510c78501adae460b35d122042563.tar.gz miasm-c5d47bd8cdb510c78501adae460b35d122042563.zip | |
Merge pull request #471 from commial/feature/llvm-cache
Feature/llvm cache
Diffstat (limited to 'miasm2/jitter/jitcore_python.py')
| -rw-r--r-- | miasm2/jitter/jitcore_python.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/miasm2/jitter/jitcore_python.py b/miasm2/jitter/jitcore_python.py index 87259f71..27666ab4 100644 --- a/miasm2/jitter/jitcore_python.py +++ b/miasm2/jitter/jitcore_python.py @@ -38,11 +38,12 @@ class JitCore_Python(jitcore.JitCore): @irblocs: a gorup of irblocs """ - def myfunc(cpu, vmmngr): + def myfunc(cpu): """Execute the function according to cpu and vmmngr states @cpu: JitCpu instance - @vm: VmMngr instance """ + # Get virtual memory handler + vmmngr = cpu.vmmngr # Keep current location in irblocs cur_label = label @@ -125,15 +126,15 @@ class JitCore_Python(jitcore.JitCore): # Associate myfunc with current label self.lbl2jitbloc[label.offset] = myfunc - def jit_call(self, label, cpu, vmmngr, _breakpoints): - """Call the function label with cpu and vmmngr states + def exec_wrapper(self, label, cpu, _lbl2jitbloc, _breakpoints, + _max_exec_per_call): + """Call the function @label with @cpu @label: function's label @cpu: JitCpu instance - @vm: VmMngr instance """ # Get Python function corresponding to @label fc_ptr = self.lbl2jitbloc[label] # Execute the function - return fc_ptr(cpu, vmmngr) + return fc_ptr(cpu) |