[libc-commits] [libc] [llvm] [libc][math] Refactor ufromfp family to header-only (PR #195395)
Muhammad Bassiouni via libc-commits
libc-commits at lists.llvm.org
Fri May 1 20:21:28 PDT 2026
https://github.com/bassiounix updated https://github.com/llvm/llvm-project/pull/195395
>From 8b2c7bee2ff4b2fc41921aa13ea7f51599dfc2f5 Mon Sep 17 00:00:00 2001
From: Anonmiraj <ezzibrahimx at gmail.com>
Date: Sat, 2 May 2026 04:13:51 +0300
Subject: [PATCH] [libc][math] Refactor ufromfp family to header-only
Refactored functions:
- ufromfp
- ufromfpbf16
- ufromfpf
- ufromfpf128
- ufromfpf16
- ufromfpl
- ufromfpx
- ufromfpxbf16
- ufromfpxf
- ufromfpxf128
- ufromfpxf16
- ufromfpxl
---
libc/shared/math.h | 12 ++
libc/shared/math/ufromfp.h | 23 +++
libc/shared/math/ufromfpbf16.h | 23 +++
libc/shared/math/ufromfpf.h | 23 +++
libc/shared/math/ufromfpf128.h | 29 +++
libc/shared/math/ufromfpf16.h | 29 +++
libc/shared/math/ufromfpl.h | 23 +++
libc/shared/math/ufromfpx.h | 23 +++
libc/shared/math/ufromfpxbf16.h | 23 +++
libc/shared/math/ufromfpxf.h | 23 +++
libc/shared/math/ufromfpxf128.h | 29 +++
libc/shared/math/ufromfpxf16.h | 29 +++
libc/shared/math/ufromfpxl.h | 23 +++
libc/src/__support/math/CMakeLists.txt | 115 +++++++++++
libc/src/__support/math/ufromfp.h | 25 +++
libc/src/__support/math/ufromfpbf16.h | 27 +++
libc/src/__support/math/ufromfpf.h | 25 +++
libc/src/__support/math/ufromfpf128.h | 32 +++
libc/src/__support/math/ufromfpf16.h | 32 +++
libc/src/__support/math/ufromfpl.h | 26 +++
libc/src/__support/math/ufromfpx.h | 25 +++
libc/src/__support/math/ufromfpxbf16.h | 27 +++
libc/src/__support/math/ufromfpxf.h | 25 +++
libc/src/__support/math/ufromfpxf128.h | 32 +++
libc/src/__support/math/ufromfpxf16.h | 32 +++
libc/src/__support/math/ufromfpxl.h | 26 +++
libc/src/math/generic/CMakeLists.txt | 36 ++--
libc/src/math/generic/ufromfp.cpp | 6 +-
libc/src/math/generic/ufromfpbf16.cpp | 7 +-
libc/src/math/generic/ufromfpf.cpp | 6 +-
libc/src/math/generic/ufromfpf128.cpp | 6 +-
libc/src/math/generic/ufromfpf16.cpp | 6 +-
libc/src/math/generic/ufromfpl.cpp | 6 +-
libc/src/math/generic/ufromfpx.cpp | 6 +-
libc/src/math/generic/ufromfpxbf16.cpp | 7 +-
libc/src/math/generic/ufromfpxf.cpp | 6 +-
libc/src/math/generic/ufromfpxf128.cpp | 6 +-
libc/src/math/generic/ufromfpxf16.cpp | 6 +-
libc/src/math/generic/ufromfpxl.cpp | 6 +-
libc/test/shared/CMakeLists.txt | 24 +++
.../shared/shared_math_constexpr_test.cpp | 16 ++
libc/test/shared/shared_math_test.cpp | 16 ++
.../llvm-project-overlay/libc/BUILD.bazel | 182 +++++++++++++++++-
43 files changed, 1029 insertions(+), 80 deletions(-)
create mode 100644 libc/shared/math/ufromfp.h
create mode 100644 libc/shared/math/ufromfpbf16.h
create mode 100644 libc/shared/math/ufromfpf.h
create mode 100644 libc/shared/math/ufromfpf128.h
create mode 100644 libc/shared/math/ufromfpf16.h
create mode 100644 libc/shared/math/ufromfpl.h
create mode 100644 libc/shared/math/ufromfpx.h
create mode 100644 libc/shared/math/ufromfpxbf16.h
create mode 100644 libc/shared/math/ufromfpxf.h
create mode 100644 libc/shared/math/ufromfpxf128.h
create mode 100644 libc/shared/math/ufromfpxf16.h
create mode 100644 libc/shared/math/ufromfpxl.h
create mode 100644 libc/src/__support/math/ufromfp.h
create mode 100644 libc/src/__support/math/ufromfpbf16.h
create mode 100644 libc/src/__support/math/ufromfpf.h
create mode 100644 libc/src/__support/math/ufromfpf128.h
create mode 100644 libc/src/__support/math/ufromfpf16.h
create mode 100644 libc/src/__support/math/ufromfpl.h
create mode 100644 libc/src/__support/math/ufromfpx.h
create mode 100644 libc/src/__support/math/ufromfpxbf16.h
create mode 100644 libc/src/__support/math/ufromfpxf.h
create mode 100644 libc/src/__support/math/ufromfpxf128.h
create mode 100644 libc/src/__support/math/ufromfpxf16.h
create mode 100644 libc/src/__support/math/ufromfpxl.h
diff --git a/libc/shared/math.h b/libc/shared/math.h
index 6d2b573244c0c..b79cb581c087d 100644
--- a/libc/shared/math.h
+++ b/libc/shared/math.h
@@ -323,5 +323,17 @@
#include "math/tanhf16.h"
#include "math/tanpif.h"
#include "math/tanpif16.h"
+#include "math/ufromfp.h"
+#include "math/ufromfpbf16.h"
+#include "math/ufromfpf.h"
+#include "math/ufromfpf128.h"
+#include "math/ufromfpf16.h"
+#include "math/ufromfpl.h"
+#include "math/ufromfpx.h"
+#include "math/ufromfpxbf16.h"
+#include "math/ufromfpxf.h"
+#include "math/ufromfpxf128.h"
+#include "math/ufromfpxf16.h"
+#include "math/ufromfpxl.h"
#endif // LLVM_LIBC_SHARED_MATH_H
diff --git a/libc/shared/math/ufromfp.h b/libc/shared/math/ufromfp.h
new file mode 100644
index 0000000000000..538a5cca28b22
--- /dev/null
+++ b/libc/shared/math/ufromfp.h
@@ -0,0 +1,23 @@
+//===-- Shared ufromfp function ---------------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFP_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFP_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfp.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfp;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFP_H
diff --git a/libc/shared/math/ufromfpbf16.h b/libc/shared/math/ufromfpbf16.h
new file mode 100644
index 0000000000000..855dbf936d683
--- /dev/null
+++ b/libc/shared/math/ufromfpbf16.h
@@ -0,0 +1,23 @@
+//===-- Shared ufromfpbf16 function -----------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFPBF16_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFPBF16_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfpbf16.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfpbf16;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFPBF16_H
diff --git a/libc/shared/math/ufromfpf.h b/libc/shared/math/ufromfpf.h
new file mode 100644
index 0000000000000..7146d0e75c954
--- /dev/null
+++ b/libc/shared/math/ufromfpf.h
@@ -0,0 +1,23 @@
+//===-- Shared ufromfpf function --------------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFPF_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFPF_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfpf.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfpf;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFPF_H
diff --git a/libc/shared/math/ufromfpf128.h b/libc/shared/math/ufromfpf128.h
new file mode 100644
index 0000000000000..f2438a45878ef
--- /dev/null
+++ b/libc/shared/math/ufromfpf128.h
@@ -0,0 +1,29 @@
+//===-- Shared ufromfpf128 function -----------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFPF128_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFPF128_H
+
+#include "include/llvm-libc-types/float128.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfpf128.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfpf128;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFPF128_H
diff --git a/libc/shared/math/ufromfpf16.h b/libc/shared/math/ufromfpf16.h
new file mode 100644
index 0000000000000..e5f00b9f668a0
--- /dev/null
+++ b/libc/shared/math/ufromfpf16.h
@@ -0,0 +1,29 @@
+//===-- Shared ufromfpf16 function ------------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFPF16_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFPF16_H
+
+#include "include/llvm-libc-macros/float16-macros.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfpf16.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfpf16;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFPF16_H
diff --git a/libc/shared/math/ufromfpl.h b/libc/shared/math/ufromfpl.h
new file mode 100644
index 0000000000000..651364e4732ae
--- /dev/null
+++ b/libc/shared/math/ufromfpl.h
@@ -0,0 +1,23 @@
+//===-- Shared ufromfpl function --------------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFPL_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFPL_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfpl.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfpl;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFPL_H
diff --git a/libc/shared/math/ufromfpx.h b/libc/shared/math/ufromfpx.h
new file mode 100644
index 0000000000000..816d8030006f6
--- /dev/null
+++ b/libc/shared/math/ufromfpx.h
@@ -0,0 +1,23 @@
+//===-- Shared ufromfpx function --------------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFPX_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFPX_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfpx.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfpx;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFPX_H
diff --git a/libc/shared/math/ufromfpxbf16.h b/libc/shared/math/ufromfpxbf16.h
new file mode 100644
index 0000000000000..37a245511ab31
--- /dev/null
+++ b/libc/shared/math/ufromfpxbf16.h
@@ -0,0 +1,23 @@
+//===-- Shared ufromfpxbf16 function ----------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFPXBF16_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFPXBF16_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfpxbf16.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfpxbf16;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFPXBF16_H
diff --git a/libc/shared/math/ufromfpxf.h b/libc/shared/math/ufromfpxf.h
new file mode 100644
index 0000000000000..069022506a829
--- /dev/null
+++ b/libc/shared/math/ufromfpxf.h
@@ -0,0 +1,23 @@
+//===-- Shared ufromfpxf function -------------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFPXF_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFPXF_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfpxf.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfpxf;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFPXF_H
diff --git a/libc/shared/math/ufromfpxf128.h b/libc/shared/math/ufromfpxf128.h
new file mode 100644
index 0000000000000..99bc8f995ae24
--- /dev/null
+++ b/libc/shared/math/ufromfpxf128.h
@@ -0,0 +1,29 @@
+//===-- Shared ufromfpxf128 function ----------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFPXF128_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFPXF128_H
+
+#include "include/llvm-libc-types/float128.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfpxf128.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfpxf128;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFPXF128_H
diff --git a/libc/shared/math/ufromfpxf16.h b/libc/shared/math/ufromfpxf16.h
new file mode 100644
index 0000000000000..55d7fbfcbe2cf
--- /dev/null
+++ b/libc/shared/math/ufromfpxf16.h
@@ -0,0 +1,29 @@
+//===-- Shared ufromfpxf16 function -----------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFPXF16_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFPXF16_H
+
+#include "include/llvm-libc-macros/float16-macros.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfpxf16.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfpxf16;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFPXF16_H
diff --git a/libc/shared/math/ufromfpxl.h b/libc/shared/math/ufromfpxl.h
new file mode 100644
index 0000000000000..7db0692bcd582
--- /dev/null
+++ b/libc/shared/math/ufromfpxl.h
@@ -0,0 +1,23 @@
+//===-- Shared ufromfpxl function -------------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_UFROMFPXL_H
+#define LLVM_LIBC_SHARED_MATH_UFROMFPXL_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/ufromfpxl.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::ufromfpxl;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SHARED_MATH_UFROMFPXL_H
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index dad34b0023154..724cce2849d23 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -3965,3 +3965,118 @@ add_header_library(
libc.src.__support.FPUtil.multiply_add
libc.src.__support.macros.optimization
)
+
+add_header_library(
+ ufromfp
+ HDRS
+ ufromfp.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
+add_header_library(
+ ufromfpbf16
+ HDRS
+ ufromfpbf16.h
+ DEPENDS
+ libc.src.__support.FPUtil.bfloat16
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
+add_header_library(
+ ufromfpf
+ HDRS
+ ufromfpf.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
+add_header_library(
+ ufromfpf128
+ HDRS
+ ufromfpf128.h
+ DEPENDS
+ libc.include.llvm-libc-types.float128
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
+add_header_library(
+ ufromfpf16
+ HDRS
+ ufromfpf16.h
+ DEPENDS
+ libc.include.llvm-libc-macros.float16_macros
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
+add_header_library(
+ ufromfpl
+ HDRS
+ ufromfpl.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
+add_header_library(
+ ufromfpx
+ HDRS
+ ufromfpx.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
+add_header_library(
+ ufromfpxbf16
+ HDRS
+ ufromfpxbf16.h
+ DEPENDS
+ libc.src.__support.FPUtil.bfloat16
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
+add_header_library(
+ ufromfpxf
+ HDRS
+ ufromfpxf.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
+add_header_library(
+ ufromfpxf128
+ HDRS
+ ufromfpxf128.h
+ DEPENDS
+ libc.include.llvm-libc-types.float128
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
+add_header_library(
+ ufromfpxf16
+ HDRS
+ ufromfpxf16.h
+ DEPENDS
+ libc.include.llvm-libc-macros.float16_macros
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
+add_header_library(
+ ufromfpxl
+ HDRS
+ ufromfpxl.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.macros.config
+)
+
diff --git a/libc/src/__support/math/ufromfp.h b/libc/src/__support/math/ufromfp.h
new file mode 100644
index 0000000000000..a22e31b13a1ab
--- /dev/null
+++ b/libc/src/__support/math/ufromfp.h
@@ -0,0 +1,25 @@
+//===-- Implementation header for ufromfp -----------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFP_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFP_H
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr double ufromfp(double x, int rnd, unsigned int width) {
+ return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFP_H
diff --git a/libc/src/__support/math/ufromfpbf16.h b/libc/src/__support/math/ufromfpbf16.h
new file mode 100644
index 0000000000000..b0858e6f1bea5
--- /dev/null
+++ b/libc/src/__support/math/ufromfpbf16.h
@@ -0,0 +1,27 @@
+//===-- Implementation header for ufromfpbf16 -------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPBF16_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPBF16_H
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr bfloat16 ufromfpbf16(bfloat16 x, int rnd,
+ unsigned int width) {
+ return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPBF16_H
diff --git a/libc/src/__support/math/ufromfpf.h b/libc/src/__support/math/ufromfpf.h
new file mode 100644
index 0000000000000..e6f6fbed450aa
--- /dev/null
+++ b/libc/src/__support/math/ufromfpf.h
@@ -0,0 +1,25 @@
+//===-- Implementation header for ufromfpf ----------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPF_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPF_H
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr float ufromfpf(float x, int rnd, unsigned int width) {
+ return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPF_H
diff --git a/libc/src/__support/math/ufromfpf128.h b/libc/src/__support/math/ufromfpf128.h
new file mode 100644
index 0000000000000..d6fac3604e5d7
--- /dev/null
+++ b/libc/src/__support/math/ufromfpf128.h
@@ -0,0 +1,32 @@
+//===-- Implementation header for ufromfpf128 -------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPF128_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPF128_H
+
+#include "include/llvm-libc-types/float128.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr float128 ufromfpf128(float128 x, int rnd,
+ unsigned int width) {
+ return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPF128_H
diff --git a/libc/src/__support/math/ufromfpf16.h b/libc/src/__support/math/ufromfpf16.h
new file mode 100644
index 0000000000000..bfd3abf5c6b6f
--- /dev/null
+++ b/libc/src/__support/math/ufromfpf16.h
@@ -0,0 +1,32 @@
+//===-- Implementation header for ufromfpf16 --------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPF16_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPF16_H
+
+#include "include/llvm-libc-macros/float16-macros.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr float16 ufromfpf16(float16 x, int rnd,
+ unsigned int width) {
+ return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPF16_H
diff --git a/libc/src/__support/math/ufromfpl.h b/libc/src/__support/math/ufromfpl.h
new file mode 100644
index 0000000000000..8f680a3a0bcf5
--- /dev/null
+++ b/libc/src/__support/math/ufromfpl.h
@@ -0,0 +1,26 @@
+//===-- Implementation header for ufromfpl ----------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPL_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPL_H
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr long double ufromfpl(long double x, int rnd,
+ unsigned int width) {
+ return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPL_H
diff --git a/libc/src/__support/math/ufromfpx.h b/libc/src/__support/math/ufromfpx.h
new file mode 100644
index 0000000000000..abd4ebcda851c
--- /dev/null
+++ b/libc/src/__support/math/ufromfpx.h
@@ -0,0 +1,25 @@
+//===-- Implementation header for ufromfpx ----------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPX_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPX_H
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr double ufromfpx(double x, int rnd, unsigned int width) {
+ return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPX_H
diff --git a/libc/src/__support/math/ufromfpxbf16.h b/libc/src/__support/math/ufromfpxbf16.h
new file mode 100644
index 0000000000000..3b8c7c69db6c3
--- /dev/null
+++ b/libc/src/__support/math/ufromfpxbf16.h
@@ -0,0 +1,27 @@
+//===-- Implementation header for ufromfpxbf16 ------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXBF16_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXBF16_H
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr bfloat16 ufromfpxbf16(bfloat16 x, int rnd,
+ unsigned int width) {
+ return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXBF16_H
diff --git a/libc/src/__support/math/ufromfpxf.h b/libc/src/__support/math/ufromfpxf.h
new file mode 100644
index 0000000000000..a7be6658c61cd
--- /dev/null
+++ b/libc/src/__support/math/ufromfpxf.h
@@ -0,0 +1,25 @@
+//===-- Implementation header for ufromfpxf ---------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXF_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXF_H
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr float ufromfpxf(float x, int rnd, unsigned int width) {
+ return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXF_H
diff --git a/libc/src/__support/math/ufromfpxf128.h b/libc/src/__support/math/ufromfpxf128.h
new file mode 100644
index 0000000000000..2f72217948503
--- /dev/null
+++ b/libc/src/__support/math/ufromfpxf128.h
@@ -0,0 +1,32 @@
+//===-- Implementation header for ufromfpxf128 ------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXF128_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXF128_H
+
+#include "include/llvm-libc-types/float128.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr float128 ufromfpxf128(float128 x, int rnd,
+ unsigned int width) {
+ return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXF128_H
diff --git a/libc/src/__support/math/ufromfpxf16.h b/libc/src/__support/math/ufromfpxf16.h
new file mode 100644
index 0000000000000..57bfe9d0b56f3
--- /dev/null
+++ b/libc/src/__support/math/ufromfpxf16.h
@@ -0,0 +1,32 @@
+//===-- Implementation header for ufromfpxf16 -------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXF16_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXF16_H
+
+#include "include/llvm-libc-macros/float16-macros.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr float16 ufromfpxf16(float16 x, int rnd,
+ unsigned int width) {
+ return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXF16_H
diff --git a/libc/src/__support/math/ufromfpxl.h b/libc/src/__support/math/ufromfpxl.h
new file mode 100644
index 0000000000000..b0872107ef567
--- /dev/null
+++ b/libc/src/__support/math/ufromfpxl.h
@@ -0,0 +1,26 @@
+//===-- Implementation header for ufromfpxl ---------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXL_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXL_H
+
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr long double ufromfpxl(long double x, int rnd,
+ unsigned int width) {
+ return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_UFROMFPXL_H
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index df6e2dd9dbfc0..3f00fd1495c30 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -3687,7 +3687,7 @@ add_entrypoint_object(
HDRS
../ufromfp.h
DEPENDS
- libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.math.ufromfp
)
add_entrypoint_object(
@@ -3697,7 +3697,7 @@ add_entrypoint_object(
HDRS
../ufromfpf.h
DEPENDS
- libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.math.ufromfpf
)
add_entrypoint_object(
@@ -3707,7 +3707,7 @@ add_entrypoint_object(
HDRS
../ufromfpl.h
DEPENDS
- libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.math.ufromfpl
)
add_entrypoint_object(
@@ -3717,8 +3717,7 @@ add_entrypoint_object(
HDRS
../ufromfpf16.h
DEPENDS
- libc.src.__support.macros.properties.types
- libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.math.ufromfpf16
)
add_entrypoint_object(
@@ -3728,8 +3727,7 @@ add_entrypoint_object(
HDRS
../ufromfpf128.h
DEPENDS
- libc.src.__support.macros.properties.types
- libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.math.ufromfpf128
)
add_entrypoint_object(
@@ -3739,11 +3737,7 @@ add_entrypoint_object(
HDRS
../ufromfpbf16.h
DEPENDS
- libc.src.__support.common
- libc.src.__support.FPUtil.bfloat16
- libc.src.__support.FPUtil.nearest_integer_operations
- libc.src.__support.macros.config
- libc.src.__support.macros.properties.types
+ libc.src.__support.math.ufromfpbf16
)
add_entrypoint_object(
@@ -3753,7 +3747,7 @@ add_entrypoint_object(
HDRS
../ufromfpx.h
DEPENDS
- libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.math.ufromfpx
)
add_entrypoint_object(
@@ -3763,7 +3757,7 @@ add_entrypoint_object(
HDRS
../ufromfpxf.h
DEPENDS
- libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.math.ufromfpxf
)
add_entrypoint_object(
@@ -3773,7 +3767,7 @@ add_entrypoint_object(
HDRS
../ufromfpxl.h
DEPENDS
- libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.math.ufromfpxl
)
add_entrypoint_object(
@@ -3783,8 +3777,7 @@ add_entrypoint_object(
HDRS
../ufromfpxf16.h
DEPENDS
- libc.src.__support.macros.properties.types
- libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.math.ufromfpxf16
)
add_entrypoint_object(
@@ -3794,8 +3787,7 @@ add_entrypoint_object(
HDRS
../ufromfpxf128.h
DEPENDS
- libc.src.__support.macros.properties.types
- libc.src.__support.FPUtil.nearest_integer_operations
+ libc.src.__support.math.ufromfpxf128
)
add_entrypoint_object(
@@ -3805,11 +3797,7 @@ add_entrypoint_object(
HDRS
../ufromfpxbf16.h
DEPENDS
- libc.src.__support.common
- libc.src.__support.FPUtil.bfloat16
- libc.src.__support.FPUtil.nearest_integer_operations
- libc.src.__support.macros.config
- libc.src.__support.macros.properties.types
+ libc.src.__support.math.ufromfpxbf16
)
add_entrypoint_object(
diff --git a/libc/src/math/generic/ufromfp.cpp b/libc/src/math/generic/ufromfp.cpp
index f460a4314a35a..d03d962adf810 100644
--- a/libc/src/math/generic/ufromfp.cpp
+++ b/libc/src/math/generic/ufromfp.cpp
@@ -7,14 +7,12 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfp.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfp.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(double, ufromfp, (double x, int rnd, unsigned int width)) {
- return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfp(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ufromfpbf16.cpp b/libc/src/math/generic/ufromfpbf16.cpp
index 336771b695d97..fe1a8d098159d 100644
--- a/libc/src/math/generic/ufromfpbf16.cpp
+++ b/libc/src/math/generic/ufromfpbf16.cpp
@@ -7,16 +7,13 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfpbf16.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/FPUtil/bfloat16.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfpbf16.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(bfloat16, ufromfpbf16,
(bfloat16 x, int rnd, unsigned int width)) {
- return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfpbf16(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ufromfpf.cpp b/libc/src/math/generic/ufromfpf.cpp
index 07be4e90375e9..7325d822a5412 100644
--- a/libc/src/math/generic/ufromfpf.cpp
+++ b/libc/src/math/generic/ufromfpf.cpp
@@ -7,14 +7,12 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfpf.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfpf.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(float, ufromfpf, (float x, int rnd, unsigned int width)) {
- return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfpf(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ufromfpf128.cpp b/libc/src/math/generic/ufromfpf128.cpp
index 1a532cf047b2e..02c5518a2fdaf 100644
--- a/libc/src/math/generic/ufromfpf128.cpp
+++ b/libc/src/math/generic/ufromfpf128.cpp
@@ -7,15 +7,13 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfpf128.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfpf128.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(float128, ufromfpf128,
(float128 x, int rnd, unsigned int width)) {
- return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfpf128(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ufromfpf16.cpp b/libc/src/math/generic/ufromfpf16.cpp
index 314c5257a46b7..61119295e925d 100644
--- a/libc/src/math/generic/ufromfpf16.cpp
+++ b/libc/src/math/generic/ufromfpf16.cpp
@@ -7,15 +7,13 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfpf16.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfpf16.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(float16, ufromfpf16,
(float16 x, int rnd, unsigned int width)) {
- return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfpf16(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ufromfpl.cpp b/libc/src/math/generic/ufromfpl.cpp
index 050950aa626ac..5a298761c2bb0 100644
--- a/libc/src/math/generic/ufromfpl.cpp
+++ b/libc/src/math/generic/ufromfpl.cpp
@@ -7,15 +7,13 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfpl.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfpl.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(long double, ufromfpl,
(long double x, int rnd, unsigned int width)) {
- return fputil::fromfp</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfpl(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ufromfpx.cpp b/libc/src/math/generic/ufromfpx.cpp
index 178049bb75bc9..6477c0b44212c 100644
--- a/libc/src/math/generic/ufromfpx.cpp
+++ b/libc/src/math/generic/ufromfpx.cpp
@@ -7,14 +7,12 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfpx.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfpx.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(double, ufromfpx, (double x, int rnd, unsigned int width)) {
- return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfpx(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ufromfpxbf16.cpp b/libc/src/math/generic/ufromfpxbf16.cpp
index ac9cf44470a8e..50589480195c1 100644
--- a/libc/src/math/generic/ufromfpxbf16.cpp
+++ b/libc/src/math/generic/ufromfpxbf16.cpp
@@ -7,16 +7,13 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfpxbf16.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/FPUtil/bfloat16.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfpxbf16.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(bfloat16, ufromfpxbf16,
(bfloat16 x, int rnd, unsigned int width)) {
- return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfpxbf16(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ufromfpxf.cpp b/libc/src/math/generic/ufromfpxf.cpp
index 8f3cd5075b484..1b2e95be21f1f 100644
--- a/libc/src/math/generic/ufromfpxf.cpp
+++ b/libc/src/math/generic/ufromfpxf.cpp
@@ -7,14 +7,12 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfpxf.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfpxf.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(float, ufromfpxf, (float x, int rnd, unsigned int width)) {
- return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfpxf(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ufromfpxf128.cpp b/libc/src/math/generic/ufromfpxf128.cpp
index 9d6348ce42810..b2d948e63184b 100644
--- a/libc/src/math/generic/ufromfpxf128.cpp
+++ b/libc/src/math/generic/ufromfpxf128.cpp
@@ -7,15 +7,13 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfpxf128.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfpxf128.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(float128, ufromfpxf128,
(float128 x, int rnd, unsigned int width)) {
- return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfpxf128(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ufromfpxf16.cpp b/libc/src/math/generic/ufromfpxf16.cpp
index b1f42a8d55ecc..3dedc589ed740 100644
--- a/libc/src/math/generic/ufromfpxf16.cpp
+++ b/libc/src/math/generic/ufromfpxf16.cpp
@@ -7,15 +7,13 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfpxf16.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfpxf16.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(float16, ufromfpxf16,
(float16 x, int rnd, unsigned int width)) {
- return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfpxf16(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ufromfpxl.cpp b/libc/src/math/generic/ufromfpxl.cpp
index 637721eb0a2ca..ceffd600126fc 100644
--- a/libc/src/math/generic/ufromfpxl.cpp
+++ b/libc/src/math/generic/ufromfpxl.cpp
@@ -7,15 +7,13 @@
//===----------------------------------------------------------------------===//
#include "src/math/ufromfpxl.h"
-#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/ufromfpxl.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(long double, ufromfpxl,
(long double x, int rnd, unsigned int width)) {
- return fputil::fromfpx</*IsSigned=*/false>(x, rnd, width);
+ return math::ufromfpxl(x, rnd, width);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index b716d246d3f7b..fa3f85a9934d5 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -321,6 +321,18 @@ add_fp_unittest(
libc.src.__support.math.tanhf16
libc.src.__support.math.tanpif
libc.src.__support.math.tanpif16
+ libc.src.__support.math.ufromfp
+ libc.src.__support.math.ufromfpbf16
+ libc.src.__support.math.ufromfpf
+ libc.src.__support.math.ufromfpf128
+ libc.src.__support.math.ufromfpf16
+ libc.src.__support.math.ufromfpl
+ libc.src.__support.math.ufromfpx
+ libc.src.__support.math.ufromfpxbf16
+ libc.src.__support.math.ufromfpxf
+ libc.src.__support.math.ufromfpxf128
+ libc.src.__support.math.ufromfpxf16
+ libc.src.__support.math.ufromfpxl
)
add_fp_unittest(
@@ -408,6 +420,18 @@ add_fp_unittest(
libc.src.__support.math.logbbf16
libc.src.__support.math.ilogbbf16
libc.src.__support.math.sqrtl
+ libc.src.__support.math.ufromfp
+ libc.src.__support.math.ufromfpbf16
+ libc.src.__support.math.ufromfpf
+ libc.src.__support.math.ufromfpf128
+ libc.src.__support.math.ufromfpf16
+ libc.src.__support.math.ufromfpl
+ libc.src.__support.math.ufromfpx
+ libc.src.__support.math.ufromfpxbf16
+ libc.src.__support.math.ufromfpxf
+ libc.src.__support.math.ufromfpxf128
+ libc.src.__support.math.ufromfpxf16
+ libc.src.__support.math.ufromfpxl
)
add_fp_unittest(
diff --git a/libc/test/shared/shared_math_constexpr_test.cpp b/libc/test/shared/shared_math_constexpr_test.cpp
index 403a010c3c59d..a56d563fafea3 100644
--- a/libc/test/shared/shared_math_constexpr_test.cpp
+++ b/libc/test/shared/shared_math_constexpr_test.cpp
@@ -29,6 +29,8 @@ static_assert(0.0 == LIBC_NAMESPACE::shared::fmin(0.0, 0.0));
static_assert(0.0 == LIBC_NAMESPACE::shared::fmax(0.0, 0.0));
static_assert(0.0 == LIBC_NAMESPACE::shared::fmaximum_num(0.0, 0.0));
static_assert(0.0 == LIBC_NAMESPACE::shared::fminimum_num(0.0, 0.0));
+static_assert(0.0 == LIBC_NAMESPACE::shared::ufromfp(0.0, 0, 32));
+static_assert(0.0 == LIBC_NAMESPACE::shared::ufromfpx(0.0, 0, 32));
//===----------------------------------------------------------------------===//
// Float Tests
@@ -46,6 +48,8 @@ static_assert(0.0f == LIBC_NAMESPACE::shared::fminf(0.0f, 0.0f));
static_assert(0.0f == LIBC_NAMESPACE::shared::fmaxf(0.0f, 0.0f));
static_assert(0.0f == LIBC_NAMESPACE::shared::fmaximum_numf(0.0f, 0.0f));
static_assert(0.0f == LIBC_NAMESPACE::shared::fminimum_numf(0.0f, 0.0f));
+static_assert(0.0f == LIBC_NAMESPACE::shared::ufromfpf(0.0f, 0, 32));
+static_assert(0.0f == LIBC_NAMESPACE::shared::ufromfpxf(0.0f, 0, 32));
//===----------------------------------------------------------------------===//
// Float16 Tests
@@ -66,6 +70,8 @@ static_assert(0.0f16 ==
LIBC_NAMESPACE::shared::fmaximum_numf16(0.0f16, 0.0f16));
static_assert(0.0f16 ==
LIBC_NAMESPACE::shared::fminimum_numf16(0.0f16, 0.0f16));
+static_assert(0.0f16 == LIBC_NAMESPACE::shared::ufromfpf16(0.0f16, 0, 32));
+static_assert(0.0f16 == LIBC_NAMESPACE::shared::ufromfpxf16(0.0f16, 0, 32));
#endif // LIBC_TYPES_HAS_FLOAT16
@@ -92,6 +98,8 @@ static_assert(0.0L == LIBC_NAMESPACE::shared::fminl(0.0L, 0.0L));
static_assert(0.0L == LIBC_NAMESPACE::shared::fmaxl(0.0L, 0.0L));
static_assert(0.0L == LIBC_NAMESPACE::shared::fmaximum_numl(0.0L, 0.0L));
static_assert(0.0L == LIBC_NAMESPACE::shared::fminimum_numl(0.0L, 0.0L));
+static_assert(0.0L == LIBC_NAMESPACE::shared::ufromfpl(0.0L, 0, 32));
+static_assert(0.0L == LIBC_NAMESPACE::shared::ufromfpxl(0.0L, 0, 32));
#endif
@@ -135,6 +143,10 @@ static_assert(float128(0.0) ==
static_assert(float128(0.0) ==
LIBC_NAMESPACE::shared::fminimum_numf128(float128(0.0),
float128(0.0)));
+static_assert(float128(0.0) ==
+ LIBC_NAMESPACE::shared::ufromfpf128(float128(0.0), 0, 32));
+static_assert(float128(0.0) ==
+ LIBC_NAMESPACE::shared::ufromfpxf128(float128(0.0), 0, 32));
#endif // LIBC_TYPES_HAS_FLOAT128
@@ -176,5 +188,9 @@ static_assert(bfloat16(0.0) ==
static_assert(bfloat16(0.0) ==
LIBC_NAMESPACE::shared::fminimum_numbf16(bfloat16(0.0),
bfloat16(0.0)));
+static_assert(bfloat16(0.0) ==
+ LIBC_NAMESPACE::shared::ufromfpbf16(bfloat16(0.0), 0, 32));
+static_assert(bfloat16(0.0) ==
+ LIBC_NAMESPACE::shared::ufromfpxbf16(bfloat16(0.0), 0, 32));
TEST(LlvmLibcSharedMathTest, ConstantEvaluation) {}
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index a71cc858d8b21..4756079c03243 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -110,6 +110,8 @@ TEST(LlvmLibcSharedMathTest, AllFloat16) {
LIBC_NAMESPACE::shared::fmaximum_numf16(0.0f16, 0.0f16));
EXPECT_FP_EQ(0x0p+0f16,
LIBC_NAMESPACE::shared::fminimum_numf16(0.0f16, 0.0f16));
+ EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::ufromfpf16(0.0f16, 0, 32));
+ EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::ufromfpxf16(0.0f16, 0, 32));
}
#endif // LIBC_TYPES_HAS_FLOAT16
@@ -226,6 +228,8 @@ TEST(LlvmLibcSharedMathTest, AllFloat) {
EXPECT_FP_EQ(0x0p+0f, LIBC_NAMESPACE::shared::fminf(0.0f, 0.0f));
EXPECT_FP_EQ(0x0p+0f, LIBC_NAMESPACE::shared::fmaximum_numf(0.0f, 0.0f));
EXPECT_FP_EQ(0x0p+0f, LIBC_NAMESPACE::shared::fminimum_numf(0.0f, 0.0f));
+ EXPECT_FP_EQ(0x0p+0f, LIBC_NAMESPACE::shared::ufromfpf(0.0f, 0, 32));
+ EXPECT_FP_EQ(0x0p+0f, LIBC_NAMESPACE::shared::ufromfpxf(0.0f, 0, 32));
}
TEST(LlvmLibcSharedMathTest, AllDouble) {
@@ -318,6 +322,8 @@ TEST(LlvmLibcSharedMathTest, AllDouble) {
EXPECT_FP_EQ(0.0, LIBC_NAMESPACE::shared::fmin(0.0, 0.0));
EXPECT_FP_EQ(0.0, LIBC_NAMESPACE::shared::fmaximum_num(0.0, 0.0));
EXPECT_FP_EQ(0.0, LIBC_NAMESPACE::shared::fminimum_num(0.0, 0.0));
+ EXPECT_FP_EQ(0.0, LIBC_NAMESPACE::shared::ufromfp(0.0, 0, 32));
+ EXPECT_FP_EQ(0.0, LIBC_NAMESPACE::shared::ufromfpx(0.0, 0, 32));
}
// TODO: Enable the tests when double-double type is supported.
@@ -391,6 +397,8 @@ TEST(LlvmLibcSharedMathTest, AllLongDouble) {
EXPECT_FP_EQ(0x0p+0L, LIBC_NAMESPACE::shared::fminl(0.0L, 0.0L));
EXPECT_FP_EQ(0x0p+0L, LIBC_NAMESPACE::shared::fmaximum_numl(0.0L, 0.0L));
EXPECT_FP_EQ(0x0p+0L, LIBC_NAMESPACE::shared::fminimum_numl(0.0L, 0.0L));
+ EXPECT_FP_EQ(0x0p+0L, LIBC_NAMESPACE::shared::ufromfpl(0.0L, 0, 32));
+ EXPECT_FP_EQ(0x0p+0L, LIBC_NAMESPACE::shared::ufromfpxl(0.0L, 0, 32));
}
#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
@@ -509,6 +517,10 @@ TEST(LlvmLibcSharedMathTest, AllFloat128) {
float128(0.0), float128(0.0)));
EXPECT_FP_EQ(float128(0.0), LIBC_NAMESPACE::shared::fminimum_numf128(
float128(0.0), float128(0.0)));
+ EXPECT_FP_EQ(float128(0.0),
+ LIBC_NAMESPACE::shared::ufromfpf128(float128(0.0), 0, 32));
+ EXPECT_FP_EQ(float128(0.0),
+ LIBC_NAMESPACE::shared::ufromfpxf128(float128(0.0), 0, 32));
}
#endif // LIBC_TYPES_HAS_FLOAT128
@@ -590,4 +602,8 @@ TEST(LlvmLibcSharedMathTest, AllBFloat16) {
bfloat16(0.0), bfloat16(0.0)));
EXPECT_FP_EQ(bfloat16(0.0), LIBC_NAMESPACE::shared::fminimum_numbf16(
bfloat16(0.0), bfloat16(0.0)));
+ EXPECT_FP_EQ(bfloat16(0.0),
+ LIBC_NAMESPACE::shared::ufromfpbf16(bfloat16(0.0), 0, 32));
+ EXPECT_FP_EQ(bfloat16(0.0),
+ LIBC_NAMESPACE::shared::ufromfpxbf16(bfloat16(0.0), 0, 32));
}
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 652b0819fa31e..61c05f5199e01 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -7035,6 +7035,120 @@ libc_support_library(
],
)
+libc_support_library(
+ name = "__support_math_ufromfp",
+ hdrs = ["src/__support/math/ufromfp.h"],
+ deps = [
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ufromfpbf16",
+ hdrs = ["src/__support/math/ufromfpbf16.h"],
+ deps = [
+ ":__support_fputil_bfloat16",
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ufromfpf",
+ hdrs = ["src/__support/math/ufromfpf.h"],
+ deps = [
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ufromfpf128",
+ hdrs = ["src/__support/math/ufromfpf128.h"],
+ deps = [
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ":llvm_libc_types_float128",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ufromfpf16",
+ hdrs = ["src/__support/math/ufromfpf16.h"],
+ deps = [
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ":llvm_libc_macros_float16_macros",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ufromfpl",
+ hdrs = ["src/__support/math/ufromfpl.h"],
+ deps = [
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ufromfpx",
+ hdrs = ["src/__support/math/ufromfpx.h"],
+ deps = [
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ufromfpxbf16",
+ hdrs = ["src/__support/math/ufromfpxbf16.h"],
+ deps = [
+ ":__support_fputil_bfloat16",
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ufromfpxf",
+ hdrs = ["src/__support/math/ufromfpxf.h"],
+ deps = [
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ufromfpxf128",
+ hdrs = ["src/__support/math/ufromfpxf128.h"],
+ deps = [
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ":llvm_libc_types_float128",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ufromfpxf16",
+ hdrs = ["src/__support/math/ufromfpxf16.h"],
+ deps = [
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ":llvm_libc_macros_float16_macros",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ufromfpxl",
+ hdrs = ["src/__support/math/ufromfpxl.h"],
+ deps = [
+ ":__support_fputil_nearest_integer_operations",
+ ":__support_macros_config",
+ ],
+)
+
libc_support_library(
name = "__support_math_tanhf",
hdrs = ["src/__support/math/tanhf.h"],
@@ -9855,32 +9969,88 @@ libc_math_function(
],
)
-libc_math_function(name = "ufromfp")
+libc_math_function(
+ name = "ufromfp",
+ additional_deps = [
+ ":__support_math_ufromfp",
+ ],
+)
+
+libc_math_function(
+ name = "ufromfpbf16",
+ additional_deps = [
+ ":__support_math_ufromfpbf16",
+ ],
+)
-libc_math_function(name = "ufromfpf")
+libc_math_function(
+ name = "ufromfpf",
+ additional_deps = [
+ ":__support_math_ufromfpf",
+ ],
+)
-libc_math_function(name = "ufromfpl")
+libc_math_function(
+ name = "ufromfpl",
+ additional_deps = [
+ ":__support_math_ufromfpl",
+ ],
+)
libc_math_function(
name = "ufromfpf128",
+ additional_deps = [
+ ":__support_math_ufromfpf128",
+ ],
)
libc_math_function(
name = "ufromfpf16",
+ additional_deps = [
+ ":__support_math_ufromfpf16",
+ ],
)
-libc_math_function(name = "ufromfpx")
+libc_math_function(
+ name = "ufromfpx",
+ additional_deps = [
+ ":__support_math_ufromfpx",
+ ],
+)
-libc_math_function(name = "ufromfpxf")
+libc_math_function(
+ name = "ufromfpxbf16",
+ additional_deps = [
+ ":__support_math_ufromfpxbf16",
+ ],
+)
+
+libc_math_function(
+ name = "ufromfpxf",
+ additional_deps = [
+ ":__support_math_ufromfpxf",
+ ],
+)
-libc_math_function(name = "ufromfpxl")
+libc_math_function(
+ name = "ufromfpxl",
+ additional_deps = [
+ ":__support_math_ufromfpxl",
+ ],
+)
libc_math_function(
name = "ufromfpxf128",
+ additional_deps = [
+ ":__support_math_ufromfpxf128",
+ ],
)
libc_math_function(
name = "ufromfpxf16",
+ additional_deps = [
+ ":__support_math_ufromfpxf16",
+ ],
)
############################## inttypes targets ##############################
More information about the libc-commits
mailing list