@@ -49,7 +49,7 @@ FORCE_INLINE void t2c_jit_cache_helper(LLVMBuilderRef *builder,
49
49
/* get jit-cache base address */
50
50
LLVMValueRef base = LLVMConstIntToPtr (
51
51
LLVMConstInt (LLVMInt64Type (), (long ) rv -> jit_cache , false),
52
- LLVMPointerType (jit_cache_ty , 0 ));
52
+ LLVMPointerType (t2c_jit_cache_struct_type , 0 ));
53
53
54
54
/* get index */
55
55
LLVMValueRef hash = LLVMBuildAnd (
@@ -59,10 +59,10 @@ FORCE_INLINE void t2c_jit_cache_helper(LLVMBuilderRef *builder,
59
59
/* get jit_cache_t::pc */
60
60
LLVMValueRef cast =
61
61
LLVMBuildIntCast2 (* builder , hash , LLVMInt64Type (), false, "" );
62
- LLVMValueRef element_ptr =
63
- LLVMBuildInBoundsGEP2 ( * builder , jit_cache_ty , base , & cast , 1 , "" );
64
- LLVMValueRef pc_ptr =
65
- LLVMBuildStructGEP2 ( * builder , jit_cache_ty , element_ptr , 0 , "" );
62
+ LLVMValueRef element_ptr = LLVMBuildInBoundsGEP2 (
63
+ * builder , t2c_jit_cache_struct_type , base , & cast , 1 , "" );
64
+ LLVMValueRef pc_ptr = LLVMBuildStructGEP2 (
65
+ * builder , t2c_jit_cache_struct_type , element_ptr , 0 , "" );
66
66
LLVMValueRef pc = LLVMBuildLoad2 (* builder , LLVMInt32Type (), pc_ptr , "" );
67
67
68
68
/* compare with calculated destination */
@@ -71,14 +71,14 @@ FORCE_INLINE void t2c_jit_cache_helper(LLVMBuilderRef *builder,
71
71
LLVMBuildCondBr (* builder , cmp , true_path , false_path );
72
72
73
73
/* get jit_cache_t::entry */
74
- LLVMValueRef entry_ptr =
75
- LLVMBuildStructGEP2 ( true_builder , jit_cache_ty , element_ptr , 1 , "" );
74
+ LLVMValueRef entry_ptr = LLVMBuildStructGEP2 (
75
+ true_builder , t2c_jit_cache_struct_type , element_ptr , 1 , "" );
76
76
77
77
/* invoke T2C JIT-ed code */
78
78
LLVMValueRef t2c_args [1 ] = {
79
79
LLVMConstInt (LLVMInt64Type (), (long ) rv , false)};
80
80
81
- LLVMBuildCall2 (true_builder , t2c_cache_func_proto ,
81
+ LLVMBuildCall2 (true_builder , t2c_jit_cache_func_type ,
82
82
LLVMBuildLoad2 (true_builder , LLVMInt64Type (), entry_ptr , "" ),
83
83
t2c_args , 1 , "" );
84
84
LLVMBuildRetVoid (true_builder );
0 commit comments