Skip to content

Commit 301d4ef

Browse files
committed
Fix replacement value not being correct
1 parent fbbcd08 commit 301d4ef

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

core/iwasm/interpreter/wasm_loader.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15217,17 +15217,27 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1521715217
error_buf_size)) {
1521815218
goto fail;
1521915219
}
15220+
#if WASM_ENABLE_FAST_INTERP != 0
15221+
emit_byte(loader_ctx, lane);
15222+
#endif
1522015223
if (replace[opcode1 - SIMD_i8x16_extract_lane_s]) {
15224+
#if WASM_ENABLE_FAST_INTERP != 0
15225+
if (!(wasm_loader_pop_frame_ref_offset(
15226+
loader_ctx,
15227+
replace[opcode1
15228+
- SIMD_i8x16_extract_lane_s],
15229+
error_buf, error_buf_size)))
15230+
goto fail;
15231+
#else
1522115232
if (!(wasm_loader_pop_frame_ref(
1522215233
loader_ctx,
1522315234
replace[opcode1
1522415235
- SIMD_i8x16_extract_lane_s],
1522515236
error_buf, error_buf_size)))
1522615237
goto fail;
15238+
#endif /* end of WASM_ENABLE_FAST_INTERP != 0 */
1522715239
}
15228-
#if WASM_ENABLE_FAST_INTERP != 0
15229-
emit_byte(loader_ctx, lane);
15230-
#endif
15240+
1523115241
POP_AND_PUSH(
1523215242
VALUE_TYPE_V128,
1523315243
push_type[opcode1 - SIMD_i8x16_extract_lane_s]);

0 commit comments

Comments
 (0)