diff --git a/core/iwasm/interpreter/wasm_interp_classic.c b/core/iwasm/interpreter/wasm_interp_classic.c index d63b0a0e0..69037b59c 100644 --- a/core/iwasm/interpreter/wasm_interp_classic.c +++ b/core/iwasm/interpreter/wasm_interp_classic.c @@ -1176,12 +1176,15 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, uint8 local_type, *global_addr; uint32 cache_index, type_index, param_cell_num, cell_num; uint8 value_type; +#if !defined(OS_ENABLE_HW_BOUND_CHECK) \ + || WASM_CPU_SUPPORTS_UNALIGNED_ADDR_ACCESS == 0 #if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 bool disable_bounds_checks = !wasm_runtime_is_bounds_checks_enabled( (WASMModuleInstanceCommon *)module); #else bool disable_bounds_checks = false; #endif +#endif #if WASM_ENABLE_DEBUG_INTERP != 0 uint8 *frame_ip_orig = NULL; diff --git a/core/iwasm/interpreter/wasm_interp_fast.c b/core/iwasm/interpreter/wasm_interp_fast.c index 0852ab2f3..40a7d38c8 100644 --- a/core/iwasm/interpreter/wasm_interp_fast.c +++ b/core/iwasm/interpreter/wasm_interp_fast.c @@ -1200,12 +1200,15 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, uint8 *maddr = NULL; uint32 local_idx, local_offset, global_idx; uint8 opcode, local_type, *global_addr; +#if !defined(OS_ENABLE_HW_BOUND_CHECK) \ + || WASM_CPU_SUPPORTS_UNALIGNED_ADDR_ACCESS == 0 #if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 bool disable_bounds_checks = !wasm_runtime_is_bounds_checks_enabled( (WASMModuleInstanceCommon *)module); #else bool disable_bounds_checks = false; #endif +#endif #if WASM_ENABLE_LABELS_AS_VALUES != 0 #define HANDLE_OPCODE(op) &&HANDLE_##op