[libc-commits] [libc] 5c406ea - [libc][math][c23] Fix totalorderf128 requiring support for 128-bit ints (#101229)
via libc-commits
libc-commits at lists.llvm.org
Wed Jul 31 02:45:44 PDT 2024
Author: OverMighty
Date: 2024-07-31T11:45:41+02:00
New Revision: 5c406eacf4f4dda0cf9267d638954aa20f17e118
URL: https://github.com/llvm/llvm-project/commit/5c406eacf4f4dda0cf9267d638954aa20f17e118
DIFF: https://github.com/llvm/llvm-project/commit/5c406eacf4f4dda0cf9267d638954aa20f17e118.diff
LOG: [libc][math][c23] Fix totalorderf128 requiring support for 128-bit ints (#101229)
Added:
Modified:
libc/src/__support/FPUtil/BasicOperations.h
libc/src/__support/FPUtil/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/src/__support/FPUtil/BasicOperations.h b/libc/src/__support/FPUtil/BasicOperations.h
index 50f1e19e08d64..d68f3ae6a26bb 100644
--- a/libc/src/__support/FPUtil/BasicOperations.h
+++ b/libc/src/__support/FPUtil/BasicOperations.h
@@ -14,6 +14,7 @@
#include "dyadic_float.h"
#include "src/__support/CPP/type_traits.h"
+#include "src/__support/big_int.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
@@ -320,7 +321,7 @@ totalorder(T x, T y) {
StorageType x_u = x_bits.uintval();
StorageType y_u = y_bits.uintval();
- using signed_t = cpp::make_signed_t<StorageType>;
+ using signed_t = make_integral_or_big_int_signed_t<StorageType>;
signed_t x_signed = static_cast<signed_t>(x_u);
signed_t y_signed = static_cast<signed_t>(y_u);
diff --git a/libc/src/__support/FPUtil/CMakeLists.txt b/libc/src/__support/FPUtil/CMakeLists.txt
index bfdfffb85c255..ea1e0e8b39d10 100644
--- a/libc/src/__support/FPUtil/CMakeLists.txt
+++ b/libc/src/__support/FPUtil/CMakeLists.txt
@@ -189,6 +189,7 @@ add_header_library(
.fp_bits
.fenv_impl
libc.src.__support.CPP.type_traits
+ libc.src.__support.big_int
libc.src.__support.uint128
libc.src.__support.common
libc.src.__support.macros.optimization
More information about the libc-commits
mailing list