about summary refs log tree commit diff stats
path: root/miasm2/jitter/jitcore_llvm.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2018-06-22 16:10:51 +0200
committerAjax <commial@gmail.com>2018-06-22 17:37:30 +0200
commite334e25a848bf8311ff3cd0c00d2c5f471e007f5 (patch)
treea4c3572b7ad861e7a188cc4e15aed7b81c6911bb /miasm2/jitter/jitcore_llvm.py
parent191a47a37880caecb47f9b47ddf71fede335d1a0 (diff)
downloadmiasm-e334e25a848bf8311ff3cd0c00d2c5f471e007f5.tar.gz
miasm-e334e25a848bf8311ff3cd0c00d2c5f471e007f5.zip
Jitters: use loc_key instead of names or offset for basic block labeling
Diffstat (limited to 'miasm2/jitter/jitcore_llvm.py')
-rw-r--r--miasm2/jitter/jitcore_llvm.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/miasm2/jitter/jitcore_llvm.py b/miasm2/jitter/jitcore_llvm.py
index 5152cf9e..9b0baae5 100644
--- a/miasm2/jitter/jitcore_llvm.py
+++ b/miasm2/jitter/jitcore_llvm.py
@@ -8,7 +8,6 @@ import Jitllvm
 
 
 class JitCore_LLVM(jitcore.JitCore):
-
     "JiT management, using LLVM as backend"
 
     # Architecture dependant libraries
@@ -84,7 +83,7 @@ class JitCore_LLVM(jitcore.JitCore):
 
         if not os.access(fname_out, os.R_OK):
             # Build a function in the context
-            func = LLVMFunction(self.context, block.loc_key)
+            func = LLVMFunction(self.context, self.FUNCNAME)
 
             # Set log level
             func.log_regs = self.log_regs
@@ -115,7 +114,7 @@ class JitCore_LLVM(jitcore.JitCore):
 
         else:
             # The cache file exists: function can be loaded from cache
-            ptr = self.context.get_ptr_from_cache(fname_out, block.loc_key)
+            ptr = self.context.get_ptr_from_cache(fname_out, self.FUNCNAME)
 
         # Store a pointer on the function jitted code
         loc_key = block.loc_key