Support table64 extension in classic-interp and AOT running modes (#3811)

Add table64 extension(in Memory64 proposal) support in classic-interp
and AOT running modes, currently still use uint32 to represent table's
initial and maximum size to keep AOT ABI unchanged.
This commit is contained in:
TianlongLiang
2024-10-11 21:14:56 +08:00
committed by GitHub
parent 2b5e2d9c2c
commit 36d438051e
16 changed files with 922 additions and 175 deletions

View File

@ -93,6 +93,10 @@ extern "C" {
#define MAX_PAGE_COUNT_FLAG 0x01
#define SHARED_MEMORY_FLAG 0x02
#define MEMORY64_FLAG 0x04
#define MAX_TABLE_SIZE_FLAG 0x01
/* the shared flag for table is not actual used now */
#define SHARED_TABLE_FLAG 0x02
#define TABLE64_FLAG 0x04
/**
* In the multi-memory proposal, the memarg in loads and stores are
@ -494,6 +498,7 @@ typedef struct WASMTableType {
* 0: no max size and not shared
* 1: has max size
* 2: shared
* 4: table64
*/
uint8 flags;
bool possible_grow;
@ -520,6 +525,7 @@ typedef uint64 mem_offset_t;
typedef uint32 mem_offset_t;
#define PR_MEM_OFFSET PRIu32
#endif
typedef mem_offset_t tbl_elem_idx_t;
typedef struct WASMMemory {
uint32 flags;