wasm-micro-runtime/core/shared/platform
Wenyong Huang 76be848ec3
Implement the segue optimization for LLVM AOT/JIT (#2230)
Segue is an optimization technology which uses x86 segment register to store
the WebAssembly linear memory base address, so as to remove most of the cost
of SFI (Software-based Fault Isolation) base addition and free up a general
purpose register, by this way it may:
- Improve the performance of JIT/AOT
- Reduce the footprint of JIT/AOT, the JIT/AOT code generated is smaller
- Reduce the compilation time of JIT/AOT

This PR uses the x86-64 GS segment register to apply the optimization, currently
it supports linux and linux-sgx platforms on x86-64 target. By default it is disabled,
developer can use the option below to enable it for wamrc and iwasm(with LLVM
JIT enabled):
```bash
wamrc --enable-segue=[<flags>] -o output_file wasm_file
iwasm --enable-segue=[<flags>] wasm_file [args...]
```
`flags` can be:
    i32.load, i64.load, f32.load, f64.load, v128.load,
    i32.store, i64.store, f32.store, f64.store, v128.store
Use comma to separate them, e.g. `--enable-segue=i32.load,i64.store`,
and `--enable-segue` means all flags are added.

Acknowledgement:
Many thanks to Intel Labs, UC San Diego and UT Austin teams for introducing this
technology and the great support and guidance!

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
Co-authored-by: Vahldiek-oberwagner, Anjo Lucas <anjo.lucas.vahldiek-oberwagner@intel.com>
2023-05-26 10:13:33 +08:00
..
alios Add bh_print_proc_mem() to dump memory info of current process (#1734) 2022-11-25 08:33:44 +08:00
android Add mutex initializer for wasm-c-api engine operations (#1656) 2022-10-31 11:48:07 +08:00
common Add asan and ubsan to WAMR CI (#2161) 2023-05-26 09:45:37 +08:00
darwin Add mutex initializer for wasm-c-api engine operations (#1656) 2022-10-31 11:48:07 +08:00
ego Make a workaround for EGO when fstat returns NOT_SUPPORT (#1970) 2023-02-21 11:11:27 +08:00
esp-idf Enable platform support for esp-idf v5.0.1 (#2050) 2023-03-23 17:29:57 +08:00
freebsd Port WAMR to the FreeBSD platform and update the document (#1825) 2022-12-24 10:11:10 +08:00
include Enable CI build for gcc 4.8 on linux (#2106) 2023-04-06 10:10:07 +08:00
linux Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
linux-sgx Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
nuttx nuttx: Add missing pthread.h header (#2009) 2023-03-07 22:01:16 +08:00
riot Add bh_print_proc_mem() to dump memory info of current process (#1734) 2022-11-25 08:33:44 +08:00
rt-thread Add bh_print_proc_mem() to dump memory info of current process (#1734) 2022-11-25 08:33:44 +08:00
vxworks Add mutex initializer for wasm-c-api engine operations (#1656) 2022-10-31 11:48:07 +08:00
windows Fix compile warnings on windows platform (#2208) 2023-05-15 13:48:48 +08:00
zephyr Fix zephyr sample build errors (#1757) 2022-11-28 11:23:51 +08:00
README.md re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00

This folder contains the platform abstract layer for multiple platforms. To support a new platform, you can simply create a new folder here and implement all the APIs defined in include folder.

Refer to port_wamr.md for how to port WAMR to a target platform.