Fix some compilation warnings and enable Windows JIT (#586)

This commit is contained in:
Wenyong Huang
2021-03-22 06:28:51 -05:00
committed by GitHub
parent a4e4d4198f
commit 02d27e13ee
14 changed files with 119 additions and 29 deletions

View File

@ -574,7 +574,7 @@ load_table_init_data_list(const uint8 **p_buf, const uint8 *buf_end,
data_list[i]->offset.init_expr_type = (uint8)init_expr_type;
data_list[i]->offset.u.i64 = (int64)init_expr_value;
data_list[i]->func_index_count = func_index_count;
read_byte_array(buf, buf_end, data_list[i]->func_indexes, size1);
read_byte_array(buf, buf_end, data_list[i]->func_indexes, (uint32)size1);
}
*p_buf = buf;
@ -1444,7 +1444,7 @@ do_text_relocation(AOTModule *module,
bh_memcpy_s(xmm_buf, sizeof(xmm_buf),
symbol + strlen(XMM_PLT_PREFIX) + 16, 16);
if (!str2uint64(xmm_buf, (uint64*)symbol_addr)) {
set_error_buf_v(error_buf, error_buf,
set_error_buf_v(error_buf, error_buf_size,
"resolve symbol %s failed", symbol);
goto check_symbol_fail;
}
@ -1452,7 +1452,7 @@ do_text_relocation(AOTModule *module,
bh_memcpy_s(xmm_buf, sizeof(xmm_buf),
symbol + strlen(XMM_PLT_PREFIX), 16);
if (!str2uint64(xmm_buf, (uint64*)((uint8*)symbol_addr + 8))) {
set_error_buf_v(error_buf, error_buf,
set_error_buf_v(error_buf, error_buf_size,
"resolve symbol %s failed", symbol);
goto check_symbol_fail;
}
@ -1468,7 +1468,7 @@ do_text_relocation(AOTModule *module,
bh_memcpy_s(real_buf, sizeof(real_buf),
symbol + strlen(REAL_PLT_PREFIX), 16);
if (!str2uint64(real_buf, (uint64*)symbol_addr)) {
set_error_buf_v(error_buf, error_buf,
set_error_buf_v(error_buf, error_buf_size,
"resolve symbol %s failed", symbol);
goto check_symbol_fail;
}
@ -1484,7 +1484,7 @@ do_text_relocation(AOTModule *module,
bh_memcpy_s(float_buf, sizeof(float_buf),
symbol + strlen(REAL_PLT_PREFIX), 8);
if (!str2uint32(float_buf, (uint32*)symbol_addr)) {
set_error_buf_v(error_buf, error_buf,
set_error_buf_v(error_buf, error_buf_size,
"resolve symbol %s failed", symbol);
goto check_symbol_fail;
}
@ -2306,7 +2306,8 @@ aot_load_from_comp_data(AOTCompData *comp_data, AOTCompContext *comp_ctx,
goto fail1;
}
bh_memcpy_s(module->memories, size, comp_data->memories, size);
bh_memcpy_s(module->memories, (uint32)size,
comp_data->memories, (uint32)size);
}
module->mem_init_data_list = comp_data->mem_init_data_list;