about summary refs log tree commit diff stats
path: root/miasm2/jitter/jitcore_cc_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/jitter/jitcore_cc_base.py')
-rw-r--r--miasm2/jitter/jitcore_cc_base.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/miasm2/jitter/jitcore_cc_base.py b/miasm2/jitter/jitcore_cc_base.py
index 4dd8825a..bbf10a53 100644
--- a/miasm2/jitter/jitcore_cc_base.py
+++ b/miasm2/jitter/jitcore_cc_base.py
@@ -46,9 +46,9 @@ class resolver:
 class JitCore_Cc_Base(JitCore):
     "JiT management, abstract class using a C compiler as backend"
 
-    def __init__(self, ir_arch, bs=None):
+    def __init__(self, ir_arch, bin_stream):
         self.jitted_block_delete_cb = self.deleteCB
-        super(JitCore_Cc_Base, self).__init__(ir_arch, bs)
+        super(JitCore_Cc_Base, self).__init__(ir_arch, bin_stream)
         self.resolver = resolver()
         self.ir_arch = ir_arch
         self.states = {}
@@ -85,21 +85,12 @@ class JitCore_Cc_Base(JitCore):
         """
         self.codegen = codegen
 
-    def label2fname(self, label):
-        """
-        Generate function name from @label
-        @label: AsmLabel instance
-        """
-        return "block_%s" % self.codegen.label_to_jitlabel(label)
-
-    def gen_c_code(self, label, block):
+    def gen_c_code(self, block):
         """
         Return the C code corresponding to the @irblocks
-        @label: AsmLabel of the block to jit
         @irblocks: list of irblocks
         """
-        f_name = self.label2fname(label)
-        f_declaration = 'int %s(block_id * BlockDst, JitCpu* jitcpu)' % f_name
+        f_declaration = 'int %s(block_id * BlockDst, JitCpu* jitcpu)' % self.FUNCNAME
         out = self.codegen.gen_c(block, log_mn=self.log_mn, log_regs=self.log_regs)
         out = [f_declaration + '{'] + out + ['}\n']
         c_code = out