Add support for multi-memory proposal in classic interpreter (#3742)

Implement multi-memory for classic-interpreter. Support core spec (and bulk memory) opcodes now,
and will support atomic opcodes, and add multi-memory export APIs in the future. 

PS: Multi-memory spec test patched a lot for linking test to adapt for multi-module implementation.
This commit is contained in:
Wenyong Huang
2024-08-21 12:22:23 +08:00
committed by GitHub
parent f4383a9e62
commit 1329e1d3e1
22 changed files with 1658 additions and 262 deletions

View File

@ -540,6 +540,7 @@ aot_create_comp_data(WASMModule *module, const char *target_arch,
/* TODO: create import memories */
/* Allocate memory for memory array, reserve one AOTMemory space at least */
/* TODO: multi-memory */
if (!comp_data->memory_count)
comp_data->memory_count = 1;

View File

@ -895,6 +895,7 @@ aot_compile_op_memory_grow(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx)
POP_PAGE_COUNT(delta);
/* TODO: multi-memory aot_enlarge_memory_with_idx() */
/* Function type of aot_enlarge_memory() */
param_types[0] = INT8_PTR_TYPE;
param_types[1] = I32_TYPE;