[libc-commits] [PATCH] D143116: edit the error message

Renyi Chen via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Feb 1 15:59:24 PST 2023


renyichen updated this revision to Diff 494100.
renyichen added a comment.

Add darwin as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143116/new/

https://reviews.llvm.org/D143116

Files:
  libc/config/darwin/arm/entrypoints.txt
  libc/src/math/generic/scalbn.cpp
  libc/src/math/generic/scalbnf.cpp
  libc/src/math/generic/scalbnl.cpp


Index: libc/src/math/generic/scalbnl.cpp
===================================================================
--- libc/src/math/generic/scalbnl.cpp
+++ libc/src/math/generic/scalbnl.cpp
@@ -16,7 +16,7 @@
 #if !defined(__FLT_RADIX__)
 #error __FLT_RADIX__ undefined.
 #elif __FLT_RADIX__ != 2
-#error __FLT_RADIX__!=2.
+#error __FLT_RADIX__!=2, unimplemented.
 #else
   return fputil::ldexp(x, n);
 #endif
Index: libc/src/math/generic/scalbnf.cpp
===================================================================
--- libc/src/math/generic/scalbnf.cpp
+++ libc/src/math/generic/scalbnf.cpp
@@ -16,7 +16,7 @@
 #if !defined(__FLT_RADIX__)
 #error __FLT_RADIX__ undefined.
 #elif __FLT_RADIX__ != 2
-#error __FLT_RADIX__!=2.
+#error __FLT_RADIX__!=2, unimplemented.
 #else
   return fputil::ldexp(x, n);
 #endif
Index: libc/src/math/generic/scalbn.cpp
===================================================================
--- libc/src/math/generic/scalbn.cpp
+++ libc/src/math/generic/scalbn.cpp
@@ -14,11 +14,11 @@
 
 LLVM_LIBC_FUNCTION(double, scalbn, (double x, int n)) {
 #if !defined(__FLT_RADIX__)
-#error __FLT_RADIX__!=2.
-#elif __FLT_RADIX__ == 2
-  return fputil::ldexp(x, n);
-#else
 #error __FLT_RADIX__ undefined.
+#elif __FLT_RADIX__ != 2
+#error __FLT_RADIX__!=2, unimplemented.
+#else
+  return fputil::ldexp(x, n);
 #endif
 }
 
Index: libc/config/darwin/arm/entrypoints.txt
===================================================================
--- libc/config/darwin/arm/entrypoints.txt
+++ libc/config/darwin/arm/entrypoints.txt
@@ -198,6 +198,9 @@
     libc.src.math.round
     libc.src.math.roundf
     libc.src.math.roundl
+    libc.src.math.scalbn
+    libc.src.math.scalbnf
+    libc.src.math.scalbnl
     libc.src.math.sincosf
     libc.src.math.sinhf
     libc.src.math.sinf


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143116.494100.patch
Type: text/x-patch
Size: 1792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230201/17c82e92/attachment.bin>


More information about the libc-commits mailing list