Refactor fast-interpreter SIMD compilation flags (#4261)

- enable SIMD flag by default unless hardware limitation
- use SIMDE flag to control fast-interpreter behavior
This commit is contained in:
liang.he
2025-05-14 10:38:30 +08:00
committed by GitHub
parent 26aa4830e9
commit f0a8286863
4 changed files with 21 additions and 21 deletions

View File

@ -152,11 +152,12 @@ bool
is_valid_value_type_for_interpreter(uint8 value_type)
{
#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0) \
&& (WASM_ENABLE_FAST_INTERP == 0)
&& (WASM_ENABLE_SIMDE == 0)
/*
* Note: regardless of WASM_ENABLE_SIMD, our interpreters don't have
* SIMD implemented. It's safer to reject v128, especially for the
* fast interpreter.
* Note: regardless of WASM_ENABLE_SIMD, our classic interpreters don't
* have SIMD implemented.
*
* WASM_ENABLE_SIMDE is used to control SIMD feaure in fast interpreter
*/
if (value_type == VALUE_TYPE_V128)
return false;

View File

@ -3565,7 +3565,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
HANDLE_OP_END();
}
#if WASM_ENABLE_SIMD != 0
#if WASM_ENABLE_SIMDE != 0
HANDLE_OP(EXT_OP_SET_LOCAL_FAST_V128)
HANDLE_OP(EXT_OP_TEE_LOCAL_FAST_V128)
{
@ -3619,7 +3619,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
GET_I64_FROM_ADDR((uint32 *)global_addr));
HANDLE_OP_END();
}
#if WASM_ENABLE_SIMD != 0
#if WASM_ENABLE_SIMDE != 0
HANDLE_OP(WASM_OP_GET_GLOBAL_V128)
{
global_idx = read_uint32(frame_ip);
@ -4956,7 +4956,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
HANDLE_OP_END();
}
#if WASM_ENABLE_SIMD != 0
#if WASM_ENABLE_SIMDE != 0
HANDLE_OP(EXT_OP_COPY_STACK_TOP_V128)
{
addr1 = GET_OFFSET();