Skip to content

Commit 647fc89

Browse files
committed
Fix missing (i|u)32.trunc_s/f32 intrinsics
1 parent d73bf4b commit 647fc89

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

core/iwasm/aot/aot_intrinsic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ static const aot_intrinsic g_intrinsic_mapping[] = {
5353
{ "f64_convert_i64_u", "aot_intrinsic_u64_to_f64", AOT_INTRINSIC_FLAG_U64_TO_F64 },
5454
{ "f32_convert_i64_s", "aot_intrinsic_i64_to_f32", AOT_INTRINSIC_FLAG_I64_TO_F32 },
5555
{ "f32_convert_i64_u", "aot_intrinsic_u64_to_f32", AOT_INTRINSIC_FLAG_U64_TO_F32 },
56+
{ "i32_trunc_f32_u", "aot_intrinsic_f32_to_u32", AOT_INTRINSIC_FLAG_F32_TO_U32 },
57+
{ "i32_trunc_f32_s", "aot_intrinsic_f32_to_i32", AOT_INTRINSIC_FLAG_F32_TO_I32 },
5658
{ "i32_trunc_f64_u", "aot_intrinsic_f64_to_u32", AOT_INTRINSIC_FLAG_F64_TO_U32 },
5759
{ "i32_trunc_f64_s", "aot_intrinsic_f64_to_i32", AOT_INTRINSIC_FLAG_F64_TO_I32 },
5860
{ "f32_demote_f64", "aot_intrinsic_f64_to_f32", AOT_INTRINSIC_FLAG_F64_TO_F32 },

core/iwasm/aot/aot_reloc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ typedef struct {
9999
REG_SYM(aot_intrinsic_i64_to_f64), \
100100
REG_SYM(aot_intrinsic_u64_to_f64), \
101101
REG_SYM(aot_intrinsic_f64_to_f32), \
102+
REG_SYM(aot_intrinsic_f32_to_i32), \
103+
REG_SYM(aot_intrinsic_f32_to_u32), \
102104
REG_SYM(aot_intrinsic_f64_to_i32), \
103105
REG_SYM(aot_intrinsic_f64_to_u32), \
104106
REG_SYM(aot_intrinsic_f32_to_f64), \

0 commit comments

Comments
 (0)