Add check for code section size, fix interp float operations (#1480)
And enable classic interpreter instead fast interpreter when llvm jit is enabled, so as to fix the issue that llvm jit cannot handle opcode drop_64/select_64.
This commit is contained in:
@ -2115,6 +2115,10 @@ load_from_sections(WASMModule *module, WASMSection *sections,
|
||||
error_buf_size)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (i == module->function_count - 1) {
|
||||
bh_assert(func->code + func->code_size == buf_code_end);
|
||||
}
|
||||
}
|
||||
|
||||
if (!module->possible_memory_grow) {
|
||||
@ -5545,7 +5549,7 @@ re_scan:
|
||||
else if (is_64bit_type(*(loader_ctx->frame_ref - 1))) {
|
||||
loader_ctx->frame_ref -= 2;
|
||||
loader_ctx->stack_cell_num -= 2;
|
||||
#if (WASM_ENABLE_FAST_INTERP == 0) || (WASM_ENABLE_JIT != 0)
|
||||
#if WASM_ENABLE_FAST_INTERP == 0
|
||||
*(p - 1) = WASM_OP_DROP_64;
|
||||
#endif
|
||||
#if WASM_ENABLE_FAST_INTERP != 0
|
||||
@ -5591,7 +5595,7 @@ re_scan:
|
||||
break;
|
||||
case REF_I64_2:
|
||||
case REF_F64_2:
|
||||
#if (WASM_ENABLE_FAST_INTERP == 0) || (WASM_ENABLE_JIT != 0)
|
||||
#if WASM_ENABLE_FAST_INTERP == 0
|
||||
*(p - 1) = WASM_OP_SELECT_64;
|
||||
#endif
|
||||
#if WASM_ENABLE_FAST_INTERP != 0
|
||||
|
||||
Reference in New Issue
Block a user