Fix threads spec test issues (#1586)
This commit is contained in:
@ -3335,12 +3335,15 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
|
||||
#if WASM_ENABLE_SHARED_MEMORY != 0
|
||||
HANDLE_OP(WASM_OP_ATOMIC_PREFIX)
|
||||
{
|
||||
uint32 offset, align, addr;
|
||||
uint32 offset = 0, align, addr;
|
||||
|
||||
opcode = *frame_ip++;
|
||||
|
||||
read_leb_uint32(frame_ip, frame_ip_end, align);
|
||||
read_leb_uint32(frame_ip, frame_ip_end, offset);
|
||||
if (opcode != WASM_OP_ATOMIC_FENCE) {
|
||||
read_leb_uint32(frame_ip, frame_ip_end, align);
|
||||
read_leb_uint32(frame_ip, frame_ip_end, offset);
|
||||
}
|
||||
|
||||
switch (opcode) {
|
||||
case WASM_OP_ATOMIC_NOTIFY:
|
||||
{
|
||||
@ -3399,6 +3402,12 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
|
||||
PUSH_I32(ret);
|
||||
break;
|
||||
}
|
||||
case WASM_OP_ATOMIC_FENCE:
|
||||
{
|
||||
/* Skip the memory index */
|
||||
frame_ip++;
|
||||
break;
|
||||
}
|
||||
|
||||
case WASM_OP_ATOMIC_I32_LOAD:
|
||||
case WASM_OP_ATOMIC_I32_LOAD8_U:
|
||||
|
||||
@ -3227,11 +3227,13 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
|
||||
#if WASM_ENABLE_SHARED_MEMORY != 0
|
||||
HANDLE_OP(WASM_OP_ATOMIC_PREFIX)
|
||||
{
|
||||
uint32 offset, addr;
|
||||
uint32 offset = 0, addr;
|
||||
|
||||
GET_OPCODE();
|
||||
|
||||
offset = read_uint32(frame_ip);
|
||||
if (opcode != WASM_OP_ATOMIC_FENCE) {
|
||||
offset = read_uint32(frame_ip);
|
||||
}
|
||||
|
||||
switch (opcode) {
|
||||
case WASM_OP_ATOMIC_NOTIFY:
|
||||
|
||||
Reference in New Issue
Block a user