wasm-micro-runtime/core/iwasm/compilation
dongsheng28849455 4f6d70bc52
Use indirect call in pre-checker function to avoid relocation in XIP mode (#3142)
The stack profiler `aot_func#xxx` calls the wrapped function of `aot_func_internal#xxx`
by using symbol reference,  but in some platform like xtensa, it’s translated into a native
long call, which needs to resolve the indirect address by relocation and breaks the XIP
feature which requires the eliminating of relocation.

The solution is to change the symbol reference into an indirect call through the lookup
table, the code will be like this:
```llvm
call_wrapped_func:                                ; preds = %stack_bound_check_block
  %func_addr1 = getelementptr inbounds ptr, ptr %func_ptrs_ptr, i32 75
  %func_tmp2 = load ptr, ptr %func_addr1, align 4
  tail call void %func_tmp2(ptr %exec_env)
  ret void
```
2024-02-27 11:17:57 +08:00
..
debug aot debug: Try to use a bit more appropriate file names (#3000) 2024-01-15 15:02:12 +08:00
simd simd-128: The input lanes of integer-to-integer narrowing ops should be interpreted as signed (#2850) 2024-01-03 09:51:58 +08:00
aot_compiler.c Add comments to suppress warning from wamrc (#3175) 2024-02-22 18:57:00 +08:00
aot_compiler.h Fix llvm jit push funcref/externref result type issue (#3169) 2024-02-21 12:15:18 +08:00
aot_emit_aot_file.c Use indirect call in pre-checker function to avoid relocation in XIP mode (#3142) 2024-02-27 11:17:57 +08:00
aot_emit_compare.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_compare.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_const.c Refactor interpreter/AOT module instance layout (#1559) 2022-10-18 10:59:28 +08:00
aot_emit_const.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_control.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_control.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_conversion.c Simplify fcmp intrinsic logic for AOT/XIP (#1881) 2023-01-12 12:05:53 +08:00
aot_emit_conversion.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_exception.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_exception.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_function.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_function.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_gc.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_gc.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_memory.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_memory.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_numberic.c Fix several AOT compiler issues (#2697) 2023-11-02 20:36:21 +08:00
aot_emit_numberic.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_parametric.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_parametric.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_stringref.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_stringref.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_table.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_table.h Refine AOT/JIT code call wasm-c-api import process (#2982) 2024-01-10 18:37:02 +08:00
aot_emit_variable.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_variable.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_llvm_extra.cpp aot compiler: Some updates for LLVM 18 (#2981) 2024-01-08 10:15:31 +08:00
aot_llvm_extra2.cpp aot: Fix LLVMSetTailCallKind check (#3099) 2024-01-30 20:50:33 +08:00
aot_llvm_extra2.h aot: Fix LLVMSetTailCallKind check (#3099) 2024-01-30 20:50:33 +08:00
aot_llvm.c Use indirect call in pre-checker function to avoid relocation in XIP mode (#3142) 2024-02-27 11:17:57 +08:00
aot_llvm.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_orc_extra.cpp aot compiler: Some updates for LLVM 18 (#2981) 2024-01-08 10:15:31 +08:00
aot_orc_extra.h Generate jitdump to support linux perf for LLVM JIT (#2788) 2023-11-27 15:42:00 +08:00
aot_orc_extra2.cpp Fix wamrc build issues with LLVM 13 and LLVM 16 (#2313) 2023-06-27 08:59:49 +08:00
aot.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
iwasm_compl.cmake Implement atomic and memset/memmove/memcpy intrinsic for riscv (#841) 2021-11-30 17:10:14 +08:00