Commit Graph

189 Commits

Author SHA1 Message Date
Wenyong Huang
388530c738
Modify os_cond_reltimedwait to support long time wait (#461)
Modify the argument of os_cond_reltimedwait to uint64 type to support long time wait, and handle possible integer overflow.
2020-12-07 17:37:53 +08:00
Xu Jun
a84d51271c
Support AssemblyScript's new/retain/release APIs (#460) 2020-12-07 16:37:49 +08:00
Wenyong Huang
5176fe2595
Fix timer setTimeout issue and some coding style issues (#459) 2020-12-04 18:07:52 +08:00
Wenyong Huang
2f530e67fc
Fix app manager install atomics app issue and optimize workload scripts (#458) 2020-12-04 15:35:45 +08:00
sophy228
c8b0a1cee1
Fix some issues for Arm platform. (#457)
Motivation:
we found some issues during enable the WAMR on arm devices, such as relocation issues, stack alignment issues.

Proposed change:
We optimized the relocation process for arm platform, for relocation jump table, the SP should be aligned to 16 bytes. And we also make "getentropy" worked for other non-supported platform.
2020-12-02 10:22:55 +08:00
Wenyong Huang
591e4ce536
Refine aot exception throw, remove unnecessary labels (#456) 2020-11-30 17:57:22 +08:00
Wenyong Huang
0700dc9cd4
Fix wasi ctx memory free issue when app heap is corrupted (#455) 2020-11-30 17:00:53 +08:00
Wenyong Huang
282831eba5
Fix some compilation warnings and add esp-idf platform for experiment (#454)
And fix some code indent issues.
2020-11-30 16:03:51 +08:00
Karl Fessel
7d8b79a7a7
Addapt to RIOT changes (#452)
RIOT removed kernel_types.h in favor of sched.h
2020-11-27 09:10:00 +08:00
Wenyong Huang
0359805c82
Import FreeRTOS platform experiment codes for further development (#451) 2020-11-26 19:10:05 +08:00
Wenyong Huang
74be7a0b7c
Add more checks to enhance security (#446)
add more checks to enhance security
clear "wasi proc exit" exception before return to caller in wasm/aot call functions
fix memory profiling issue
change movdqa to movdqu in simd invokeNative asm codes to fix issue of unaligned address access
move setjmp/longjmp from libc-builtin to libc-emcc
fix zephyr platform compilation issue in latest zephyr version
2020-11-24 14:00:09 +08:00
Wenyong Huang
f4770ae8c8
Add more llvm optimization passes (#445)
Add more llvm optimization passes to improve AOT/JIT performance
2020-11-23 10:48:22 +08:00
Wenyong Huang
892af84161
Update sample workload wasm-av1 and add workload XNNPACK (#443) 2020-11-13 17:53:23 +08:00
Wenyong Huang
a3074df21b
Import SIMD feature and add some workload samples (#438) 2020-11-05 18:15:15 +08:00
Wenyong Huang
667282eea9
Implement stat and getentropy for sgx with ocall to run tensorflow (#436) 2020-10-30 12:36:00 +08:00
Wang Ning
c9c882e43d
Fix compilation error for sgxsdk-2.11 (#431)
sgxsdk-2.11 enable pthread_rwlock APIs support, and causes compilation
error. We use macro SGX_THREAD_LOCK_INITIALIZER to control it.
2020-10-23 18:16:56 +08:00
Wenyong Huang
91b9458ebd
Add more checks to enhance app heap's security (#428) 2020-10-22 18:52:33 +08:00
Wang Ning
c515fb1b75
Add tensorflow sample under samples/workload/tensorflow (#427) 2020-10-22 16:18:37 +08:00
lum1n0us
4787b150b8
Enable multi-module support for wasm-c-api (#426)
it is allowed that all imported functions and globals can be
linked by multi-module feature automatically or by wasm-c-api manually
2020-10-16 17:43:57 +08:00
Karl Fessel
f1fe5d7872
add RIOT-OS support to WAMR (#425)
* add RIOT platform

see riot-os.org

* add simple RIOT example
2020-10-16 11:21:53 +08:00
YAMAMOTO Takashi
f7903caa65
wasm_loader_ctx_init: Don't use false as a pointer (#422) 2020-10-13 14:13:30 +08:00
Xu Jun
c87f28eacd
support tail-call in AoT (#419) 2020-10-13 08:34:31 +08:00
Karl Fessel
cc0aab1063
Remove '@' when declare function invokeNative to fix compile error (#417) 2020-10-12 16:52:28 +08:00
Xiaokang Qin
c83a5713f9
Add the fast-interp tail call support (#409)
And also fix one bug in loader for tail-call

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
2020-09-29 10:35:10 +08:00
Xu Jun
c13746c22c
move memory_data out from MemoryInstance, add call stack (#408) 2020-09-28 18:38:15 +08:00
Huang Qi
0bf7f7310b
Add NULL check for memory inst in aot/wasm module malloc/free (#403)
* Add NULL check for memory page in aot/wasm module malloc/free

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

* Update aot_runtime.c

* Update wasm_runtime.c

Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
Co-authored-by: Wenyong Huang <wenyong.huang@intel.com>
2020-09-28 12:44:23 +08:00
Xu Jun
4bfcbc2cab
fix problem about local in fast-interp (#406) 2020-09-27 18:05:20 +08:00
Xiaokang Qin
a70daed17d
Add the tail-call feature support for classic-interp (#401)
* Add the tail-call feature support for classic-interp

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

* add CI for tail call and custom name section

* add CI for tail call and custom name section

* update CI for mac

Co-authored-by: Xu Jun <693788454@qq.com>
2020-09-24 12:38:54 +08:00
Wenyong Huang
a3d374eb57
Fix jit target arch not set issue and custom name section typo issue (#400)
And set target machine's cpu to host cpu when creating JIT execution engine.

Signed-off-by: Wenyong Huang wenyong.huang@intel.com
2020-09-24 11:21:20 +08:00
Huang Qi
b639c3ce61
Use macro instead of enum to define MEM_ALLOCATOR for better compatibility (#399)
Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-24 10:48:34 +08:00
Xiaokang Qin
a7e7711f63
Add the support for custom name section (#398)
Add the function name field for internal function struct

Signed-off-by: Zhongmin Wu <vwzm@live.com>
Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

Co-authored-by: Zhongmin Wu <vwzm@live.com>
2020-09-23 16:12:09 +08:00
Huang Qi
a290aaf93e
Fix wasm loader malloc(0) issue which returns NULL is some platforms (#397)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-23 15:54:22 +08:00
jmpews(AKA.zz)
d8d367b367
Update some assembler directives for darwin target (#395) 2020-09-23 13:10:26 +08:00
Xu Jun
dc4b8c4822
remove errno in wasm_application_execute_func (#396) 2020-09-23 11:50:37 +08:00
Wenyong Huang
e501a6963b
Fix some coding style issues, fix doc typo and refine some codes (#392) 2020-09-20 08:20:45 +08:00
Xiaokang Qin
7c8ccc7c26
Fix the build warnings on Mac (#388)
Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
2020-09-18 18:22:26 +08:00
Xiaokang Qin
2d06567cd1
Reimplement the utf8 string check (#389)
Previous implementation doesn't take care of overlong encoding

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
2020-09-18 18:06:13 +08:00
Xu Jun
0226dbbb3d
introduce WAMR memory profiling tool (experimental) (#390) 2020-09-18 18:04:56 +08:00
Huang Qi
04a7cc322f
core/shared: Add guard to avoid redefine macro (#386)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-16 17:53:03 +08:00
Huang Qi
c004b01be3
Introduce support for NuttX RTOS (#377)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-15 20:56:45 +08:00
Xu Jun
547298d4e7
Add macro to exclude sgx wasi/pthread ocalls if not needed (#384) 2020-09-15 15:49:09 +08:00
Xu Jun
2499e1ec4b
Fix issue and compilation warnings of new function call APIs (#383) 2020-09-14 15:30:42 +08:00
Xiaokang Qin
728890103b
Add the Windows COFF format support for AOT (#382)
Add the Windows COFF format support to wamr-compiler and iwasm can
load and excute it on Windows(X64) platform.

Signed-off-by: Wu Zhongmin <vwzm@live.com>
Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

Co-authored-by: Wu Zhongmin <vwzm@live.com>
2020-09-11 18:32:58 +08:00
Xiaokang Qin
264e189690
Add Windows support for C-API and Runtime API libraries and examples. (#379)
* Add Windows support for C-API and Runtime API libraries and examples.

Signed-off-by: Wu Zhongmin <vwzm@live.com>
Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

* Address the review comments

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

* Rewrite the the bh_getopt to make it avaliable for more kinds of options

Signed-off-by: Wu Zhongmin <vwzm@live.com>
Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

* Add the license header

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

Co-authored-by: Zhongmin Wu <vwzm@live.com>
2020-09-11 17:36:04 +08:00
Xiaokang Qin
5418e09712
Add two apis for wasm function call (#375)
Add below two apis:

bool wasm_runtime_call_wasm_a(WASMExecEnv *exec_env,
                                                      WASMFunctionInstanceCommon *function,
                                                      uint32 num_results, wasm_val_t results[],
                                                      uint32 num_args, wasm_val_t args[])

bool wasm_runtime_call_wasm_v(WASMExecEnv *exec_env,
                                                      WASMFunctionInstanceCommon *function,
                                                      uint32 num_results, wasm_val_t results[],
                                                      uint32 num_args, ...)

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
2020-09-08 13:03:35 +08:00
Xu Jun
2135badc54
fix problem in wasm_module_malloc (#374) 2020-09-07 17:32:00 +08:00
Xu Jun
2e0cef3ef1
fix exec_env not checked issue, export __heap_base and __data_end in sample to decrease memory usage (#371) 2020-09-05 14:48:08 +08:00
Wenyong Huang
c8df3f6eed
Fix app heap migrate issue and aot compilation warning (#368) 2020-09-03 11:16:38 +08:00
Wenyong Huang
034606b0a9
Change wasm app offset type from int32 to uint32 (#361)
And fix some sign/unsigned conversion compilation warnings.
2020-08-26 18:33:29 +08:00
qinxk-inter
049760b849
Fix the build issues on mac for some samples (#358)
Fix the build issues on mac for basic/multi-module/multi-thread/
simple/spawn-thread/wasm-c-api under samples.
And all these samples could be run as expected.

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
2020-08-21 15:14:04 +08:00