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.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 '')
| -rw-r--r-- | miasm2/jitter/jitcore.py | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/miasm2/jitter/jitcore.py b/miasm2/jitter/jitcore.py index f3a79bee..7e831280 100644 --- a/miasm2/jitter/jitcore.py +++ b/miasm2/jitter/jitcore.py @@ -165,33 +165,22 @@ class JitCore(object): # Update jitcode mem range self.add_bloc_to_mem_interval(vm, cur_bloc) - def jit_call(self, label, cpu, _vmmngr, breakpoints): - """Call the function label with cpu and vmmngr states - @label: function's label - @cpu: JitCpu instance - @breakpoints: Dict instance of used breakpoints - """ - return self.exec_wrapper(label, cpu, self.lbl2jitbloc.data, breakpoints, - self.options["max_exec_per_call"]) - - def runbloc(self, cpu, vm, lbl, breakpoints): + def runbloc(self, cpu, lbl, breakpoints): """Run the bloc starting at lbl. @cpu: JitCpu instance - @vm: VmMngr instance @lbl: target label """ if lbl is None: - lbl = cpu.get_gpreg()[self.ir_arch.pc.name] + lbl = getattr(cpu, self.ir_arch.pc.name) if not lbl in self.lbl2jitbloc: # Need to JiT the bloc - self.disbloc(lbl, vm) + self.disbloc(lbl, cpu.vmmngr) # Run the bloc and update cpu/vmmngr state - ret = self.jit_call(lbl, cpu, vm, breakpoints) - - return ret + return self.exec_wrapper(lbl, cpu, self.lbl2jitbloc.data, breakpoints, + self.options["max_exec_per_call"]) def blocs2memrange(self, blocs): """Return an interval instance standing for blocs addresses |