From cdf5038e59f3635f9629f668a771cfbf5434e2d2 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 3 Apr 2025 09:59:22 +0200 Subject: [PATCH] corrects fp functions for llvm --- src/vm/llvm/fp_impl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vm/llvm/fp_impl.cpp b/src/vm/llvm/fp_impl.cpp index ef0889f..85da08e 100644 --- a/src/vm/llvm/fp_impl.cpp +++ b/src/vm/llvm/fp_impl.cpp @@ -102,6 +102,7 @@ void add_fp_functions_2_module(Module* mod, uint32_t flen, uint32_t xlen) { FDECL(fmadd_s, INT_TYPE(32), INT_TYPE(32), INT_TYPE(32), INT_TYPE(32), INT_TYPE(32), INT_TYPE(8)); FDECL(fsel_s, INT_TYPE(32), INT_TYPE(32), INT_TYPE(32), INT_TYPE(32)); FDECL(fclass_s, INT_TYPE(32), INT_TYPE(32)); + FDECL(unbox_s, INT_TYPE(32), INT_TYPE(32), INT_TYPE(64)); // technically the first arg is only 8 bits FDECL(f32toi32, INT_TYPE(32), INT_TYPE(32), INT_TYPE(8)); FDECL(f32toui32, INT_TYPE(32), INT_TYPE(32), INT_TYPE(8)); @@ -112,7 +113,6 @@ void add_fp_functions_2_module(Module* mod, uint32_t flen, uint32_t xlen) { FDECL(i64tof32, INT_TYPE(32), INT_TYPE(64), INT_TYPE(8)); FDECL(ui64tof32, INT_TYPE(32), INT_TYPE(64), INT_TYPE(8)); if(flen > 32) { - FDECL(unbox_s, INT_TYPE(32), INT_TYPE(32), INT_TYPE(64)); // technically the first arg is only 8 bits FDECL(fadd_d, INT_TYPE(64), INT_TYPE(64), INT_TYPE(64), INT_TYPE(8)); FDECL(fsub_d, INT_TYPE(64), INT_TYPE(64), INT_TYPE(64), INT_TYPE(8)); @@ -134,6 +134,8 @@ void add_fp_functions_2_module(Module* mod, uint32_t flen, uint32_t xlen) { FDECL(ui32tof64, INT_TYPE(64), INT_TYPE(32), INT_TYPE(8)); FDECL(f64toi32, INT_TYPE(32), INT_TYPE(64), INT_TYPE(8)); FDECL(f64toui32, INT_TYPE(32), INT_TYPE(64), INT_TYPE(8)); + + FDECL(unbox_d, INT_TYPE(64), INT_TYPE(32), INT_TYPE(64)); // technically the first arg is only 8 bits } } }