Skip to content

Commit 5c406ea

Browse files
authored
[libc][math][c23] Fix totalorderf128 requiring support for 128-bit ints (llvm#101229)
1 parent a3800a6 commit 5c406ea

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

libc/src/__support/FPUtil/BasicOperations.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "dyadic_float.h"
1515

1616
#include "src/__support/CPP/type_traits.h"
17+
#include "src/__support/big_int.h"
1718
#include "src/__support/common.h"
1819
#include "src/__support/macros/config.h"
1920
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
@@ -320,7 +321,7 @@ totalorder(T x, T y) {
320321
StorageType x_u = x_bits.uintval();
321322
StorageType y_u = y_bits.uintval();
322323

323-
using signed_t = cpp::make_signed_t<StorageType>;
324+
using signed_t = make_integral_or_big_int_signed_t<StorageType>;
324325
signed_t x_signed = static_cast<signed_t>(x_u);
325326
signed_t y_signed = static_cast<signed_t>(y_u);
326327

libc/src/__support/FPUtil/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ add_header_library(
189189
.fp_bits
190190
.fenv_impl
191191
libc.src.__support.CPP.type_traits
192+
libc.src.__support.big_int
192193
libc.src.__support.uint128
193194
libc.src.__support.common
194195
libc.src.__support.macros.optimization

0 commit comments

Comments
 (0)