diff options
Diffstat (limited to 'miasm2/jitter')
| -rw-r--r-- | miasm2/jitter/codegen.py | 2 | ||||
| -rw-r--r-- | miasm2/jitter/jitcore.py | 20 | ||||
| -rw-r--r-- | miasm2/jitter/jitcore_cc_base.py | 2 | ||||
| -rw-r--r-- | miasm2/jitter/jitcore_llvm.py | 2 | ||||
| -rw-r--r-- | miasm2/jitter/llvmconvert.py | 12 |
5 files changed, 19 insertions, 19 deletions
diff --git a/miasm2/jitter/codegen.py b/miasm2/jitter/codegen.py index 09383f54..9d005451 100644 --- a/miasm2/jitter/codegen.py +++ b/miasm2/jitter/codegen.py @@ -1,7 +1,7 @@ import miasm2.expression.expression as m2_expr from miasm2.ir.ir import IRBlock from miasm2.ir.translators import Translator -from miasm2.core.asmbloc import expr_is_label, AsmBlockBad, AsmLabel +from miasm2.core.asmblock import expr_is_label, AsmBlockBad, AsmLabel # Miasm to C translator translator = Translator.to_language("C") diff --git a/miasm2/jitter/jitcore.py b/miasm2/jitter/jitcore.py index b0f911eb..0ccbfcd7 100644 --- a/miasm2/jitter/jitcore.py +++ b/miasm2/jitter/jitcore.py @@ -15,7 +15,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -from miasm2.core import asmbloc +from miasm2.core import asmblock from miasm2.core.interval import interval from miasm2.core.utils import BoundedDict from miasm2.jitter.csts import * @@ -55,13 +55,13 @@ class JitCore(object): "max_exec_per_call": 0 # 0 means no limit } - self.mdis = asmbloc.disasmEngine(ir_arch.arch, ir_arch.attrib, bs, - lines_wd=self.options["jit_maxline"], - symbol_pool=ir_arch.symbol_pool, - follow_call=False, - dontdis_retcall=False, - split_dis=self.split_dis, - dis_bloc_callback=self.disasm_cb) + self.mdis = asmblock.disasmEngine(ir_arch.arch, ir_arch.attrib, bs, + lines_wd=self.options["jit_maxline"], + symbol_pool=ir_arch.symbol_pool, + follow_call=False, + dontdis_retcall=False, + split_dis=self.split_dis, + dis_bloc_callback=self.disasm_cb) def set_options(self, **kwargs): @@ -133,7 +133,7 @@ class JitCore(object): """ # Get the block - if isinstance(addr, asmbloc.AsmLabel): + if isinstance(addr, asmblock.AsmLabel): addr = addr.offset # Prepare disassembler @@ -147,7 +147,7 @@ class JitCore(object): except IOError: # vm_exception_flag is set label = self.ir_arch.symbol_pool.getby_offset_create(addr) - cur_block = asmbloc.AsmBlockBad(label) + cur_block = asmblock.AsmBlockBad(label) # Logging if self.log_newbloc: diff --git a/miasm2/jitter/jitcore_cc_base.py b/miasm2/jitter/jitcore_cc_base.py index 9d41d06c..ae8a5dc2 100644 --- a/miasm2/jitter/jitcore_cc_base.py +++ b/miasm2/jitter/jitcore_cc_base.py @@ -113,7 +113,7 @@ class JitCore_Cc_Base(JitCore): def hash_block(self, block): """ Build a hash of the block @block - @block: asmbloc + @block: asmblock """ block_raw = "".join(line.b for line in block.lines) block_hash = md5("%X_%s_%s_%s" % (block.label.offset, diff --git a/miasm2/jitter/jitcore_llvm.py b/miasm2/jitter/jitcore_llvm.py index 8f58f1da..d082dd79 100644 --- a/miasm2/jitter/jitcore_llvm.py +++ b/miasm2/jitter/jitcore_llvm.py @@ -121,7 +121,7 @@ class JitCore_LLVM(jitcore.JitCore): def hash_block(self, block): """ Build a hash of the block @block - @block: asmbloc + @block: asmblock """ block_raw = "".join(line.b for line in block.lines) block_hash = md5("%X_%s_%s_%s" % (block.label.offset, diff --git a/miasm2/jitter/llvmconvert.py b/miasm2/jitter/llvmconvert.py index e98d2133..226a1b8e 100644 --- a/miasm2/jitter/llvmconvert.py +++ b/miasm2/jitter/llvmconvert.py @@ -16,7 +16,7 @@ from llvmlite import binding as llvm from llvmlite import ir as llvm_ir import miasm2.expression.expression as m2_expr import miasm2.jitter.csts as m2_csts -import miasm2.core.asmbloc as m2_asmbloc +import miasm2.core.asmblock as m2_asmblock from miasm2.jitter.codegen import CGen from miasm2.expression.expression_helper import possible_values @@ -508,9 +508,9 @@ class LLVMFunction(): @label: str or asmlabel instance""" if isinstance(label, str): return label - elif isinstance(label, m2_asmbloc.AsmLabel): + elif isinstance(label, m2_asmblock.AsmLabel): return "label_%s" % label.name - elif m2_asmbloc.expr_is_label(label): + elif m2_asmblock.expr_is_label(label): return "label_%s" % label.name.name else: raise ValueError("label must either be str or asmlabel") @@ -1038,7 +1038,7 @@ class LLVMFunction(): index = dst2case.get(value, i) to_eval = to_eval.replace_expr({value: m2_expr.ExprInt(index, value.size)}) dst2case[value] = index - if m2_asmbloc.expr_is_int_or_label(value): + if m2_asmblock.expr_is_int_or_label(value): case2dst[i] = value else: case2dst[i] = self.add_ir(value) @@ -1068,7 +1068,7 @@ class LLVMFunction(): dst = m2_expr.ExprId(self.llvm_context.ir_arch.symbol_pool.getby_offset_create(int(dst)), dst.size) - if m2_asmbloc.expr_is_label(dst): + if m2_asmblock.expr_is_label(dst): bbl = self.get_basic_bloc_by_label(dst) offset = dst.name.offset if bbl is not None: @@ -1276,7 +1276,7 @@ class LLVMFunction(): self.init_fc() self.local_vars_pointers["status"] = self.local_vars["status"] - if isinstance(asmblock, m2_asmbloc.AsmBlockBad): + if isinstance(asmblock, m2_asmblock.AsmBlockBad): self.gen_bad_block(asmblock) return |