[libc-commits] [libc] [libc][math][c23] Add linux/* entrypoints for nextup* and nextdown* (PR #85803)

via libc-commits libc-commits at lists.llvm.org
Tue Mar 19 08:31:38 PDT 2024


https://github.com/overmighty created https://github.com/llvm/llvm-project/pull/85803

See https://github.com/llvm/llvm-project/pull/85484#discussion_r1526971653.

There already were entrypoints for linux/x86_64. I haven't tested on the other targets and will rely on the buildbots.

cc @lntue

>From c121a73f484570072fafbf1e83f92fca9fc11f37 Mon Sep 17 00:00:00 2001
From: OverMighty <its.overmighty at gmail.com>
Date: Tue, 19 Mar 2024 15:16:41 +0000
Subject: [PATCH] [libc][math][c23] Add linux/* entrypoints for nextup* and
 nextdown*

---
 libc/config/linux/aarch64/entrypoints.txt |  8 ++++++++
 libc/config/linux/arm/entrypoints.txt     |  6 ++++++
 libc/config/linux/riscv/entrypoints.txt   |  8 ++++++++
 libc/config/linux/x86_64/entrypoints.txt  |  6 +++---
 libc/docs/math/index.rst                  | 16 ++++++++--------
 5 files changed, 33 insertions(+), 11 deletions(-)

diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 58502e4ec1c660..dbf81c284e7845 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -417,9 +417,15 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.nextafter
     libc.src.math.nextafterf
     libc.src.math.nextafterl
+    libc.src.math.nextdown
+    libc.src.math.nextdownf
+    libc.src.math.nextdownl
     libc.src.math.nexttoward
     libc.src.math.nexttowardf
     libc.src.math.nexttowardl
+    libc.src.math.nextup
+    libc.src.math.nextupf
+    libc.src.math.nextupl
     libc.src.math.powf
     libc.src.math.remainderf
     libc.src.math.remainder
@@ -472,6 +478,8 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.modff128
     libc.src.math.nanf128
     libc.src.math.nextafterf128
+    libc.src.math.nextdownf128
+    libc.src.math.nextupf128
     libc.src.math.rintf128
     libc.src.math.roundf128
     libc.src.math.sqrtf128
diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index bf1559b2f02369..3bc5d8efc9d26b 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -285,9 +285,15 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.nextafter
     libc.src.math.nextafterf
     libc.src.math.nextafterl
+    libc.src.math.nextdown
+    libc.src.math.nextdownf
+    libc.src.math.nextdownl
     libc.src.math.nexttoward
     libc.src.math.nexttowardf
     libc.src.math.nexttowardl
+    libc.src.math.nextup
+    libc.src.math.nextupf
+    libc.src.math.nextupl
     libc.src.math.powf
     libc.src.math.remainder
     libc.src.math.remainderf
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index d789f03fedc419..b42a55a4d712e1 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -425,9 +425,15 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.nextafter
     libc.src.math.nextafterf
     libc.src.math.nextafterl
+    libc.src.math.nextdown
+    libc.src.math.nextdownf
+    libc.src.math.nextdownl
     libc.src.math.nexttoward
     libc.src.math.nexttowardf
     libc.src.math.nexttowardl
+    libc.src.math.nextup
+    libc.src.math.nextupf
+    libc.src.math.nextupl
     libc.src.math.powf
     libc.src.math.remainderf
     libc.src.math.remainder
@@ -480,6 +486,8 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.modff128
     libc.src.math.nanf128
     libc.src.math.nextafterf128
+    libc.src.math.nextdownf128
+    libc.src.math.nextupf128
     libc.src.math.rintf128
     libc.src.math.roundf128
     libc.src.math.sqrtf128
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index f81d334e9e788d..e8cf11266624a7 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -429,12 +429,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.nextafter
     libc.src.math.nextafterf
     libc.src.math.nextafterl
-    libc.src.math.nexttoward
-    libc.src.math.nexttowardf
-    libc.src.math.nexttowardl
     libc.src.math.nextdown
     libc.src.math.nextdownf
     libc.src.math.nextdownl
+    libc.src.math.nexttoward
+    libc.src.math.nexttowardf
+    libc.src.math.nexttowardl
     libc.src.math.nextup
     libc.src.math.nextupf
     libc.src.math.nextupl
diff --git a/libc/docs/math/index.rst b/libc/docs/math/index.rst
index dbcffc1432e8b7..d337d060fb5dd9 100644
--- a/libc/docs/math/index.rst
+++ b/libc/docs/math/index.rst
@@ -275,13 +275,13 @@ Basic Operations
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
 | nextafterf128| |check| | |check| |         | |check| |         |         |         |         |         |         |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
-| nextdown     | |check| |         |         |         |         |         |         |         |         |         |         |         |
+| nextdown     | |check| | |check| | |check| | |check| |         |         |         |         |         |         |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
-| nextdownf    | |check| |         |         |         |         |         |         |         |         |         |         |         |
+| nextdownf    | |check| | |check| | |check| | |check| |         |         |         |         |         |         |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
-| nextdownl    | |check| |         |         |         |         |         |         |         |         |         |         |         |
+| nextdownl    | |check| | |check| | |check| | |check| |         |         |         |         |         |         |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
-| nextdownf128 | |check| |         |         |         |         |         |         |         |         |         |         |         |
+| nextdownf128 | |check| | |check| |         | |check| |         |         |         |         |         |         |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
 | nexttoward   | |check| | |check| | |check| | |check| | |check| |         |         | |check| | |check| | |check| |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
@@ -289,13 +289,13 @@ Basic Operations
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
 | nexttowardl  | |check| | |check| | |check| | |check| | |check| |         |         | |check| | |check| | |check| |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
-| nextup       | |check| |         |         |         |         |         |         |         |         |         |         |         |
+| nextup       | |check| | |check| | |check| | |check| |         |         |         |         |         |         |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
-| nextupf      | |check| |         |         |         |         |         |         |         |         |         |         |         |
+| nextupf      | |check| | |check| | |check| | |check| |         |         |         |         |         |         |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
-| nextupl      | |check| |         |         |         |         |         |         |         |         |         |         |         |
+| nextupl      | |check| | |check| | |check| | |check| |         |         |         |         |         |         |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
-| nextupf128   | |check| |         |         |         |         |         |         |         |         |         |         |         |
+| nextupf128   | |check| | |check| |         | |check| |         |         |         |         |         |         |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
 | remainder    | |check| | |check| | |check| | |check| | |check| |         |         | |check| | |check| | |check| |         |         |
 +--------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+



More information about the libc-commits mailing list