wasm-micro-runtime/core/iwasm/fast-jit
Wenyong Huang 313ce8cb61
Fix memory/table segment checks in memory.init/table.init (#3081)
According to the wasm core spec, the checks for the table segments in
`table.init` opcode are similar to the checks for `memory.init` opcode:
- The size of a passive segment is shrunk to zero after `data.drop`
  (or `elem.drop`) opcode is executed, and the segment can be used to do
  `memory.init` (or `table.init`) again
- The `memory.init` only traps when `s+n > len(data.data)` or `d+n > len(mem.data)`
  and `table.init` only traps when `s+n > len(elem.elem)` or `d+n > len(tab.elem)`
- The active segment can also be used to do `memory.init` (or `table.init`),
  while it behaves like a dropped passive segment

https://github.com/WebAssembly/bulk-memory-operations/blob/master/proposals/bulk-memory-operations/Overview.md
```
Segments can also be shrunk to size zero by using the following new instructions:
- data.drop: discard the data in an data segment
- elem.drop: discard the data in an element segment

An active segment is equivalent to a passive segment, but with an implicit
memory.init followed by a data.drop (or table.init followed by a elem.drop)
that is prepended to the module's start function.
```
ps.
https://webassembly.github.io/spec/core/bikeshed/#-hrefsyntax-instr-memorymathsfmemoryinitx%E2%91%A0
https://webassembly.github.io/spec/core/bikeshed/#-hrefsyntax-instr-tablemathsftableinitxy%E2%91%A0
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3020
2024-01-26 09:45:59 +08:00
..
cg fast-jit: Fix const shift and const i64 compare issues (#2969) 2024-01-02 17:56:34 +08:00
fe Fix memory/table segment checks in memory.init/table.init (#3081) 2024-01-26 09:45:59 +08:00
asmjit_sgx_patch.diff Import WAMR Fast JIT (#1343) 2022-08-02 16:03:50 +08:00
iwasm_fast_jit.cmake Fix fast-jit build error (#2023) 2023-03-12 20:17:49 +08:00
jit_codecache.c Extend os_mmap to support map file from fd (#2763) 2023-11-16 08:28:54 +08:00
jit_codecache.h Import WAMR Fast JIT (#1343) 2022-08-02 16:03:50 +08:00
jit_codegen.c Import WAMR Fast JIT (#1343) 2022-08-02 16:03:50 +08:00
jit_codegen.h Implement Multi-tier JIT (#1774) 2022-12-19 11:24:46 +08:00
jit_compiler.c Enable running mode control for runtime and module instance (#1923) 2023-02-02 18:16:01 +08:00
jit_compiler.h Enable AOT linux perf support (#2930) 2024-01-02 15:58:17 +08:00
jit_dump.c Implement Fast JIT multi-threading feature (#2134) 2023-04-20 10:09:34 +08:00
jit_dump.h Import WAMR Fast JIT (#1343) 2022-08-02 16:03:50 +08:00
jit_frontend.c Enhancements on wasm function execution time statistic (#2985) 2024-01-17 09:51:54 +08:00
jit_frontend.h Fix fast-jit accessing shared memory's fields issue (#2841) 2023-12-01 17:41:24 +08:00
jit_ir.c Implement Fast JIT multi-threading feature (#2134) 2023-04-20 10:09:34 +08:00
jit_ir.def Implement Fast JIT multi-threading feature (#2134) 2023-04-20 10:09:34 +08:00
jit_ir.h Fix fast-jit accessing shared memory's fields issue (#2841) 2023-12-01 17:41:24 +08:00
jit_regalloc.c Implement Fast JIT multi-threading feature (#2134) 2023-04-20 10:09:34 +08:00
jit_utils.h Remove unused JitBitmap (#2775) 2023-11-16 18:48:06 +08:00