Fix XIP issues of fp to int cast and int rem/div (#1654)

This commit is contained in:
Huang Qi
2022-11-01 20:29:07 +08:00
committed by GitHub
parent a1f7832625
commit 94cecbe4cb
4 changed files with 54 additions and 18 deletions

View File

@ -57,6 +57,8 @@ static const aot_intrinsic g_intrinsic_mapping[] = {
{ "i32_trunc_f32_s", "aot_intrinsic_f32_to_i32", AOT_INTRINSIC_FLAG_F32_TO_I32 },
{ "i32_trunc_f64_u", "aot_intrinsic_f64_to_u32", AOT_INTRINSIC_FLAG_F64_TO_U32 },
{ "i32_trunc_f64_s", "aot_intrinsic_f64_to_i32", AOT_INTRINSIC_FLAG_F64_TO_I32 },
{ "i64_trunc_f64_u", "aot_intrinsic_f64_to_u64", AOT_INTRINSIC_FLAG_F64_TO_U64 },
{ "i64_trunc_f64_s", "aot_intrinsic_f64_to_i64", AOT_INTRINSIC_FLAG_F64_TO_I64 },
{ "f32_demote_f64", "aot_intrinsic_f64_to_f32", AOT_INTRINSIC_FLAG_F64_TO_F32 },
{ "f64_promote_f32", "aot_intrinsic_f32_to_f64", AOT_INTRINSIC_FLAG_F32_TO_F64 },
{ "f32_cmp", "aot_intrinsic_f32_cmp", AOT_INTRINSIC_FLAG_F32_CMP },
@ -665,6 +667,7 @@ aot_intrinsic_fill_capability_flags(AOTCompContext *comp_ctx)
else {
add_f32_common_intrinsics(comp_ctx);
add_f64_common_intrinsics(comp_ctx);
add_i64_common_intrinsics(comp_ctx);
add_common_float_integer_convertion(comp_ctx);
}
}

View File

@ -103,6 +103,8 @@ typedef struct {
REG_SYM(aot_intrinsic_f32_to_u32), \
REG_SYM(aot_intrinsic_f64_to_i32), \
REG_SYM(aot_intrinsic_f64_to_u32), \
REG_SYM(aot_intrinsic_f64_to_i64), \
REG_SYM(aot_intrinsic_f64_to_u64), \
REG_SYM(aot_intrinsic_f32_to_f64), \
REG_SYM(aot_intrinsic_f32_cmp), \
REG_SYM(aot_intrinsic_f64_cmp), \