Skip to content

Commit f7f1491

Browse files
authored
Merge pull request #3832 from loganek/loganek/simd
implement POP_V128()
2 parents 326aea2 + 860379b commit f7f1491

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

core/iwasm/common/wasm_loader_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ is_valid_value_type(uint8 type)
8989
bool
9090
is_valid_value_type_for_interpreter(uint8 value_type)
9191
{
92-
#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0)
92+
#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0) \
93+
&& (WASM_ENABLE_FAST_INTERP == 0)
9394
/*
9495
* Note: regardless of WASM_ENABLE_SIMD, our interpreters don't have
9596
* SIMD implemented. It's safer to reject v128, especially for the

core/iwasm/interpreter/wasm_interp_fast.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,8 @@ wasm_interp_get_frame_ref(WASMInterpFrame *frame)
485485

486486
#define POP_I64() (GET_I64_FROM_ADDR(frame_lp + GET_OFFSET()))
487487

488+
#define POP_V128() (GET_V128_FROM_ADDR(frame_lp + GET_OFFSET()))
489+
488490
#define POP_F64() (GET_F64_FROM_ADDR(frame_lp + GET_OFFSET()))
489491

490492
#define POP_REF() \
@@ -5662,8 +5664,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
56625664
}
56635665
case SIMD_v128_any_true:
56645666
{
5665-
V128 value = GET_OPERAND_V128(0);
5666-
frame_ip += 2;
5667+
V128 value = POP_V128();
56675668
addr_ret = GET_OFFSET();
56685669
frame_lp[addr_ret] =
56695670
value.i64x2[0] != 0 || value.i64x2[1] != 0;

0 commit comments

Comments
 (0)