@@ -7300,8 +7300,10 @@ wasm_loader_find_block_addr(WASMExecEnv *exec_env, BlockAddr *block_addr_cache,
73007300 case WASM_OP_SET_GLOBAL:
73017301 case WASM_OP_GET_GLOBAL_64:
73027302 case WASM_OP_SET_GLOBAL_64:
7303+ #if WASM_ENABLE_SIMDE != 0
73037304 case WASM_OP_GET_GLOBAL_128:
73047305 case WASM_OP_SET_GLOBAL_128:
7306+ #endif
73057307 case WASM_OP_SET_GLOBAL_AUX_STACK:
73067308 skip_leb_uint32(p, p_end); /* local index */
73077309 break;
@@ -9090,6 +9092,7 @@ preserve_referenced_local(WASMLoaderContext *loader_ctx, uint8 opcode,
90909092 bool *preserved, char *error_buf,
90919093 uint32 error_buf_size)
90929094{
9095+
90939096 uint32 i = 0;
90949097 int16 preserved_offset = (int16)local_index;
90959098
@@ -9113,11 +9116,13 @@ preserve_referenced_local(WASMLoaderContext *loader_ctx, uint8 opcode,
91139116 loader_ctx->preserved_local_offset++;
91149117 emit_label(EXT_OP_COPY_STACK_TOP);
91159118 }
9119+ #if WASM_ENABLE_SIMDE != 0
91169120 else if (local_type == VALUE_TYPE_V128) {
91179121 if (loader_ctx->p_code_compiled)
91189122 loader_ctx->preserved_local_offset += 4;
91199123 emit_label(EXT_OP_COPY_STACK_TOP_V128);
91209124 }
9125+ #endif
91219126 else {
91229127 if (loader_ctx->p_code_compiled)
91239128 loader_ctx->preserved_local_offset += 2;
@@ -9790,11 +9795,12 @@ reserve_block_ret(WASMLoaderContext *loader_ctx, uint8 opcode,
97909795 /* insert op_copy before else opcode */
97919796 if (opcode == WASM_OP_ELSE)
97929797 skip_label();
9793-
9798+ #if WASM_ENABLE_SIMDE != 0
97949799 if (cell == 4) {
97959800 emit_label(EXT_OP_COPY_STACK_TOP_V128);
97969801 }
9797- else {
9802+ #endif
9803+ if (cell <= 2) {
97989804 emit_label(cell == 1 ? EXT_OP_COPY_STACK_TOP
97999805 : EXT_OP_COPY_STACK_TOP_I64);
98009806 }
@@ -13115,10 +13121,12 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1311513121 emit_label(EXT_OP_TEE_LOCAL_FAST);
1311613122 emit_byte(loader_ctx, (uint8)local_offset);
1311713123 }
13124+ #if WASM_ENABLE_SIMDE != 0
1311813125 else if (local_type == VALUE_TYPE_V128) {
1311913126 emit_label(EXT_OP_TEE_LOCAL_FAST_V128);
1312013127 emit_byte(loader_ctx, (uint8)local_offset);
1312113128 }
13129+ #endif
1312213130 else {
1312313131 emit_label(EXT_OP_TEE_LOCAL_FAST_I64);
1312413132 emit_byte(loader_ctx, (uint8)local_offset);
@@ -13213,11 +13221,12 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1321313221 skip_label();
1321413222 emit_label(WASM_OP_GET_GLOBAL_64);
1321513223 }
13216-
13224+ #if WASM_ENABLE_SIMDE != 0
1321713225 if (global_type == VALUE_TYPE_V128) {
1321813226 skip_label();
1321913227 emit_label(WASM_OP_GET_GLOBAL_128);
1322013228 }
13229+ #endif
1322113230#endif /* end of WASM_ENABLE_SIMDE */
1322213231 emit_uint32(loader_ctx, global_idx);
1322313232 PUSH_OFFSET_TYPE(global_type);
0 commit comments