Compare commits

..

1 Commits

Author SHA1 Message Date
Alix ANNERAUD
b79e3fbcf8
Merge 44486c86d2 into 1996c18c4b 2025-05-07 00:24:03 +00:00
6 changed files with 14 additions and 37 deletions

View File

@ -898,17 +898,6 @@ aot_intrinsic_fill_capability_flags(AOTCompContext *comp_ctx)
if (!strncmp(comp_ctx->target_arch, "riscv32", 7)) { if (!strncmp(comp_ctx->target_arch, "riscv32", 7)) {
add_i64_common_intrinsics(comp_ctx); add_i64_common_intrinsics(comp_ctx);
} }
/*
* LLVM 16 and later expands cttz intrinsic to a table lookup,
* which involves some relocations. (unless ZBB is available,
* in which case the native instructions are preferred over
* the table-based lowering.)
* https://reviews.llvm.org/D128911
*/
#if LLVM_VERSION_MAJOR >= 16
add_intrinsic_capability(comp_ctx, AOT_INTRINSIC_FLAG_I32_CTZ);
add_intrinsic_capability(comp_ctx, AOT_INTRINSIC_FLAG_I64_CTZ);
#endif
} }
else if (!strncmp(comp_ctx->target_arch, "xtensa", 6)) { else if (!strncmp(comp_ctx->target_arch, "xtensa", 6)) {
/* /*

View File

@ -4007,12 +4007,8 @@ aot_resolve_object_relocation_group(AOTObjectData *obj_data,
&& (str_starts_with(relocation->symbol_name, ".LCPI") && (str_starts_with(relocation->symbol_name, ".LCPI")
|| str_starts_with(relocation->symbol_name, ".LJTI") || str_starts_with(relocation->symbol_name, ".LJTI")
|| str_starts_with(relocation->symbol_name, ".LBB") || str_starts_with(relocation->symbol_name, ".LBB")
|| str_starts_with(relocation->symbol_name, ".Lswitch.table.") || str_starts_with(relocation->symbol_name,
#if LLVM_VERSION_MAJOR >= 16 ".Lswitch.table."))) {
/* cf. https://reviews.llvm.org/D123264 */
|| str_starts_with(relocation->symbol_name, ".Lpcrel_hi")
#endif
)) {
/* change relocation->relocation_addend and /* change relocation->relocation_addend and
relocation->symbol_name */ relocation->symbol_name */
LLVMSectionIteratorRef contain_section; LLVMSectionIteratorRef contain_section;

View File

@ -9197,15 +9197,6 @@ preserve_referenced_local(WASMLoaderContext *loader_ctx, uint8 opcode,
loader_ctx->preserved_local_offset += 2; loader_ctx->preserved_local_offset += 2;
emit_label(EXT_OP_COPY_STACK_TOP_I64); emit_label(EXT_OP_COPY_STACK_TOP_I64);
} }
/* overflow */
if (preserved_offset > loader_ctx->preserved_local_offset) {
set_error_buf_v(error_buf, error_buf_size,
"too much local cells 0x%x",
loader_ctx->preserved_local_offset);
return false;
}
emit_operand(loader_ctx, local_index); emit_operand(loader_ctx, local_index);
emit_operand(loader_ctx, preserved_offset); emit_operand(loader_ctx, preserved_offset);
emit_label(opcode); emit_label(opcode);

View File

@ -4778,11 +4778,6 @@ preserve_referenced_local(WASMLoaderContext *loader_ctx, uint8 opcode,
loader_ctx->preserved_local_offset += 2; loader_ctx->preserved_local_offset += 2;
emit_label(EXT_OP_COPY_STACK_TOP_I64); emit_label(EXT_OP_COPY_STACK_TOP_I64);
} }
/* overflow */
bh_assert(preserved_offset
<= loader_ctx->preserved_local_offset);
emit_operand(loader_ctx, local_index); emit_operand(loader_ctx, local_index);
emit_operand(loader_ctx, preserved_offset); emit_operand(loader_ctx, preserved_offset);
emit_label(opcode); emit_label(opcode);

View File

@ -1,17 +1,14 @@
# WAMR API # WARM API
* **Notice**: The python package `wamr.wamrapi.wamr` requires a python version >= `3.10`. * **Notice**: The python package `wamr.wamrapi.wamr` need python >= `3.10`.
## Setup ## Setup
### Pre-requisites ### Pre-requisites
#### Install requirements
Before proceeding it is necessary to make sure your Python environment is correctly configured. To do ths open a terminal session in this directory and perfom the following:
Install requirements,
```shell ```shell
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt pip install -r requirements.txt
``` ```

View File

@ -205,3 +205,12 @@ foreach(EX ${EXAMPLES})
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
) )
endforeach() endforeach()
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
find_program(VALGRIND
valgrind
REQUIRED
)
# run `ctest -T memcheck -V --test-dir build`
endif()