Fix memory64 handling find_block_addr and execute_main (#3480)
This commit is contained in:
@ -6414,7 +6414,7 @@ create_sections(const uint8 *buf, uint32 size, WASMSection **p_section_list,
|
||||
char *error_buf, uint32 error_buf_size)
|
||||
{
|
||||
WASMSection *section_list_end = NULL, *section;
|
||||
const uint8 *p = buf, *p_end = buf + size /*, *section_body*/;
|
||||
const uint8 *p = buf, *p_end = buf + size;
|
||||
uint8 section_type, section_index, last_section_index = (uint8)-1;
|
||||
uint32 section_size;
|
||||
|
||||
@ -7658,7 +7658,6 @@ wasm_loader_find_block_addr(WASMExecEnv *exec_env, BlockAddr *block_addr_cache,
|
||||
#if (WASM_ENABLE_WAMR_COMPILER != 0) || (WASM_ENABLE_JIT != 0)
|
||||
case WASM_OP_SIMD_PREFIX:
|
||||
{
|
||||
/* TODO: memory64 offset type changes */
|
||||
uint32 opcode1;
|
||||
|
||||
read_leb_uint32(p, p_end, opcode1);
|
||||
@ -7683,8 +7682,8 @@ wasm_loader_find_block_addr(WASMExecEnv *exec_env, BlockAddr *block_addr_cache,
|
||||
case SIMD_v128_store:
|
||||
/* memarg align */
|
||||
skip_leb_uint32(p, p_end);
|
||||
/* memarg offset*/
|
||||
skip_leb_uint32(p, p_end);
|
||||
/* memarg offset */
|
||||
skip_leb_mem_offset(p, p_end);
|
||||
break;
|
||||
|
||||
case SIMD_v128_const:
|
||||
@ -7723,8 +7722,8 @@ wasm_loader_find_block_addr(WASMExecEnv *exec_env, BlockAddr *block_addr_cache,
|
||||
case SIMD_v128_store64_lane:
|
||||
/* memarg align */
|
||||
skip_leb_uint32(p, p_end);
|
||||
/* memarg offset*/
|
||||
skip_leb_uint32(p, p_end);
|
||||
/* memarg offset */
|
||||
skip_leb_mem_offset(p, p_end);
|
||||
/* ImmLaneId */
|
||||
CHECK_BUF(p, p_end, 1);
|
||||
p++;
|
||||
@ -7734,8 +7733,8 @@ wasm_loader_find_block_addr(WASMExecEnv *exec_env, BlockAddr *block_addr_cache,
|
||||
case SIMD_v128_load64_zero:
|
||||
/* memarg align */
|
||||
skip_leb_uint32(p, p_end);
|
||||
/* memarg offset*/
|
||||
skip_leb_uint32(p, p_end);
|
||||
/* memarg offset */
|
||||
skip_leb_mem_offset(p, p_end);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user