Implement i64.div and i64.rem intrinsics (#1375)

This commit is contained in:
Huang Qi
2022-08-12 11:09:06 +08:00
committed by GitHub
parent 88cf1e36c1
commit 2178787664
4 changed files with 108 additions and 4 deletions

View File

@ -88,6 +88,11 @@ extern "C" {
#define AOT_INTRINSIC_FLAG_F64_CMP AOT_INTRINSIC_FLAG(1, 25)
#define AOT_INTRINSIC_FLAG_F64_CONST AOT_INTRINSIC_FLAG(1, 26)
#define AOT_INTRINSIC_FLAG_I64_CONST AOT_INTRINSIC_FLAG(1, 27)
#define AOT_INTRINSIC_FLAG_I64_DIV_S AOT_INTRINSIC_FLAG(1, 28)
#define AOT_INTRINSIC_FLAG_I64_DIV_U AOT_INTRINSIC_FLAG(1, 29)
#define AOT_INTRINSIC_FLAG_I64_REM_S AOT_INTRINSIC_FLAG(1, 30)
#define AOT_INTRINSIC_FLAG_I64_REM_U AOT_INTRINSIC_FLAG(1, 31)
/* clang-format on */
float32
@ -246,6 +251,18 @@ aot_intrinsic_f32_cmp(AOTFloatCond cond, float32 lhs, float32 rhs);
int32
aot_intrinsic_f64_cmp(AOTFloatCond cond, float64 lhs, float64 rhs);
int64
aot_intrinsic_i64_div_s(int64 l, int64 r);
uint64
aot_intrinsic_i64_div_u(uint64 l, uint64 r);
int64
aot_intrinsic_i64_rem_s(int64 l, int64 r);
uint64
aot_intrinsic_i64_rem_u(uint64 l, uint64 r);
const char *
aot_intrinsic_get_symbol(const char *llvm_intrinsic);