Skip to content

Commit 72535e4

Browse files
Zzzabiyakaloganek
authored andcommitted
correct endif wasm loader
1 parent 253d741 commit 72535e4

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

core/iwasm/interpreter/wasm_interp_fast.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7019,7 +7019,6 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
70197019
}
70207020
case SIMD_i32x4_add:
70217021
{
7022-
70237022
SIMD_DOUBLE_OP(simde_wasm_i32x4_add);
70247023
break;
70257024
}

core/iwasm/interpreter/wasm_loader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13228,10 +13228,10 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1322813228
skip_label();
1322913229
emit_label(WASM_OP_GET_GLOBAL_128);
1323013230
}
13231-
#endif
1323213231
#endif /* end of WASM_ENABLE_SIMDE */
1323313232
emit_uint32(loader_ctx, global_idx);
1323413233
PUSH_OFFSET_TYPE(global_type);
13234+
#endif /* end of WASM_ENABLE_FAST_INTERP */
1323513235
break;
1323613236
}
1323713237

core/iwasm/interpreter/wasm_opcode.h

Lines changed: 3 additions & 6 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 \
282-
|| (WASM_ENABLE_FAST_INTERP != 0 && WASM_ENABLE_SIMDE != 0)) \
281+
#if (WASM_ENABLE_JIT != 0 || (WASM_ENABLE_FAST_INTERP != 0)) \
283282
&& WASM_ENABLE_SIMD != 0
284283
EXT_OP_SET_LOCAL_FAST_V128 = 0xdd,
285284
EXT_OP_TEE_LOCAL_FAST_V128 = 0xde,
@@ -791,17 +790,15 @@ typedef enum WASMAtomicEXTOpcode {
791790
#endif
792791
#define SET_GOTO_TABLE_ELEM(opcode) [opcode] = HANDLE_OPCODE(opcode)
793792

794-
#if (WASM_ENABLE_JIT != 0 \
795-
|| (WASM_ENABLE_FAST_INTERP != 0 && WASM_ENABLE_SIMDE != 0)) \
793+
#if (WASM_ENABLE_JIT != 0 || (WASM_ENABLE_FAST_INTERP != 0)) \
796794
&& WASM_ENABLE_SIMD != 0
797795
#define SET_GOTO_TABLE_SIMD_PREFIX_ELEM() \
798796
SET_GOTO_TABLE_ELEM(WASM_OP_SIMD_PREFIX),
799797
#else
800798
#define SET_GOTO_TABLE_SIMD_PREFIX_ELEM()
801799
#endif
802800

803-
#if (WASM_ENABLE_FAST_INTERP != 0 && WASM_ENABLE_SIMDE != 0) \
804-
&& WASM_ENABLE_SIMD != 0
801+
#if (WASM_ENABLE_FAST_INTERP != 0) && WASM_ENABLE_SIMD != 0
805802
#define DEF_EXT_V128_HANDLE() \
806803
SET_GOTO_TABLE_ELEM(EXT_OP_SET_LOCAL_FAST_V128), \
807804
SET_GOTO_TABLE_ELEM(EXT_OP_TEE_LOCAL_FAST_V128), \

core/iwasm/libraries/simde/simde.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44

55
set (LIB_SIMDE_DIR ${CMAKE_CURRENT_LIST_DIR})
66

7-
if (WAMR_BUILD_TARGET MATCHES "AARCH64.*" OR "ARM.*")
7+
if (WAMR_BUILD_TARGET MATCHES "AARCH64.*" OR WAMR_BUILD_TARGET MATCHES "ARM.*")
88
add_definitions (-DWASM_ENABLE_SIMDE=1)
9-
endif ()
9+
else()
10+
message(WARNING "Disabling SIMD for fast interpreter as the target is not supported")
11+
set(WAMR_BUILD_SIMD 0)
12+
endif()
1013

1114
include_directories(${LIB_SIMDE_DIR} ${LIB_SIMDE_DIR}/simde)
1215

0 commit comments

Comments
 (0)