[libc-commits] [libc] [llvm] [libc] Make daddf128 use emulated Float128 type (PR #236437)

Sachin 🗲 via libc-commits libc-commits at lists.llvm.org
Tue Nov 10 10:51:30 PST 2026


https://github.com/s4chinjha updated https://github.com/llvm/llvm-project/pull/236437

>From 1030e096181e5cb454ff77fa1714bb0d577559be Mon Sep 17 00:00:00 2001
From: s4chinjha <s4chinjha at gmail.com>
Date: Wed, 28 Oct 2026 19:46:06 +0530
Subject: [PATCH 1/7] [libc] add emulated f128 support for daddf128

---
 libc/config/baremetal/aarch64/entrypoints.txt |   3 +-
 libc/config/baremetal/arm/entrypoints.txt     |   3 +-
 libc/config/baremetal/hexagon/entrypoints.txt |   2 +-
 libc/config/baremetal/riscv/entrypoints.txt   |   3 +-
 libc/config/darwin/aarch64/entrypoints.txt    |   3 +-
 libc/config/darwin/x86_64/entrypoints.txt     |   1 +
 libc/config/freebsd/x86_64/entrypoints.txt    |   3 +-
 libc/config/gpu/amdgpu/entrypoints.txt        |   1 +
 libc/config/gpu/nvptx/entrypoints.txt         |   1 +
 libc/config/linux/aarch64/entrypoints.txt     |   6 +-
 libc/config/linux/arm/entrypoints.txt         |   1 +
 libc/config/linux/riscv/entrypoints.txt       |   5 +-
 libc/config/linux/x86_64/entrypoints.txt      |   5 +-
 libc/config/windows/entrypoints.txt           |   2 +-
 libc/shared/math/daddf128.h                   |   6 -
 libc/src/__support/math/CMakeLists.txt        |   2 +-
 libc/src/__support/math/daddf128.h            |  11 +-
 libc/src/math/daddf128.h                      |   5 +
 libc/src/math/generic/CMakeLists.txt          |   1 +
 libc/src/math/generic/daddf128.cpp            |   5 +-
 libc/test/shared/CMakeLists.txt               |   1 +
 .../shared/shared_math_constexpr_test.cpp     |   2 +
 libc/test/shared/shared_math_test.cpp         |   4 +-
 libc/test/src/math/CMakeLists.txt             |  13 ++
 libc/test/src/math/daddf128_test.cpp          | 111 ++++++++++++++++++
 libc/test/src/math/smoke/CMakeLists.txt       |   1 +
 libc/test/src/math/smoke/daddf128_test.cpp    |   6 +-
 libc/utils/MPFRWrapper/MPFRUtils.cpp          |   5 +
 .../llvm-project-overlay/libc/BUILD.bazel     |   4 +-
 .../libc/test/src/math/BUILD.bazel            |   7 ++
 .../libc/test/src/math/smoke/BUILD.bazel      |   3 +
 31 files changed, 195 insertions(+), 31 deletions(-)
 create mode 100644 libc/test/src/math/daddf128_test.cpp

diff --git a/libc/config/baremetal/aarch64/entrypoints.txt b/libc/config/baremetal/aarch64/entrypoints.txt
index 657eb27898f35e..04650263964a0e 100644
--- a/libc/config/baremetal/aarch64/entrypoints.txt
+++ b/libc/config/baremetal/aarch64/entrypoints.txt
@@ -390,6 +390,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
+    libc.src.math.daddf128
     libc.src.math.dfmal
     libc.src.math.dmull
     libc.src.math.dsqrtl
@@ -803,7 +804,7 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef80
-    libc.src.math.daddf128
+    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index 4bc97e048cf988..97a4475f5ce21c 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -402,6 +402,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
+    libc.src.math.daddf128
     libc.src.math.dfmal
     libc.src.math.dmull
     libc.src.math.dsqrtl
@@ -814,7 +815,7 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef80
-    libc.src.math.daddf128
+    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/baremetal/hexagon/entrypoints.txt b/libc/config/baremetal/hexagon/entrypoints.txt
index 49c1c05aaabb63..c821d744000948 100644
--- a/libc/config/baremetal/hexagon/entrypoints.txt
+++ b/libc/config/baremetal/hexagon/entrypoints.txt
@@ -388,6 +388,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
+    libc.src.math.daddf128
     libc.src.math.dfmal
     libc.src.math.dmull
     libc.src.math.dsqrtl
@@ -758,7 +759,6 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.canonicalizef80
     libc.src.math.ceilf128
     libc.src.math.copysignf128
-    libc.src.math.daddf128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index 18d87784c7433a..9838a55d1d640c 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -393,6 +393,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
+    libc.src.math.daddf128
     libc.src.math.dfmal
     libc.src.math.dmull
     libc.src.math.dsqrtl
@@ -806,7 +807,7 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef80
-    libc.src.math.daddf128
+    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/darwin/aarch64/entrypoints.txt b/libc/config/darwin/aarch64/entrypoints.txt
index f2554d62f4ae1c..29cbaddcb58cb5 100644
--- a/libc/config/darwin/aarch64/entrypoints.txt
+++ b/libc/config/darwin/aarch64/entrypoints.txt
@@ -211,6 +211,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
+    libc.src.math.daddf128
     libc.src.math.dfmal
     libc.src.math.dmull
     libc.src.math.dsqrtl
@@ -625,7 +626,7 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef80
-    libc.src.math.daddf128
+    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/darwin/x86_64/entrypoints.txt b/libc/config/darwin/x86_64/entrypoints.txt
index 4f207c4ec6fa75..d42cb3bb5bc623 100644
--- a/libc/config/darwin/x86_64/entrypoints.txt
+++ b/libc/config/darwin/x86_64/entrypoints.txt
@@ -131,6 +131,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     #libc.src.math.ceill
     #libc.src.math.coshf
     #libc.src.math.cosf
+    #libc.src.math.daddf128
     #libc.src.math.daddl
     #libc.src.math.ddivl
     #libc.src.math.dfmal
diff --git a/libc/config/freebsd/x86_64/entrypoints.txt b/libc/config/freebsd/x86_64/entrypoints.txt
index 0e6cf253a77a97..0209559115626b 100644
--- a/libc/config/freebsd/x86_64/entrypoints.txt
+++ b/libc/config/freebsd/x86_64/entrypoints.txt
@@ -144,6 +144,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosf
     libc.src.math.cosh
     libc.src.math.coshf
+    libc.src.math.daddf128
     libc.src.math.daddl
     libc.src.math.ddivl
     libc.src.math.dfmal
@@ -558,7 +559,7 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     libc.src.math.atan2l
     libc.src.math.canonicalizef80
-    libc.src.math.daddf128
+    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/gpu/amdgpu/entrypoints.txt b/libc/config/gpu/amdgpu/entrypoints.txt
index 5bb787743a58c5..13792b307c5e75 100644
--- a/libc/config/gpu/amdgpu/entrypoints.txt
+++ b/libc/config/gpu/amdgpu/entrypoints.txt
@@ -337,6 +337,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
+    libc.src.math.daddf128
     libc.src.math.ddivl
     libc.src.math.dfmal
     libc.src.math.dmull
diff --git a/libc/config/gpu/nvptx/entrypoints.txt b/libc/config/gpu/nvptx/entrypoints.txt
index feffcb0590c735..493eb07c8f526e 100644
--- a/libc/config/gpu/nvptx/entrypoints.txt
+++ b/libc/config/gpu/nvptx/entrypoints.txt
@@ -333,6 +333,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
+    libc.src.math.daddf128
     libc.src.math.ddivl
     libc.src.math.dfmal
     libc.src.math.dmull
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 42408a6a4113ea..3c4bcc5457f1fd 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -466,7 +466,7 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.unistd.chown
     libc.src.unistd.chroot
     libc.src.unistd.close
-    libc.src.unistd.close_range
+    libc.src.unistd.close_range
     libc.src.unistd.copy_file_range
     libc.src.unistd.dup
     libc.src.unistd.dup2
@@ -648,6 +648,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
+    libc.src.math.daddf128
     libc.src.math.daddl
     libc.src.math.ddivl
     libc.src.math.dfmal
@@ -1051,7 +1052,8 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef80
-    libc.src.math.daddf128
+
+    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index 44c62c2e6b29cb..4a59823bfd593b 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -434,6 +434,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosf
     libc.src.math.cosh
     libc.src.math.coshf
+    libc.src.math.daddf128
     libc.src.math.dfmal
     libc.src.math.dsqrtl
     libc.src.math.erff
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 220d0f8ae397e4..528b277d2b96d3 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -492,7 +492,7 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.unistd.chown
     libc.src.unistd.chroot
     libc.src.unistd.close
-    libc.src.unistd.close_range
+    libc.src.unistd.close_range
     libc.src.unistd.copy_file_range
     libc.src.unistd.dup
     libc.src.unistd.dup2
@@ -707,6 +707,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
+    libc.src.math.daddf128
     libc.src.math.daddl
     libc.src.math.ddivl
     libc.src.math.dfmal
@@ -1131,7 +1132,7 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     # math.h C23 _Float128 entrypoints
     libc.src.math.atan2l
     libc.src.math.canonicalizef80
-    libc.src.math.daddf128
+    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 9a7d37ac0920e6..6e9de32fe864af 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -512,7 +512,7 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.unistd.chown
     libc.src.unistd.chroot
     libc.src.unistd.close
-    libc.src.unistd.close_range
+    libc.src.unistd.close_range
     libc.src.unistd.copy_file_range
     libc.src.unistd.dup
     libc.src.unistd.dup2
@@ -729,6 +729,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
+    libc.src.math.daddf128
     libc.src.math.daddl
     libc.src.math.ddivl
     libc.src.math.dfmal
@@ -1153,7 +1154,7 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     # math.h C23 _Float128 entrypoints
     libc.src.math.atan2l
     libc.src.math.canonicalizef80
-    libc.src.math.daddf128
+    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/windows/entrypoints.txt b/libc/config/windows/entrypoints.txt
index a311fa50a71b7a..6cb1e28e72280d 100644
--- a/libc/config/windows/entrypoints.txt
+++ b/libc/config/windows/entrypoints.txt
@@ -176,6 +176,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosf
     libc.src.math.cosh
     libc.src.math.coshf
+    libc.src.math.daddf128
     libc.src.math.daddl
     libc.src.math.ddivl
     libc.src.math.dfmal
@@ -479,4 +480,3 @@ set(TARGET_LLVMLIBC_ENTRYPOINTS
   ${TARGET_LIBC_ENTRYPOINTS}
   ${TARGET_LIBM_ENTRYPOINTS}
 )
-
diff --git a/libc/shared/math/daddf128.h b/libc/shared/math/daddf128.h
index 5a1adbf1be637e..f9e81cf70baa38 100644
--- a/libc/shared/math/daddf128.h
+++ b/libc/shared/math/daddf128.h
@@ -9,10 +9,6 @@
 #ifndef LLVM_LIBC_SHARED_MATH_DADDF128_H
 #define LLVM_LIBC_SHARED_MATH_DADDF128_H
 
-#include "include/llvm-libc-types/float128.h"
-
-#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
-
 #include "shared/libc_common.h"
 #include "src/__support/math/daddf128.h"
 
@@ -24,6 +20,4 @@ using math::daddf128;
 } // namespace shared
 } // namespace LIBC_NAMESPACE_DECL
 
-#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-
 #endif // LLVM_LIBC_SHARED_MATH_DADDF128_H
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index 310dce48e2c84d..c78bab1e45b8aa 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -3137,7 +3137,7 @@ add_header_library(
   HDRS
     daddf128.h
   DEPENDS
-    libc.include.llvm-libc-types.float128
+    libc.src.__support.FPUtil.float128
     libc.src.__support.FPUtil.generic.add_sub
     libc.src.__support.macros.config
 )
diff --git a/libc/src/__support/math/daddf128.h b/libc/src/__support/math/daddf128.h
index 4877455c059c34..f58c07ccbb569a 100644
--- a/libc/src/__support/math/daddf128.h
+++ b/libc/src/__support/math/daddf128.h
@@ -9,23 +9,20 @@
 #ifndef LLVM_LIBC_SRC___SUPPORT_MATH_DADDF128_H
 #define LLVM_LIBC_SRC___SUPPORT_MATH_DADDF128_H
 
-#include "include/llvm-libc-types/float128.h"
-
-#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
-
+#include "src/__support/FPUtil/float128.h"
 #include "src/__support/FPUtil/generic/add_sub.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 namespace math {
 
-LIBC_INLINE double daddf128(float128 x, float128 y) {
+using LIBC_NAMESPACE::fputil::Float128;
+
+LIBC_INLINE constexpr double daddf128(Float128 x, Float128 y) {
   return fputil::generic::add<double>(x, y);
 }
 
 } // namespace math
 } // namespace LIBC_NAMESPACE_DECL
 
-#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-
 #endif // LLVM_LIBC_SRC___SUPPORT_MATH_DADDF128_H
diff --git a/libc/src/math/daddf128.h b/libc/src/math/daddf128.h
index cf6c1999d9d030..dff2999eb47fa2 100644
--- a/libc/src/math/daddf128.h
+++ b/libc/src/math/daddf128.h
@@ -9,11 +9,16 @@
 #ifndef LLVM_LIBC_SRC_MATH_DADDF128_H
 #define LLVM_LIBC_SRC_MATH_DADDF128_H
 
+#include "src/__support/FPUtil/float128.h"
 #include "src/__support/macros/config.h"
 #include "src/__support/macros/properties/types.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
+#ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
+using float128 = LIBC_NAMESPACE::fputil::Float128;
+#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
+
 double daddf128(float128 x, float128 y);
 
 } // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index aaadf47c771c1b..0b3881dd00fa2f 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -214,6 +214,7 @@ add_entrypoint_object(
   HDRS
     ../daddf128.h
   DEPENDS
+    libc.src.__support.CPP.bit
     libc.src.__support.math.daddf128
 )
 
diff --git a/libc/src/math/generic/daddf128.cpp b/libc/src/math/generic/daddf128.cpp
index 10b3ec6c30c6c7..cc0727f70f49f8 100644
--- a/libc/src/math/generic/daddf128.cpp
+++ b/libc/src/math/generic/daddf128.cpp
@@ -7,12 +7,15 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/math/daddf128.h"
+#include "src/__support/CPP/bit.h"
 #include "src/__support/math/daddf128.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
+using LIBC_NAMESPACE::fputil::Float128;
+
 LLVM_LIBC_FUNCTION(double, daddf128, (float128 x, float128 y)) {
-  return math::daddf128(x, y);
+  return math::daddf128(cpp::bit_cast<Float128>(x), cpp::bit_cast<Float128>(y));
 }
 
 } // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index 21c067255ab007..9f6905e349a393 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -587,6 +587,7 @@ else()
       libc.src.__support.math.copysignf80
       libc.src.__support.math.copysignf16
       libc.src.__support.math.copysignl
+      libc.src.__support.math.daddf128
       libc.src.__support.math.ddivf128
       libc.src.__support.math.ddivl
       libc.src.__support.math.dmulf128
diff --git a/libc/test/shared/shared_math_constexpr_test.cpp b/libc/test/shared/shared_math_constexpr_test.cpp
index 3b162ca663e7d4..57776b640b1c35 100644
--- a/libc/test/shared/shared_math_constexpr_test.cpp
+++ b/libc/test/shared/shared_math_constexpr_test.cpp
@@ -416,6 +416,8 @@ static_assert(Float128(0.0) == LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
 static_assert(Float128(0.0) ==
               LIBC_NAMESPACE::shared::copysignf128(Float128(0.0),
                                                    Float128(0.0)));
+static_assert(0.0 ==
+              LIBC_NAMESPACE::shared::daddf128(Float128(0.0), Float128(0.0)));
 static_assert(Float128(1.0) ==
               LIBC_NAMESPACE::shared::fabsf128(Float128(-1.0)));
 static_assert(Float80(0.0) ==
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index 97e975a238922d..8ea917d938efa3 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -606,6 +606,8 @@ TEST(LlvmLibcSharedMathTest, AllEmuFloat128) {
   EXPECT_FP_EQ(Float128(0.0), LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
   EXPECT_FP_EQ(Float128(0.0), LIBC_NAMESPACE::shared::copysignf128(
                                   Float128(0.0), Float128(0.0)));
+  EXPECT_FP_EQ(0.0,
+               LIBC_NAMESPACE::shared::daddf128(Float128(0.0), Float128(0.0)));
   EXPECT_FP_EQ(Float128(0.0), LIBC_NAMESPACE::shared::fabsf128(Float128(0.0)));
   EXPECT_FP_EQ(Float128(0.0),
                LIBC_NAMESPACE::shared::fdimf128(Float128(0.0), Float128(0.0)));
@@ -760,7 +762,7 @@ TEST(LlvmLibcSharedMathTest, AllFloat128) {
                                   float128(0.0), float128(0.0)));
   EXPECT_FP_EQ(bfloat16(2.0), LIBC_NAMESPACE::shared::bf16divf128(
                                   float128(4.0), float128(2.0)));
-  EXPECT_FP_EQ(float128(0.0),
+  EXPECT_FP_EQ(0.0,
                LIBC_NAMESPACE::shared::daddf128(float128(0.0), float128(0.0)));
   EXPECT_FP_EQ(1.0,
                LIBC_NAMESPACE::shared::ddivf128(float128(1.0), float128(1.0)));
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index c5249acb0c9d2f..9d132dabf68992 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -70,6 +70,19 @@ add_fp_unittest(
     libc.src.math.cospif16
 )
 
+add_fp_unittest(
+  daddf128_test
+  NEED_MPFR_F128
+  SUITE
+    libc-math-unittests
+  SRCS
+    daddf128_test.cpp
+  DEPENDS
+    libc.src.math.daddf128
+    libc.src.__support.FPUtil.float128
+    libc.src.__support.FPUtil.fp_bits
+)
+
 add_fp_unittest(
   daddl_test
   NEED_MPFR
diff --git a/libc/test/src/math/daddf128_test.cpp b/libc/test/src/math/daddf128_test.cpp
new file mode 100644
index 00000000000000..5f2e5fcc059229
--- /dev/null
+++ b/libc/test/src/math/daddf128_test.cpp
@@ -0,0 +1,111 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// MPFR tests for the daddf128 function.
+///
+//===----------------------------------------------------------------------===//
+
+#include "src/__support/FPUtil/float128.h"
+#include "src/math/daddf128.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "test/UnitTest/Test.h"
+#include "utils/MPFRWrapper/MPFRUtils.h"
+
+#ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
+using float128 = LIBC_NAMESPACE::fputil::Float128;
+#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
+
+using LlvmLibcDaddf128MPFRTest = LIBC_NAMESPACE::testing::FPTest<float128>;
+using LIBC_NAMESPACE::testing::tlog;
+
+namespace mpfr = LIBC_NAMESPACE::testing::mpfr;
+
+TEST_F(LlvmLibcDaddf128MPFRTest, InQuadRange) {
+  constexpr StorageType X_COUNT = 123;
+  constexpr StorageType X_START = FPBits(static_cast<float128>(0.25)).uintval();
+  constexpr StorageType X_STOP = FPBits(static_cast<float128>(4.0)).uintval();
+  constexpr StorageType X_STEP = (X_STOP - X_START) / X_COUNT;
+
+  constexpr StorageType Y_COUNT = 137;
+  constexpr StorageType Y_START = FPBits(static_cast<float128>(0.25)).uintval();
+  constexpr StorageType Y_STOP = FPBits(static_cast<float128>(4.0)).uintval();
+  constexpr StorageType Y_STEP = (Y_STOP - Y_START) / Y_COUNT;
+
+  auto test = [&](mpfr::RoundingMode rounding_mode) {
+    mpfr::ForceRoundingMode __r(rounding_mode);
+    if (!__r.success)
+      return;
+
+    uint64_t fails = 0;
+    uint64_t finite_count = 0;
+    uint64_t total_count = 0;
+    float128 failed_x = 0.0, failed_y = 0.0;
+    double failed_r = 0.0;
+    double tol = 0.5;
+
+    for (StorageType i = 0, v = X_START; i <= X_COUNT; ++i, v += X_STEP) {
+      float128 x = FPBits(v).get_val();
+      if (FPBits(x).is_inf_or_nan() || x < float128(0.0))
+        continue;
+
+      for (StorageType j = 0, w = Y_START; j <= Y_COUNT; ++j, w += Y_STEP) {
+        float128 y = FPBits(w).get_val();
+        if (FPBits(y).is_inf_or_nan() || y < float128(0.0))
+          continue;
+
+        double result = LIBC_NAMESPACE::daddf128(x, y);
+        ++total_count;
+        if (LIBC_NAMESPACE::fputil::FPBits<double>(result).is_inf_or_nan())
+          continue;
+
+        ++finite_count;
+        mpfr::BinaryInput<float128> inputs{x, y};
+
+        // daddf128 is correctly rounded to double, so require 0.5 ULP.
+        if (!TEST_MPFR_MATCH_ROUNDING_SILENTLY(mpfr::Operation::Add, inputs,
+                                               result, 0.5, rounding_mode)) {
+          ++fails;
+          while (!TEST_MPFR_MATCH_ROUNDING_SILENTLY(
+              mpfr::Operation::Add, inputs, result, tol, rounding_mode)) {
+            failed_x = x;
+            failed_y = y;
+            failed_r = result;
+
+            if (tol > 1000.0)
+              break;
+
+            tol *= 2.0;
+          }
+        }
+      }
+    }
+    if (fails || (finite_count < total_count)) {
+      tlog << " daddf128 failed: " << fails << "/" << finite_count << "/"
+           << total_count << " tests.\n"
+           << "   Max ULPs is at most: " << static_cast<uint64_t>(tol) << ".\n";
+    }
+    if (fails) {
+      mpfr::BinaryInput<float128> inputs{failed_x, failed_y};
+      EXPECT_MPFR_MATCH(mpfr::Operation::Add, inputs, failed_r, 0.5,
+                        rounding_mode);
+    }
+  };
+
+  tlog << " Test Rounding To Nearest...\n";
+  test(mpfr::RoundingMode::Nearest);
+
+  tlog << " Test Rounding Downward...\n";
+  test(mpfr::RoundingMode::Downward);
+
+  tlog << " Test Rounding Upward...\n";
+  test(mpfr::RoundingMode::Upward);
+
+  tlog << " Test Rounding Toward Zero...\n";
+  test(mpfr::RoundingMode::TowardZero);
+}
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index d3e0b3c0803add..bc0d6c99b8744f 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -6773,6 +6773,7 @@ add_fp_unittest(
     libc.hdr.errno_macros
     libc.hdr.fenv_macros
     libc.src.math.daddf128
+    libc.src.__support.FPUtil.float128
     libc.src.__support.macros.properties.os
 )
 
diff --git a/libc/test/src/math/smoke/daddf128_test.cpp b/libc/test/src/math/smoke/daddf128_test.cpp
index 6595f0e4f068a9..90f7319418be15 100644
--- a/libc/test/src/math/smoke/daddf128_test.cpp
+++ b/libc/test/src/math/smoke/daddf128_test.cpp
@@ -7,7 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "AddTest.h"
-
+#include "src/__support/FPUtil/float128.h"
 #include "src/math/daddf128.h"
 
+#ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
+using float128 = LIBC_NAMESPACE::fputil::Float128;
+#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
+
 LIST_ADD_TESTS(Daddf128, double, float128, LIBC_NAMESPACE::daddf128)
diff --git a/libc/utils/MPFRWrapper/MPFRUtils.cpp b/libc/utils/MPFRWrapper/MPFRUtils.cpp
index fea8c5512977dc..11bb44abca988b 100644
--- a/libc/utils/MPFRWrapper/MPFRUtils.cpp
+++ b/libc/utils/MPFRWrapper/MPFRUtils.cpp
@@ -449,6 +449,8 @@ template void explain_binary_operation_one_output_error(
     defined(LIBC_TYPES_FLOAT128_IS_NOT_LONG_DOUBLE)
 template void explain_binary_operation_one_output_error(
     Operation, const BinaryInput<float128> &, float128, double, RoundingMode);
+template void explain_binary_operation_one_output_error(
+    Operation, const BinaryInput<float128> &, double, double, RoundingMode);
 #endif
 template void explain_binary_operation_one_output_error(
     Operation, const BinaryInput<bfloat16> &, bfloat16, double, RoundingMode);
@@ -742,6 +744,9 @@ template bool compare_binary_operation_one_output(Operation,
                                                   const BinaryInput<float128> &,
                                                   float128, double,
                                                   RoundingMode);
+template bool compare_binary_operation_one_output(Operation,
+                                                  const BinaryInput<float128> &,
+                                                  double, double, RoundingMode);
 #endif
 template bool compare_binary_operation_one_output(Operation,
                                                   const BinaryInput<bfloat16> &,
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 9030f6dbac706a..25e551b315f682 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -9592,7 +9592,7 @@ libc_support_library(
     deps = [
         ":__support_fputil_basic_operations",
         ":__support_macros_config",
-        ":llvm_libc_types_float128",
+        ":__support_fputil_float128",
     ],
 )
 
@@ -14165,6 +14165,8 @@ libc_math_function(
 libc_math_function(
     name = "daddf128",
     additional_deps = [
+        ":__support_cpp_bit",
+        ":__support_fputil_float128",
         ":__support_math_daddf128",
     ],
 )
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
index 39dbc787342801..715b1564fb7f50 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
@@ -212,6 +212,13 @@ math_mpfr_test(
     ],
 )
 
+math_mpfr_test(
+    name = "daddf128",
+    deps = [
+        "//libc:__support_fputil_float128",
+    ],
+)
+
 math_mpfr_test(
     name = "daddl",
     hdrs = ["AddTest.h"],
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
index 311dc8856357ff..2add50bddd902e 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
@@ -357,6 +357,9 @@ math_test(
 math_test(
     name = "daddf128",
     hdrs = ["AddTest.h"],
+    deps = [
+        "//libc:__support_fputil_float128",
+    ],
 )
 
 math_test(

>From 0adf72f6a6f270794565e832a2a44bb05941cad4 Mon Sep 17 00:00:00 2001
From: s4chinjha <s4chinjha at gmail.com>
Date: Wed, 28 Oct 2026 22:07:21 +0530
Subject: [PATCH 2/7] fix ci errors

---
 libc/test/src/math/CMakeLists.txt                 | 2 +-
 utils/bazel/llvm-project-overlay/libc/BUILD.bazel | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index 9d132dabf68992..0bfc512ef316f6 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -74,7 +74,7 @@ add_fp_unittest(
   daddf128_test
   NEED_MPFR_F128
   SUITE
-    libc-math-unittests
+    libc-math-tests
   SRCS
     daddf128_test.cpp
   DEPENDS
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 25e551b315f682..e2dbcd0699f1f1 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -9591,8 +9591,8 @@ libc_support_library(
     hdrs = ["src/__support/math/daddf128.h"],
     deps = [
         ":__support_fputil_basic_operations",
-        ":__support_macros_config",
         ":__support_fputil_float128",
+        ":__support_macros_config",
     ],
 )
 

>From ebd901c237f4c91a0538a3bfccd5c8b30ca3c96c Mon Sep 17 00:00:00 2001
From: s4chinjha <s4chinjha at gmail.com>
Date: Fri, 6 Nov 2026 23:14:19 +0530
Subject: [PATCH 3/7] change AddTest.h path relative to libc

---
 libc/test/src/math/smoke/daddf128_test.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/test/src/math/smoke/daddf128_test.cpp b/libc/test/src/math/smoke/daddf128_test.cpp
index 90f7319418be15..ce770eefbeb772 100644
--- a/libc/test/src/math/smoke/daddf128_test.cpp
+++ b/libc/test/src/math/smoke/daddf128_test.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "AddTest.h"
+#include "test/src/math/smoke/AddTest.h"
 #include "src/__support/FPUtil/float128.h"
 #include "src/math/daddf128.h"
 

>From b54df7daa67261347af41d521d6966787cd2edaa Mon Sep 17 00:00:00 2001
From: s4chinjha <s4chinjha at gmail.com>
Date: Sun, 8 Nov 2026 12:00:21 +0530
Subject: [PATCH 4/7] fix clang-format: reorder includes in smoke test

---
 libc/test/src/math/smoke/daddf128_test.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/test/src/math/smoke/daddf128_test.cpp b/libc/test/src/math/smoke/daddf128_test.cpp
index ce770eefbeb772..53bded3632d171 100644
--- a/libc/test/src/math/smoke/daddf128_test.cpp
+++ b/libc/test/src/math/smoke/daddf128_test.cpp
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "test/src/math/smoke/AddTest.h"
 #include "src/__support/FPUtil/float128.h"
 #include "src/math/daddf128.h"
+#include "test/src/math/smoke/AddTest.h"
 
 #ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
 using float128 = LIBC_NAMESPACE::fputil::Float128;

>From abc23f586c435b8798c5da0ca216fe1bf7a1a66e Mon Sep 17 00:00:00 2001
From: s4chinjha <s4chinjha at gmail.com>
Date: Sun, 8 Nov 2026 13:09:10 +0530
Subject: [PATCH 5/7] fix :remove daddf128 from native section.

---
 libc/test/shared/shared_math_test.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index 8ea917d938efa3..f88d37bb9f6d35 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -762,8 +762,6 @@ TEST(LlvmLibcSharedMathTest, AllFloat128) {
                                   float128(0.0), float128(0.0)));
   EXPECT_FP_EQ(bfloat16(2.0), LIBC_NAMESPACE::shared::bf16divf128(
                                   float128(4.0), float128(2.0)));
-  EXPECT_FP_EQ(0.0,
-               LIBC_NAMESPACE::shared::daddf128(float128(0.0), float128(0.0)));
   EXPECT_FP_EQ(1.0,
                LIBC_NAMESPACE::shared::ddivf128(float128(1.0), float128(1.0)));
   EXPECT_FP_EQ(0.0,

>From 3e6812d045fcc5ea78f876462b01ad524f97a43d Mon Sep 17 00:00:00 2001
From: s4chinjha <s4chinjha at gmail.com>
Date: Mon, 9 Nov 2026 14:39:56 +0530
Subject: [PATCH 6/7] fix: address review comments

---
 libc/test/src/math/CMakeLists.txt          |   2 +
 libc/test/src/math/daddf128_test.cpp       | 100 +--------------------
 libc/test/src/math/smoke/daddf128_test.cpp |  10 ++-
 3 files changed, 14 insertions(+), 98 deletions(-)

diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index 0bfc512ef316f6..ba1259488384d4 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -77,6 +77,8 @@ add_fp_unittest(
     libc-math-tests
   SRCS
     daddf128_test.cpp
+  HDRS
+    AddTest.h
   DEPENDS
     libc.src.math.daddf128
     libc.src.__support.FPUtil.float128
diff --git a/libc/test/src/math/daddf128_test.cpp b/libc/test/src/math/daddf128_test.cpp
index 5f2e5fcc059229..d71cc6b908e777 100644
--- a/libc/test/src/math/daddf128_test.cpp
+++ b/libc/test/src/math/daddf128_test.cpp
@@ -7,105 +7,13 @@
 //===----------------------------------------------------------------------===//
 ///
 /// \file
-/// MPFR tests for the daddf128 function.
+/// Unittests for daddf128.
 ///
 //===----------------------------------------------------------------------===//
 
+#include "AddTest.h"
+
 #include "src/__support/FPUtil/float128.h"
 #include "src/math/daddf128.h"
-#include "test/UnitTest/FPMatcher.h"
-#include "test/UnitTest/Test.h"
-#include "utils/MPFRWrapper/MPFRUtils.h"
-
-#ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
-using float128 = LIBC_NAMESPACE::fputil::Float128;
-#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-
-using LlvmLibcDaddf128MPFRTest = LIBC_NAMESPACE::testing::FPTest<float128>;
-using LIBC_NAMESPACE::testing::tlog;
-
-namespace mpfr = LIBC_NAMESPACE::testing::mpfr;
-
-TEST_F(LlvmLibcDaddf128MPFRTest, InQuadRange) {
-  constexpr StorageType X_COUNT = 123;
-  constexpr StorageType X_START = FPBits(static_cast<float128>(0.25)).uintval();
-  constexpr StorageType X_STOP = FPBits(static_cast<float128>(4.0)).uintval();
-  constexpr StorageType X_STEP = (X_STOP - X_START) / X_COUNT;
-
-  constexpr StorageType Y_COUNT = 137;
-  constexpr StorageType Y_START = FPBits(static_cast<float128>(0.25)).uintval();
-  constexpr StorageType Y_STOP = FPBits(static_cast<float128>(4.0)).uintval();
-  constexpr StorageType Y_STEP = (Y_STOP - Y_START) / Y_COUNT;
-
-  auto test = [&](mpfr::RoundingMode rounding_mode) {
-    mpfr::ForceRoundingMode __r(rounding_mode);
-    if (!__r.success)
-      return;
-
-    uint64_t fails = 0;
-    uint64_t finite_count = 0;
-    uint64_t total_count = 0;
-    float128 failed_x = 0.0, failed_y = 0.0;
-    double failed_r = 0.0;
-    double tol = 0.5;
-
-    for (StorageType i = 0, v = X_START; i <= X_COUNT; ++i, v += X_STEP) {
-      float128 x = FPBits(v).get_val();
-      if (FPBits(x).is_inf_or_nan() || x < float128(0.0))
-        continue;
-
-      for (StorageType j = 0, w = Y_START; j <= Y_COUNT; ++j, w += Y_STEP) {
-        float128 y = FPBits(w).get_val();
-        if (FPBits(y).is_inf_or_nan() || y < float128(0.0))
-          continue;
-
-        double result = LIBC_NAMESPACE::daddf128(x, y);
-        ++total_count;
-        if (LIBC_NAMESPACE::fputil::FPBits<double>(result).is_inf_or_nan())
-          continue;
-
-        ++finite_count;
-        mpfr::BinaryInput<float128> inputs{x, y};
-
-        // daddf128 is correctly rounded to double, so require 0.5 ULP.
-        if (!TEST_MPFR_MATCH_ROUNDING_SILENTLY(mpfr::Operation::Add, inputs,
-                                               result, 0.5, rounding_mode)) {
-          ++fails;
-          while (!TEST_MPFR_MATCH_ROUNDING_SILENTLY(
-              mpfr::Operation::Add, inputs, result, tol, rounding_mode)) {
-            failed_x = x;
-            failed_y = y;
-            failed_r = result;
-
-            if (tol > 1000.0)
-              break;
-
-            tol *= 2.0;
-          }
-        }
-      }
-    }
-    if (fails || (finite_count < total_count)) {
-      tlog << " daddf128 failed: " << fails << "/" << finite_count << "/"
-           << total_count << " tests.\n"
-           << "   Max ULPs is at most: " << static_cast<uint64_t>(tol) << ".\n";
-    }
-    if (fails) {
-      mpfr::BinaryInput<float128> inputs{failed_x, failed_y};
-      EXPECT_MPFR_MATCH(mpfr::Operation::Add, inputs, failed_r, 0.5,
-                        rounding_mode);
-    }
-  };
-
-  tlog << " Test Rounding To Nearest...\n";
-  test(mpfr::RoundingMode::Nearest);
-
-  tlog << " Test Rounding Downward...\n";
-  test(mpfr::RoundingMode::Downward);
-
-  tlog << " Test Rounding Upward...\n";
-  test(mpfr::RoundingMode::Upward);
 
-  tlog << " Test Rounding Toward Zero...\n";
-  test(mpfr::RoundingMode::TowardZero);
-}
+LIST_ADD_TESTS(Daddf128, double, float128, LIBC_NAMESPACE::daddf128)
diff --git a/libc/test/src/math/smoke/daddf128_test.cpp b/libc/test/src/math/smoke/daddf128_test.cpp
index 53bded3632d171..eaff8bd8f0ce46 100644
--- a/libc/test/src/math/smoke/daddf128_test.cpp
+++ b/libc/test/src/math/smoke/daddf128_test.cpp
@@ -1,14 +1,20 @@
-//===-- Unittests for daddf128 --------------------------------------------===//
+//===----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
+///
+/// \file
+/// Unittests for daddf128.
+///
+//===----------------------------------------------------------------------===//
+
+#include "AddTest.h"
 
 #include "src/__support/FPUtil/float128.h"
 #include "src/math/daddf128.h"
-#include "test/src/math/smoke/AddTest.h"
 
 #ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
 using float128 = LIBC_NAMESPACE::fputil::Float128;

>From db80b87104f63138abcc80717cc4c2fe25bece66 Mon Sep 17 00:00:00 2001
From: s4chinjha <s4chinjha at gmail.com>
Date: Tue, 10 Nov 2026 17:59:38 +0530
Subject: [PATCH 7/7] fix: remove unwanted changes

---
 libc/config/baremetal/aarch64/entrypoints.txt | 1 -
 libc/config/baremetal/arm/entrypoints.txt     | 1 -
 libc/config/baremetal/riscv/entrypoints.txt   | 1 -
 libc/config/darwin/aarch64/entrypoints.txt    | 1 -
 libc/config/freebsd/x86_64/entrypoints.txt    | 1 -
 libc/config/linux/aarch64/entrypoints.txt     | 2 --
 libc/config/linux/riscv/entrypoints.txt       | 1 -
 libc/config/linux/x86_64/entrypoints.txt      | 1 -
 libc/test/src/math/smoke/daddf128_test.cpp    | 3 +--
 9 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/libc/config/baremetal/aarch64/entrypoints.txt b/libc/config/baremetal/aarch64/entrypoints.txt
index 04650263964a0e..b456410ea19f94 100644
--- a/libc/config/baremetal/aarch64/entrypoints.txt
+++ b/libc/config/baremetal/aarch64/entrypoints.txt
@@ -804,7 +804,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef80
-    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index 97a4475f5ce21c..ad263ad42a3644 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -815,7 +815,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef80
-    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index 9838a55d1d640c..d63a3ffa6415df 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -807,7 +807,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef80
-    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/darwin/aarch64/entrypoints.txt b/libc/config/darwin/aarch64/entrypoints.txt
index 29cbaddcb58cb5..3e19a5c4089b7c 100644
--- a/libc/config/darwin/aarch64/entrypoints.txt
+++ b/libc/config/darwin/aarch64/entrypoints.txt
@@ -626,7 +626,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef80
-    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/freebsd/x86_64/entrypoints.txt b/libc/config/freebsd/x86_64/entrypoints.txt
index 0209559115626b..85a18879b86fb7 100644
--- a/libc/config/freebsd/x86_64/entrypoints.txt
+++ b/libc/config/freebsd/x86_64/entrypoints.txt
@@ -559,7 +559,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     libc.src.math.atan2l
     libc.src.math.canonicalizef80
-    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 3c4bcc5457f1fd..505a441dd0ed3a 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -1052,8 +1052,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef80
-
-    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 528b277d2b96d3..31363bc6e1335f 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -1132,7 +1132,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     # math.h C23 _Float128 entrypoints
     libc.src.math.atan2l
     libc.src.math.canonicalizef80
-    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 6e9de32fe864af..3b987ff8a376de 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -1154,7 +1154,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     # math.h C23 _Float128 entrypoints
     libc.src.math.atan2l
     libc.src.math.canonicalizef80
-    libc.src.math.canonicalizef128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
     libc.src.math.dmulf128
diff --git a/libc/test/src/math/smoke/daddf128_test.cpp b/libc/test/src/math/smoke/daddf128_test.cpp
index eaff8bd8f0ce46..6ff748c46ba2ea 100644
--- a/libc/test/src/math/smoke/daddf128_test.cpp
+++ b/libc/test/src/math/smoke/daddf128_test.cpp
@@ -11,10 +11,9 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "AddTest.h"
-
 #include "src/__support/FPUtil/float128.h"
 #include "src/math/daddf128.h"
+#include "test/src/math/smoke/AddTest.h"
 
 #ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
 using float128 = LIBC_NAMESPACE::fputil::Float128;



More information about the libc-commits mailing list