about summary refs log tree commit diff stats
path: root/miasm2/jitter
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/jitter')
-rw-r--r--miasm2/jitter/codegen.py2
-rw-r--r--miasm2/jitter/llvmconvert.py3
-rw-r--r--miasm2/jitter/loader/elf.py1
-rw-r--r--miasm2/jitter/loader/pe.py1
4 files changed, 2 insertions, 5 deletions
diff --git a/miasm2/jitter/codegen.py b/miasm2/jitter/codegen.py
index ff6c1485..e1185944 100644
--- a/miasm2/jitter/codegen.py
+++ b/miasm2/jitter/codegen.py
@@ -6,7 +6,7 @@ from miasm2.expression.expression import Expr, ExprId, ExprLoc, ExprInt, \
     ExprMem, ExprCond, LocKey
 from miasm2.ir.ir import IRBlock, AssignBlock
 
-from miasm2.ir.translators.C import TranslatorC, int_size_to_bn
+from miasm2.ir.translators.C import TranslatorC
 from miasm2.core.asmblock import AsmBlockBad
 from miasm2.expression.simplifications import expr_simp_high_to_explicit
 
diff --git a/miasm2/jitter/llvmconvert.py b/miasm2/jitter/llvmconvert.py
index 1c2b453b..3ef45e60 100644
--- a/miasm2/jitter/llvmconvert.py
+++ b/miasm2/jitter/llvmconvert.py
@@ -398,7 +398,7 @@ class LLVMContext_JIT(LLVMContext):
             builder.store(value, ret)
             value_ptr = builder.bitcast(ret, llvm_ir.IntType(8).as_pointer())
 
-            ret = builder.call(
+            builder.call(
                 fc_ptr,
                 [
                     func.local_vars["jitcpu"],
@@ -581,7 +581,6 @@ class LLVMFunction():
         ptr = builder.gep(self.local_vars["vmcpu"],
                           [llvm_ir.Constant(LLVMType.IntType(),
                                             offset)])
-        regs = self.llvm_context.ir_arch.arch.regs
         pointee_type = LLVMType.IntType(expr.size)
         ptr_casted = builder.bitcast(ptr,
                                      llvm_ir.PointerType(pointee_type))
diff --git a/miasm2/jitter/loader/elf.py b/miasm2/jitter/loader/elf.py
index af078ab5..d1df8c3f 100644
--- a/miasm2/jitter/loader/elf.py
+++ b/miasm2/jitter/loader/elf.py
@@ -166,7 +166,6 @@ def apply_reloc_x86(elf, vm, section, base_addr, loc_db):
     for reloc in section.reltab:
 
         # Parse relocation info
-        r_addend = reloc.addend if hasattr(reloc, "addend") else 0
         r_info = reloc.info
         if elf.size == 64:
             r_info_sym = (r_info >> 32) & 0xFFFFFFFF
diff --git a/miasm2/jitter/loader/pe.py b/miasm2/jitter/loader/pe.py
index 9bc0ef8b..e4cd57ee 100644
--- a/miasm2/jitter/loader/pe.py
+++ b/miasm2/jitter/loader/pe.py
@@ -404,7 +404,6 @@ class libimp_pe(libimp):
                         # Ensure function entry is created
                         _ = self.lib_get_add_func(new_lib_base, exp_fname)
 
-                    c_name = canon_libname_libfunc(exp_dname, exp_fname)
                     libad_tmp = self.name2off[exp_dname]
                     ad = self.lib_imp2ad[libad_tmp][exp_fname]