[libc-commits] [libc] [llvm] [libc][math] Adds total ordering functions for float80 (PR #238685)

via libc-commits libc-commits at lists.llvm.org
Tue Nov 3 22:14:08 PST 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-nvptx

Author: Zorojuro (Sukumarsawant)

<details>
<summary>Changes</summary>



---

Patch is 33.43 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/238685.diff


35 Files Affected:

- (modified) libc/config/baremetal/aarch64/entrypoints.txt (+2) 
- (modified) libc/config/baremetal/arm/entrypoints.txt (+2) 
- (modified) libc/config/baremetal/hexagon/entrypoints.txt (+2) 
- (modified) libc/config/baremetal/riscv/entrypoints.txt (+2) 
- (modified) libc/config/darwin/aarch64/entrypoints.txt (+2) 
- (modified) libc/config/darwin/x86_64/entrypoints.txt (+2) 
- (modified) libc/config/freebsd/x86_64/entrypoints.txt (+2) 
- (modified) libc/config/gpu/amdgpu/entrypoints.txt (+2) 
- (modified) libc/config/gpu/nvptx/entrypoints.txt (+2) 
- (modified) libc/config/linux/aarch64/entrypoints.txt (+2) 
- (modified) libc/config/linux/arm/entrypoints.txt (+2) 
- (modified) libc/config/linux/riscv/entrypoints.txt (+2) 
- (modified) libc/config/linux/x86_64/entrypoints.txt (+2) 
- (modified) libc/config/windows/entrypoints.txt (+2) 
- (modified) libc/docs/headers/math/index.md (+2-2) 
- (modified) libc/shared/math.h (+2) 
- (added) libc/shared/math/totalorderf80.h (+28) 
- (added) libc/shared/math/totalordermagf80.h (+28) 
- (modified) libc/src/__support/math/CMakeLists.txt (+20) 
- (added) libc/src/__support/math/totalorderf80.h (+33) 
- (added) libc/src/__support/math/totalordermagf80.h (+34) 
- (modified) libc/src/math/CMakeLists.txt (+2) 
- (modified) libc/src/math/generic/CMakeLists.txt (+22) 
- (added) libc/src/math/generic/totalorderf80.cpp (+29) 
- (added) libc/src/math/generic/totalordermagf80.cpp (+29) 
- (added) libc/src/math/totalorderf80.h (+27) 
- (added) libc/src/math/totalordermagf80.h (+27) 
- (modified) libc/test/shared/CMakeLists.txt (+4) 
- (modified) libc/test/shared/shared_math_constexpr_test.cpp (+9) 
- (modified) libc/test/shared/shared_math_test.cpp (+8) 
- (modified) libc/test/src/math/smoke/CMakeLists.txt (+26) 
- (added) libc/test/src/math/smoke/totalorderf80_test.cpp (+21) 
- (added) libc/test/src/math/smoke/totalordermagf80_test.cpp (+22) 
- (modified) utils/bazel/llvm-project-overlay/libc/BUILD.bazel (+38) 
- (modified) utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel (+16) 


``````````diff
diff --git a/libc/config/baremetal/aarch64/entrypoints.txt b/libc/config/baremetal/aarch64/entrypoints.txt
index 57478a3ef9a228..11ad7feaaabc86 100644
--- a/libc/config/baremetal/aarch64/entrypoints.txt
+++ b/libc/config/baremetal/aarch64/entrypoints.txt
@@ -635,10 +635,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.totalorder
     libc.src.math.totalorderf
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalorderl
     libc.src.math.totalordermag
     libc.src.math.totalordermagf
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.totalordermagl
     libc.src.math.trunc
     libc.src.math.truncf
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index 104c1b8ef3912d..b083112410fe64 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -647,10 +647,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.totalorder
     libc.src.math.totalorderf
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalorderl
     libc.src.math.totalordermag
     libc.src.math.totalordermagf
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.totalordermagl
     libc.src.math.trunc
     libc.src.math.truncf
diff --git a/libc/config/baremetal/hexagon/entrypoints.txt b/libc/config/baremetal/hexagon/entrypoints.txt
index a7617ec243e278..c4876402a580a8 100644
--- a/libc/config/baremetal/hexagon/entrypoints.txt
+++ b/libc/config/baremetal/hexagon/entrypoints.txt
@@ -815,7 +815,9 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.setpayloadsigf128
     libc.src.math.sqrtf128
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.truncf128
     libc.src.math.ufromfpf128
     libc.src.math.ufromfpxf128
diff --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index 32f57aee84807d..150b878f274306 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -638,10 +638,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.totalorder
     libc.src.math.totalorderf
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalorderl
     libc.src.math.totalordermag
     libc.src.math.totalordermagf
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.totalordermagl
     libc.src.math.trunc
     libc.src.math.truncf
diff --git a/libc/config/darwin/aarch64/entrypoints.txt b/libc/config/darwin/aarch64/entrypoints.txt
index 2b8e0a0f62d035..791aa7a19c3866 100644
--- a/libc/config/darwin/aarch64/entrypoints.txt
+++ b/libc/config/darwin/aarch64/entrypoints.txt
@@ -457,10 +457,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.totalorder
     libc.src.math.totalorderf
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalorderl
     libc.src.math.totalordermag
     libc.src.math.totalordermagf
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.totalordermagl
     libc.src.math.trunc
     libc.src.math.truncf
diff --git a/libc/config/darwin/x86_64/entrypoints.txt b/libc/config/darwin/x86_64/entrypoints.txt
index d2855fe5e18071..62479a8693e542 100644
--- a/libc/config/darwin/x86_64/entrypoints.txt
+++ b/libc/config/darwin/x86_64/entrypoints.txt
@@ -360,7 +360,9 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.totalorderbf16
   libc.src.math.totalordermagbf16
   libc.src.math.totalorderf128
+  libc.src.math.totalorderf80
   libc.src.math.totalordermagf128
+  libc.src.math.totalordermagf80
   libc.src.math.ufromfpbf16
   libc.src.math.ufromfpxbf16
 )
diff --git a/libc/config/freebsd/x86_64/entrypoints.txt b/libc/config/freebsd/x86_64/entrypoints.txt
index 8b998d0b75cc61..a01c3bd6b91358 100644
--- a/libc/config/freebsd/x86_64/entrypoints.txt
+++ b/libc/config/freebsd/x86_64/entrypoints.txt
@@ -408,10 +408,12 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
     libc.src.math.totalorder
     libc.src.math.totalorderf
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalorderl
     libc.src.math.totalordermag
     libc.src.math.totalordermagf
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.totalordermagl
     libc.src.math.ufromfp
     libc.src.math.ufromfpf
diff --git a/libc/config/gpu/amdgpu/entrypoints.txt b/libc/config/gpu/amdgpu/entrypoints.txt
index 585af5623bc713..026436dfab9664 100644
--- a/libc/config/gpu/amdgpu/entrypoints.txt
+++ b/libc/config/gpu/amdgpu/entrypoints.txt
@@ -576,10 +576,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.totalorder
     libc.src.math.totalorderf
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalorderl
     libc.src.math.totalordermag
     libc.src.math.totalordermagf
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.totalordermagl
     libc.src.math.trunc
     libc.src.math.truncf
diff --git a/libc/config/gpu/nvptx/entrypoints.txt b/libc/config/gpu/nvptx/entrypoints.txt
index 1b13cd31d05901..b98fb8a7e902fb 100644
--- a/libc/config/gpu/nvptx/entrypoints.txt
+++ b/libc/config/gpu/nvptx/entrypoints.txt
@@ -573,10 +573,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.totalorder
     libc.src.math.totalorderf
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalorderl
     libc.src.math.totalordermag
     libc.src.math.totalordermagf
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.totalordermagl
     libc.src.math.trunc
     libc.src.math.truncf
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 4b04f8995be49f..f504f087515d42 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -879,10 +879,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.totalorder
     libc.src.math.totalorderf
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalorderl
     libc.src.math.totalordermag
     libc.src.math.totalordermagf
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.totalordermagl
     libc.src.math.trunc
     libc.src.math.truncf
diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index 984cff2570158d..15817143565629 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -655,10 +655,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.totalorder
     libc.src.math.totalorderf
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalorderl
     libc.src.math.totalordermag
     libc.src.math.totalordermagf
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.totalordermagl
     libc.src.math.trunc
     libc.src.math.truncf
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index f15e8e6d4f80d4..9d354ab9a0ff11 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -942,10 +942,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.totalorder
     libc.src.math.totalorderf
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalorderl
     libc.src.math.totalordermag
     libc.src.math.totalordermagf
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.totalordermagl
     libc.src.math.trunc
     libc.src.math.truncf
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index f31143b6965a6a..091580ee6ff9f3 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -964,10 +964,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.totalorder
     libc.src.math.totalorderf
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalorderl
     libc.src.math.totalordermag
     libc.src.math.totalordermagf
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.totalordermagl
     libc.src.math.trunc
     libc.src.math.truncf
diff --git a/libc/config/windows/entrypoints.txt b/libc/config/windows/entrypoints.txt
index 550a3b461467fe..2805795f0b85f9 100644
--- a/libc/config/windows/entrypoints.txt
+++ b/libc/config/windows/entrypoints.txt
@@ -372,7 +372,9 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.tanhf
     libc.src.math.tanpif
     libc.src.math.totalorderf128
+    libc.src.math.totalorderf80
     libc.src.math.totalordermagf128
+    libc.src.math.totalordermagf80
     libc.src.math.trunc
     libc.src.math.truncf
     libc.src.math.truncf128
diff --git a/libc/docs/headers/math/index.md b/libc/docs/headers/math/index.md
index d138caa5eb34aa..8df3cd80e34998 100644
--- a/libc/docs/headers/math/index.md
+++ b/libc/docs/headers/math/index.md
@@ -156,8 +156,8 @@ log
 | scalbn           | {{ check }}       | {{ check }}      |                   |                         | {{ check }}           | {{ check }}             | {{ check }}             | 7.12.6.19              | F.10.3.19                  |
 | setpayload       | {{ check }}       | {{ check }}      |                   |                         | {{ check }}           | {{ check }}             | {{ check }}             | F.10.13.2              | N/A                        |
 | setpayloadsig    | {{ check }}       | {{ check }}      |                   |                         | {{ check }}           | {{ check }}             | {{ check }}             | F.10.13.3              | N/A                        |
-| totalorder       | {{ check }}       | {{ check }}      |                   |                         | {{ check }}           | {{ check }}             | {{ check }}             | F.10.12.1              | N/A                        |
-| totalordermag    | {{ check }}       | {{ check }}      |                   |                         | {{ check }}           | {{ check }}             | {{ check }}             | F.10.12.2              | N/A                        |
+| totalorder       | {{ check }}       | {{ check }}      | {{ check }}       |                         | {{ check }}           | {{ check }}             | {{ check }}             | F.10.12.1              | N/A                        |
+| totalordermag    | {{ check }}       | {{ check }}      | {{ check }}       |                         | {{ check }}           | {{ check }}             | {{ check }}             | F.10.12.2              | N/A                        |
 | trunc            | {{ check }}       | {{ check }}      |                   |                         | {{ check }}           | {{ check }}             | {{ check }}             | 7.12.9.9               | F.10.6.9                   |
 | ufromfp          | {{ check }}       | {{ check }}      |                   |                         | {{ check }}           | {{ check }}             | {{ check }}             | 7.12.9.10              | F.10.6.10                  |
 | ufromfpx         | {{ check }}       | {{ check }}      |                   |                         | {{ check }}           | {{ check }}             | {{ check }}             | 7.12.9.11              | F.10.6.11                  |
diff --git a/libc/shared/math.h b/libc/shared/math.h
index bf490aa4738b41..c7a99047d61619 100644
--- a/libc/shared/math.h
+++ b/libc/shared/math.h
@@ -505,12 +505,14 @@
 #include "math/totalorderbf16.h"
 #include "math/totalorderf.h"
 #include "math/totalorderf128.h"
+#include "math/totalorderf80.h"
 #include "math/totalorderf16.h"
 #include "math/totalorderl.h"
 #include "math/totalordermag.h"
 #include "math/totalordermagbf16.h"
 #include "math/totalordermagf.h"
 #include "math/totalordermagf128.h"
+#include "math/totalordermagf80.h"
 #include "math/totalordermagf16.h"
 #include "math/totalordermagl.h"
 #include "math/trunc.h"
diff --git a/libc/shared/math/totalorderf80.h b/libc/shared/math/totalorderf80.h
new file mode 100644
index 00000000000000..a4cb2f5b2e347f
--- /dev/null
+++ b/libc/shared/math/totalorderf80.h
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+/// Shared totalorderf80 function.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_TOTALORDERF80_H
+#define LLVM_LIBC_SHARED_MATH_TOTALORDERF80_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/totalorderf80.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::totalorderf80;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SHARED_MATH_TOTALORDERF80_H
diff --git a/libc/shared/math/totalordermagf80.h b/libc/shared/math/totalordermagf80.h
new file mode 100644
index 00000000000000..8191980af32fb5
--- /dev/null
+++ b/libc/shared/math/totalordermagf80.h
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+/// Shared totalordermagf80 function.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_TOTALORDERMAGF80_H
+#define LLVM_LIBC_SHARED_MATH_TOTALORDERMAGF80_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/totalordermagf80.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::totalordermagf80;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SHARED_MATH_TOTALORDERMAGF80_H
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index ba3edda2843149..d14a52716643a8 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -6323,6 +6323,16 @@ add_header_library(
     libc.src.__support.macros.config
 )
 
+add_header_library(
+  totalorderf80
+  HDRS
+    totalorderf80.h
+  DEPENDS
+    libc.src.__support.FPUtil.basic_operations
+    libc.src.__support.FPUtil.float80
+    libc.src.__support.macros.config
+)
+
 add_header_library(
   totalorderf16
   HDRS
@@ -6380,6 +6390,16 @@ add_header_library(
     libc.src.__support.macros.config
 )
 
+add_header_library(
+  totalordermagf80
+  HDRS
+    totalordermagf80.h
+  DEPENDS
+    libc.src.__support.FPUtil.basic_operations
+    libc.src.__support.FPUtil.float80
+    libc.src.__support.macros.config
+)
+
 add_header_library(
   totalordermagf16
   HDRS
diff --git a/libc/src/__support/math/totalorderf80.h b/libc/src/__support/math/totalorderf80.h
new file mode 100644
index 00000000000000..07315623df03d8
--- /dev/null
+++ b/libc/src/__support/math/totalorderf80.h
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+/// Implementation of the totalorderf80 function.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_TOTALORDERF80_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_TOTALORDERF80_H
+
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/FPUtil/float80.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+using LIBC_NAMESPACE::fputil::Float80;
+
+LIBC_INLINE constexpr int totalorderf80(const Float80 *x, const Float80 *y) {
+  return static_cast<int>(fputil::totalorder(*x, *y));
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_TOTALORDERF80_H
diff --git a/libc/src/__support/math/totalordermagf80.h b/libc/src/__support/math/totalordermagf80.h
new file mode 100644
index 00000000000000..29003d69e6f4ff
--- /dev/null
+++ b/libc/src/__support/math/totalordermagf80.h
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+/// Implementation of the totalordermagf80 function.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_TOTALORDERMAGF80_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_TOTALORDERMAGF80_H
+
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/FPUtil/float80.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+using LIBC_NAMESPACE::fputil::Float80;
+
+LIBC_INLINE constexpr int totalordermagf80(const Float80 *x,
+                                            const Float80 *y) {
+  return static_cast<int>(fputil::totalordermag(*x, *y));
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_TOTALORDERMAGF80_H
diff --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index 08728a02809359..b5aa8dc5f8d142 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -626,6 +626,7 @@ add_math_entrypoint_object(totalorderf)
 add_math_entrypoint_object(totalorderl)
 add_math_entrypoint_object(totalorderf16)
 add_math_entrypoint_object(totalorderf128)
+add_math_entrypoint_object(totalorderf80)
 add_math_entrypoint_object(totalorderbf16)
 
 add_math_entrypoint_object(totalordermag)
@@ -633,6 +634,7 @@ add_math_entrypoint_object(totalordermagf)
 add_math_entrypoint_object(totalordermagl)
 add_math_entrypoint_object(totalordermagf16)
 add_math_entrypoint_object(totalordermagf128)
+add_math_entrypoint_object(totalordermagf80)
 add_math_entrypoint_object(totalordermagbf16)
 
 add_math_entrypoint_object(trunc)
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index b7444dd916d006..e7511ba7fbe820 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -4450,6 +4450,17 @@ add_entrypoint_object(
     libc.src.__support.math.totalorderf128
 )
 
+add_entrypoint_object(
+  totalorderf80
+  SRCS
+    totalorderf80.cpp
+  HDRS
+    ../totalorderf80.h
+  DEPENDS
+    libc.src.__support.CPP.bit
+    libc.src.__support.math.totalorderf80
+)
+
 add_entrypoint_object(
   totalorderbf16
   SRCS
@@ -4511,6 +4522,17 @@ add_entrypoint_object(
     libc.src.__support.math.totalordermagf128
 )
 
+add_entrypoint_object(
+  totalordermagf80
+  SRCS
+    totalordermagf80.cpp
+  HDRS
+    ../totalordermagf80.h
+  DEPENDS
+    libc.src.__support.CPP.bit
+    libc.src.__support.math.totalordermagf80
+)
+
 add_entrypoint_object(
   totalordermagbf16
   SRCS
diff --git a/libc/src/math/generic/totalorderf80.cpp b/libc/src/math/generic/totalorderf80.cpp
new file mode 100644
index 00000000000000..f39adb1a43a33f
--- /dev/null
+++ b/libc/src/math/generic/totalorderf80.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// 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-Ident...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/238685


More information about the libc-commits mailing list