Skip to content

Commit

Permalink
correct endif wasm loader
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzzabiyaka committed Jan 27, 2025
1 parent 46bc07b commit b8c9245
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion core/iwasm/interpreter/wasm_interp_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -7027,7 +7027,6 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
}
case SIMD_i32x4_add:
{

SIMD_DOUBLE_OP(simde_wasm_i32x4_add);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion core/iwasm/interpreter/wasm_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -13228,10 +13228,10 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
skip_label();
emit_label(WASM_OP_GET_GLOBAL_128);
}
#endif
#endif /* end of WASM_ENABLE_SIMDE */
emit_uint32(loader_ctx, global_idx);
PUSH_OFFSET_TYPE(global_type);
#endif /* end of WASM_ENABLE_FAST_INTERP */
break;
}

Expand Down
9 changes: 3 additions & 6 deletions core/iwasm/interpreter/wasm_opcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,7 @@ typedef enum WASMOpcode {
DEBUG_OP_BREAK = 0xdc, /* debug break point */
#endif

#if (WASM_ENABLE_JIT != 0 \
|| (WASM_ENABLE_FAST_INTERP != 0 && WASM_ENABLE_SIMDE != 0)) \
#if (WASM_ENABLE_JIT != 0 || (WASM_ENABLE_FAST_INTERP != 0)) \
&& WASM_ENABLE_SIMD != 0
EXT_OP_SET_LOCAL_FAST_V128 = 0xdd,
EXT_OP_TEE_LOCAL_FAST_V128 = 0xde,
Expand Down Expand Up @@ -791,17 +790,15 @@ typedef enum WASMAtomicEXTOpcode {
#endif
#define SET_GOTO_TABLE_ELEM(opcode) [opcode] = HANDLE_OPCODE(opcode)

#if (WASM_ENABLE_JIT != 0 \
|| (WASM_ENABLE_FAST_INTERP != 0 && WASM_ENABLE_SIMDE != 0)) \
#if (WASM_ENABLE_JIT != 0 || (WASM_ENABLE_FAST_INTERP != 0)) \
&& WASM_ENABLE_SIMD != 0
#define SET_GOTO_TABLE_SIMD_PREFIX_ELEM() \
SET_GOTO_TABLE_ELEM(WASM_OP_SIMD_PREFIX),
#else
#define SET_GOTO_TABLE_SIMD_PREFIX_ELEM()
#endif

#if (WASM_ENABLE_FAST_INTERP != 0 && WASM_ENABLE_SIMDE != 0) \
&& WASM_ENABLE_SIMD != 0
#if (WASM_ENABLE_FAST_INTERP != 0) && WASM_ENABLE_SIMD != 0
#define DEF_EXT_V128_HANDLE() \
SET_GOTO_TABLE_ELEM(EXT_OP_SET_LOCAL_FAST_V128), \
SET_GOTO_TABLE_ELEM(EXT_OP_TEE_LOCAL_FAST_V128), \
Expand Down
7 changes: 5 additions & 2 deletions core/iwasm/libraries/simde/simde.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

set (LIB_SIMDE_DIR ${CMAKE_CURRENT_LIST_DIR})

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

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

Expand Down

0 comments on commit b8c9245

Please sign in to comment.