Skip to content

Commit d4ad02f

Browse files
committed
Create func_ptrs for precheck_func only in XIP mode for Xtensa
1 parent 1daa1d1 commit d4ad02f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/iwasm/compilation/aot_llvm.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,6 @@ aot_build_precheck_function(AOTCompContext *comp_ctx, LLVMModuleRef module,
336336
&& !create_native_stack_top_min(comp_ctx, func_ctx)) {
337337
goto fail;
338338
}
339-
if (!create_func_ptrs(comp_ctx, func_ctx)) {
340-
goto fail;
341-
}
342339

343340
uint32 param_count = LLVMCountParams(precheck_func);
344341
uint32 sz = param_count * (uint32)sizeof(LLVMValueRef);
@@ -547,6 +544,10 @@ aot_build_precheck_function(AOTCompContext *comp_ctx, LLVMModuleRef module,
547544
if (comp_ctx->is_indirect_mode
548545
&& !strncmp(comp_ctx->target_arch, "xtensa", 6)) {
549546
/* call wrapped_func indirectly */
547+
if (!create_func_ptrs(comp_ctx, func_ctx)) {
548+
goto fail;
549+
}
550+
550551
LLVMTypeRef func_ptr_type;
551552
LLVMValueRef wrapped_func_indirect;
552553
uint32 import_func_count = comp_ctx->comp_data->import_func_count;

0 commit comments

Comments
 (0)