Skip to content

Commit 704aa3e

Browse files
authored
modify macro related to simde when WASM_OP_SELECT_128 (#4461)
* remove macro of fast interpreter when WASM_OP_SELECT_128 * Modified some macros related to SIMDE
1 parent 46d4e24 commit 704aa3e

File tree

4 files changed

+6
-17
lines changed

4 files changed

+6
-17
lines changed

core/iwasm/compilation/aot_compiler.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,13 +1316,6 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index)
13161316
return false;
13171317
break;
13181318

1319-
#if WASM_ENABLE_SIMD != 0
1320-
case WASM_OP_SELECT_128:
1321-
if (!aot_compile_op_select(comp_ctx, func_ctx, true))
1322-
return false;
1323-
break;
1324-
#endif
1325-
13261319
#if WASM_ENABLE_REF_TYPES != 0 || WASM_ENABLE_GC != 0
13271320
case WASM_OP_SELECT_T:
13281321
{

core/iwasm/interpreter/wasm_interp_fast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1887,7 +1887,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
18871887
}
18881888
HANDLE_OP_END();
18891889
}
1890-
#if WASM_ENABLE_SIMD != 0
1890+
#if WASM_ENABLE_SIMDE != 0
18911891
HANDLE_OP(WASM_OP_SELECT_128)
18921892
{
18931893
cond = frame_lp[GET_OFFSET()];

core/iwasm/interpreter/wasm_loader.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7626,7 +7626,7 @@ wasm_loader_find_block_addr(WASMExecEnv *exec_env, BlockAddr *block_addr_cache,
76267626
case WASM_OP_SELECT:
76277627
case WASM_OP_DROP_64:
76287628
case WASM_OP_SELECT_64:
7629-
#if WASM_ENABLE_FAST_INTERP != 0 && WASM_ENABLE_SIMD != 0
7629+
#if WASM_ENABLE_SIMDE != 0
76307630
case WASM_OP_SELECT_128:
76317631
#endif
76327632
break;
@@ -13155,9 +13155,7 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1315513155
#if (WASM_ENABLE_WAMR_COMPILER != 0) || (WASM_ENABLE_JIT != 0) \
1315613156
|| (WASM_ENABLE_FAST_INTERP != 0)
1315713157
case VALUE_TYPE_V128:
13158-
#if WASM_ENABLE_FAST_INTERP == 0
13159-
*(p - 1) = WASM_OP_SELECT_128;
13160-
#else
13158+
#if WASM_ENABLE_SIMDE != 0
1316113159
if (loader_ctx->p_code_compiled) {
1316213160
uint8 opcode_tmp = WASM_OP_SELECT_128;
1316313161
#if WASM_ENABLE_LABELS_AS_VALUES != 0
@@ -13285,8 +13283,7 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1328513283
uint8 opcode_tmp = WASM_OP_SELECT;
1328613284

1328713285
if (type == VALUE_TYPE_V128) {
13288-
#if WASM_ENABLE_JIT != 0 \
13289-
|| WASM_ENABLE_FAST_INTERP != 0 && WASM_ENABLE_SIMD != 0
13286+
#if WASM_ENABLE_SIMDE != 0
1329013287
opcode_tmp = WASM_OP_SELECT_128;
1329113288
#else
1329213289
set_error_buf(error_buf, error_buf_size,

core/iwasm/interpreter/wasm_opcode.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,7 @@ typedef enum WASMOpcode {
278278
DEBUG_OP_BREAK = 0xdc, /* debug break point */
279279
#endif
280280

281-
#if WASM_ENABLE_JIT != 0 || WASM_ENABLE_FAST_INTERP != 0 \
282-
|| WASM_ENABLE_WAMR_COMPILER != 0 && WASM_ENABLE_SIMD != 0
281+
#if WASM_ENABLE_SIMDE != 0
283282
EXT_OP_SET_LOCAL_FAST_V128 = 0xdd,
284283
EXT_OP_TEE_LOCAL_FAST_V128 = 0xde,
285284
EXT_OP_COPY_STACK_TOP_V128 = 0xdf,
@@ -798,7 +797,7 @@ typedef enum WASMAtomicEXTOpcode {
798797
#define SET_GOTO_TABLE_SIMD_PREFIX_ELEM()
799798
#endif
800799

801-
#if WASM_ENABLE_SIMD != 0 && WASM_ENABLE_SIMDE != 0
800+
#if WASM_ENABLE_SIMDE != 0
802801
#define DEF_EXT_V128_HANDLE() \
803802
SET_GOTO_TABLE_ELEM(EXT_OP_SET_LOCAL_FAST_V128), /* 0xdd */ \
804803
SET_GOTO_TABLE_ELEM(EXT_OP_TEE_LOCAL_FAST_V128), /* 0xde */ \

0 commit comments

Comments
 (0)