[llvm] [WebAssembly] Fix signatures of frexpf family of libcalls (PR #133289)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 27 11:02:44 PDT 2025


https://github.com/sbc100 created https://github.com/llvm/llvm-project/pull/133289

Fixes: https://github.com/emscripten-core/emscripten/issues/23997

>From 49a548054faf817d13b9b36cb726573696aa76b1 Mon Sep 17 00:00:00 2001
From: Sam Clegg <sbc at chromium.org>
Date: Thu, 27 Mar 2025 11:01:38 -0700
Subject: [PATCH] [WebAssembly] Fix signatures of frexpf family of libcalls

---
 .../WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
index 94d80f19e48af..ce795d3dedc6a 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
@@ -278,9 +278,9 @@ struct RuntimeLibcallSignatureTable {
     Table[RTLIB::LDEXP_F32] = f32_func_f32_i32;
     Table[RTLIB::LDEXP_F64] = f64_func_f64_i32;
     Table[RTLIB::LDEXP_F128] = i64_i64_func_i64_i64_i32;
-    Table[RTLIB::FREXP_F32] = f32_func_f32_i32;
-    Table[RTLIB::FREXP_F64] = f64_func_f64_i32;
-    Table[RTLIB::FREXP_F128] = i64_i64_func_i64_i64_i32;
+    Table[RTLIB::FREXP_F32] = f32_func_f32_iPTR;
+    Table[RTLIB::FREXP_F64] = f64_func_f64_iPTR;
+    Table[RTLIB::FREXP_F128] = i64_i64_func_i64_i64_iPTR;
     Table[RTLIB::MODF_F32] = f32_func_f32_iPTR;
     Table[RTLIB::MODF_F64] = f64_func_f64_iPTR;
     Table[RTLIB::MODF_F128] = i64_i64_func_i64_i64_iPTR;



More information about the llvm-commits mailing list