mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-09 05:06:17 +00:00
Compare commits
6 Commits
d053f5534a
...
0e8b57d8a8
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0e8b57d8a8 | ||
![]() |
88b5f6a535 | ||
![]() |
ac2fe552d5 | ||
![]() |
ea417d7619 | ||
![]() |
bb36a43fa4 | ||
![]() |
1996c18c4b |
|
@ -898,6 +898,17 @@ 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)) {
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -4007,8 +4007,12 @@ 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,
|
|| str_starts_with(relocation->symbol_name, ".Lswitch.table.")
|
||||||
".Lswitch.table."))) {
|
#if LLVM_VERSION_MAJOR >= 16
|
||||||
|
/* 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;
|
||||||
|
|
|
@ -9197,6 +9197,15 @@ 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);
|
||||||
|
|
|
@ -4778,6 +4778,11 @@ 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);
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
# WARM API
|
# WAMR API
|
||||||
|
|
||||||
* **Notice**: The python package `wamr.wamrapi.wamr` need python >= `3.10`.
|
* **Notice**: The python package `wamr.wamrapi.wamr` requires a python version >= `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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ if (${WAT2WASM_VERSION} VERSION_LESS 1.0.26)
|
||||||
set(WAT2WASM_FLAGS "--enable-reference-types")
|
set(WAT2WASM_FLAGS "--enable-reference-types")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if(${WAMR_BUILD_AOT} EQUAL 1)
|
if(${WAMR_BUILD_AOT} EQUAL 1 AND ${WAMR_BUILD_INTERP} EQUAL 0)
|
||||||
## locate wamrc
|
## locate wamrc
|
||||||
find_program(WAMRC
|
find_program(WAMRC
|
||||||
wamrc
|
wamrc
|
||||||
|
@ -205,12 +205,3 @@ 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()
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user