about summary refs log tree commit diff stats
path: root/miasm2/jitter/jitcore_llvm.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2017-12-11 14:26:23 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-06-08 17:35:05 +0200
commita2637cdf0b40df074865d23a7fd71f082ad7f40a (patch)
treef6c958ca8481e6e29760078e5d1bdc2d2b64da53 /miasm2/jitter/jitcore_llvm.py
parentdadfaabc3fff5edb9bf4ef7e7e8c4cfc4baccb94 (diff)
downloadmiasm-a2637cdf0b40df074865d23a7fd71f082ad7f40a.tar.gz
miasm-a2637cdf0b40df074865d23a7fd71f082ad7f40a.zip
Expr: Add new word ExprLoc
This word represents a location in the binary.
Thus, the hack of ExprId containing an AsmLabel ends here.
Diffstat (limited to 'miasm2/jitter/jitcore_llvm.py')
-rw-r--r--miasm2/jitter/jitcore_llvm.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/miasm2/jitter/jitcore_llvm.py b/miasm2/jitter/jitcore_llvm.py
index 452b6d84..a8d30f46 100644
--- a/miasm2/jitter/jitcore_llvm.py
+++ b/miasm2/jitter/jitcore_llvm.py
@@ -78,12 +78,13 @@ class JitCore_LLVM(jitcore.JitCore):
         """Add a block to JiT and JiT it.
         @block: the block to add
         """
+
         block_hash = self.hash_block(block)
         fname_out = os.path.join(self.tempdir, "%s.bc" % block_hash)
 
         if not os.access(fname_out, os.R_OK):
             # Build a function in the context
-            func = LLVMFunction(self.context, LLVMFunction.canonize_label_name(block.label))
+            func = LLVMFunction(self.context, block.label)
 
             # Set log level
             func.log_regs = self.log_regs
@@ -114,7 +115,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, LLVMFunction.canonize_label_name(block.label))
+            ptr = self.context.get_ptr_from_cache(fname_out, block.label)
 
         # Store a pointer on the function jitted code
         self.lbl2jitbloc[block.label.offset] = ptr