[libc-commits] [libc] [libc] Modify `fromfpf128`, `fromfpxf128`, `ufromfpf128` and `ufromfpxf128` to use emulated Float128 type (PR #216578)

via libc-commits libc-commits at lists.llvm.org
Wed Aug 19 10:44:11 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Zorojuro (Sukumarsawant)

<details>
<summary>Changes</summary>



---

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


38 Files Affected:

- (modified) libc/config/baremetal/aarch64/entrypoints.txt (+4-4) 
- (modified) libc/config/baremetal/arm/entrypoints.txt (+4-4) 
- (modified) libc/config/baremetal/riscv/entrypoints.txt (+4-4) 
- (modified) libc/config/darwin/aarch64/entrypoints.txt (+4-4) 
- (modified) libc/config/darwin/x86_64/entrypoints.txt (+4) 
- (modified) libc/config/freebsd/x86_64/entrypoints.txt (+4-4) 
- (modified) libc/config/gpu/amdgpu/entrypoints.txt (+4) 
- (modified) libc/config/gpu/nvptx/entrypoints.txt (+4) 
- (modified) libc/config/linux/aarch64/entrypoints.txt (+4-4) 
- (modified) libc/config/linux/arm/entrypoints.txt (+4) 
- (modified) libc/config/linux/riscv/entrypoints.txt (+4-4) 
- (modified) libc/config/linux/x86_64/entrypoints.txt (+4-4) 
- (modified) libc/config/windows/entrypoints.txt (+4) 
- (modified) libc/shared/math/fromfpf128.h (-6) 
- (modified) libc/shared/math/fromfpxf128.h (-6) 
- (modified) libc/shared/math/ufromfpf128.h (-6) 
- (modified) libc/shared/math/ufromfpxf128.h (-6) 
- (modified) libc/src/__support/math/CMakeLists.txt (+4-4) 
- (modified) libc/src/__support/math/fromfpf128.h (+4-7) 
- (modified) libc/src/__support/math/fromfpxf128.h (+4-7) 
- (modified) libc/src/__support/math/ufromfpf128.h (+4-7) 
- (modified) libc/src/__support/math/ufromfpxf128.h (+4-7) 
- (modified) libc/src/math/fromfpf128.h (+5) 
- (modified) libc/src/math/fromfpxf128.h (+5) 
- (modified) libc/src/math/generic/CMakeLists.txt (+4) 
- (modified) libc/src/math/generic/fromfpf128.cpp (+5-1) 
- (modified) libc/src/math/generic/fromfpxf128.cpp (+5-1) 
- (modified) libc/src/math/generic/ufromfpf128.cpp (+5-1) 
- (modified) libc/src/math/generic/ufromfpxf128.cpp (+5-1) 
- (modified) libc/src/math/ufromfpf128.h (+5) 
- (modified) libc/src/math/ufromfpxf128.h (+5) 
- (modified) libc/test/shared/shared_math_constexpr_test.cpp (+9-9) 
- (modified) libc/test/shared/shared_math_test.cpp (+8-8) 
- (modified) libc/test/src/math/smoke/CMakeLists.txt (+4) 
- (modified) libc/test/src/math/smoke/fromfpf128_test.cpp (+5) 
- (modified) libc/test/src/math/smoke/fromfpxf128_test.cpp (+5) 
- (modified) libc/test/src/math/smoke/ufromfpf128_test.cpp (+5) 
- (modified) libc/test/src/math/smoke/ufromfpxf128_test.cpp (+5) 


``````````diff
diff --git a/libc/config/baremetal/aarch64/entrypoints.txt b/libc/config/baremetal/aarch64/entrypoints.txt
index 81958d224f70d..7dbb77a5e2ab5 100644
--- a/libc/config/baremetal/aarch64/entrypoints.txt
+++ b/libc/config/baremetal/aarch64/entrypoints.txt
@@ -456,9 +456,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.frexpl
     libc.src.math.fromfp
     libc.src.math.fromfpf
+    libc.src.math.fromfpf128
     libc.src.math.fromfpl
     libc.src.math.fromfpx
     libc.src.math.fromfpxf
+    libc.src.math.fromfpxf128
     libc.src.math.fromfpxl
     libc.src.math.fsqrt
     libc.src.math.fsqrtl
@@ -583,9 +585,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.truncl
     libc.src.math.ufromfp
     libc.src.math.ufromfpf
+    libc.src.math.ufromfpf128
     libc.src.math.ufromfpl
     libc.src.math.ufromfpx
     libc.src.math.ufromfpxf
+    libc.src.math.ufromfpxf128
     libc.src.math.ufromfpxl
 )
 
@@ -759,8 +763,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.fmodf128
     libc.src.math.fmulf128
     libc.src.math.frexpf128
-    libc.src.math.fromfpf128
-    libc.src.math.fromfpxf128
     libc.src.math.fsqrtf128
     libc.src.math.fsubf128
     libc.src.math.getpayloadf128
@@ -794,8 +796,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.totalorderf128
     libc.src.math.totalordermagf128
     libc.src.math.truncf128
-    libc.src.math.ufromfpf128
-    libc.src.math.ufromfpxf128
   )
 endif()
 
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index ee3ec63132cc2..6165549db93d8 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -468,9 +468,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.frexpl
     libc.src.math.fromfp
     libc.src.math.fromfpf
+    libc.src.math.fromfpf128
     libc.src.math.fromfpl
     libc.src.math.fromfpx
     libc.src.math.fromfpxf
+    libc.src.math.fromfpxf128
     libc.src.math.fromfpxl
     libc.src.math.fsqrt
     libc.src.math.fsqrtl
@@ -595,9 +597,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.truncl
     libc.src.math.ufromfp
     libc.src.math.ufromfpf
+    libc.src.math.ufromfpf128
     libc.src.math.ufromfpl
     libc.src.math.ufromfpx
     libc.src.math.ufromfpxf
+    libc.src.math.ufromfpxf128
     libc.src.math.ufromfpxl
 )
 
@@ -770,8 +774,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.fmodf128
     libc.src.math.fmulf128
     libc.src.math.frexpf128
-    libc.src.math.fromfpf128
-    libc.src.math.fromfpxf128
     libc.src.math.fsqrtf128
     libc.src.math.fsubf128
     libc.src.math.getpayloadf128
@@ -805,8 +807,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.totalorderf128
     libc.src.math.totalordermagf128
     libc.src.math.truncf128
-    libc.src.math.ufromfpf128
-    libc.src.math.ufromfpxf128
   )
 endif()
 
diff --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index c9f7c042bf4a8..2a4c62a34a022 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -464,9 +464,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.frexpl
     libc.src.math.fromfp
     libc.src.math.fromfpf
+    libc.src.math.fromfpf128
     libc.src.math.fromfpl
     libc.src.math.fromfpx
     libc.src.math.fromfpxf
+    libc.src.math.fromfpxf128
     libc.src.math.fromfpxl
     libc.src.math.fsqrt
     libc.src.math.fsqrtl
@@ -591,9 +593,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.truncl
     libc.src.math.ufromfp
     libc.src.math.ufromfpf
+    libc.src.math.ufromfpf128
     libc.src.math.ufromfpl
     libc.src.math.ufromfpx
     libc.src.math.ufromfpxf
+    libc.src.math.ufromfpxf128
     libc.src.math.ufromfpxl
 )
 
@@ -767,8 +771,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     # libc.src.math.fmodf128
     libc.src.math.fmulf128
     libc.src.math.frexpf128
-    libc.src.math.fromfpf128
-    libc.src.math.fromfpxf128
     libc.src.math.fsqrtf128
     libc.src.math.fsubf128
     libc.src.math.getpayloadf128
@@ -802,8 +804,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.totalorderf128
     libc.src.math.totalordermagf128
     libc.src.math.truncf128
-    libc.src.math.ufromfpf128
-    libc.src.math.ufromfpxf128
   )
 endif()
 
diff --git a/libc/config/darwin/aarch64/entrypoints.txt b/libc/config/darwin/aarch64/entrypoints.txt
index 0ca00419a916c..de22d6dc77454 100644
--- a/libc/config/darwin/aarch64/entrypoints.txt
+++ b/libc/config/darwin/aarch64/entrypoints.txt
@@ -275,9 +275,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.frexpl
     libc.src.math.fromfp
     libc.src.math.fromfpf
+    libc.src.math.fromfpf128
     libc.src.math.fromfpl
     libc.src.math.fromfpx
     libc.src.math.fromfpxf
+    libc.src.math.fromfpxf128
     libc.src.math.fromfpxl
     libc.src.math.fsqrt
     libc.src.math.fsqrtl
@@ -403,9 +405,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.truncl
     libc.src.math.ufromfp
     libc.src.math.ufromfpf
+    libc.src.math.ufromfpf128
     libc.src.math.ufromfpl
     libc.src.math.ufromfpx
     libc.src.math.ufromfpxf
+    libc.src.math.ufromfpxf128
     libc.src.math.ufromfpxl
 )
 
@@ -579,8 +583,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.fmodf128
     libc.src.math.fmulf128
     libc.src.math.frexpf128
-    libc.src.math.fromfpf128
-    libc.src.math.fromfpxf128
     libc.src.math.fsqrtf128
     libc.src.math.fsubf128
     libc.src.math.getpayloadf128
@@ -614,8 +616,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.totalorderf128
     libc.src.math.totalordermagf128
     libc.src.math.truncf128
-    libc.src.math.ufromfpf128
-    libc.src.math.ufromfpxf128
   )
 endif()
 
diff --git a/libc/config/darwin/x86_64/entrypoints.txt b/libc/config/darwin/x86_64/entrypoints.txt
index 136d5a458d484..44b923cd94b95 100644
--- a/libc/config/darwin/x86_64/entrypoints.txt
+++ b/libc/config/darwin/x86_64/entrypoints.txt
@@ -162,6 +162,8 @@ set(TARGET_LIBM_ENTRYPOINTS
     #libc.src.math.frexp
     #libc.src.math.frexpf
     #libc.src.math.frexpl
+    #libc.src.math.fromfpf128
+    #libc.src.math.fromfpxf128
     #libc.src.math.fsub
     #libc.src.math.fsubl
     #libc.src.math.hypot
@@ -232,6 +234,8 @@ set(TARGET_LIBM_ENTRYPOINTS
     #libc.src.math.trunc
     #libc.src.math.truncf
     #libc.src.math.truncl
+    #libc.src.math.ufromfpf128
+    #libc.src.math.ufromfpxf128
 )
 
 list(APPEND TARGET_LIBM_ENTRYPOINTS
diff --git a/libc/config/freebsd/x86_64/entrypoints.txt b/libc/config/freebsd/x86_64/entrypoints.txt
index 2223504718444..c4daffa37617c 100644
--- a/libc/config/freebsd/x86_64/entrypoints.txt
+++ b/libc/config/freebsd/x86_64/entrypoints.txt
@@ -206,6 +206,8 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.frexp
     libc.src.math.frexpf
     libc.src.math.frexpl
+    libc.src.math.fromfpf128
+    libc.src.math.fromfpxf128
     libc.src.math.fsub
     libc.src.math.fsubl
     libc.src.math.hypot
@@ -288,6 +290,8 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.trunc
     libc.src.math.truncf
     libc.src.math.truncl
+    libc.src.math.ufromfpf128
+    libc.src.math.ufromfpxf128
 )
 
 list(APPEND TARGET_LIBM_ENTRYPOINTS
@@ -518,8 +522,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.fmodf128
     libc.src.math.fmulf128
     libc.src.math.frexpf128
-    libc.src.math.fromfpf128
-    libc.src.math.fromfpxf128
     libc.src.math.fsqrtf128
     libc.src.math.fsubf128
     libc.src.math.getpayloadf128
@@ -552,8 +554,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.totalorderf128
     libc.src.math.totalordermagf128
     libc.src.math.truncf128
-    libc.src.math.ufromfpf128
-    libc.src.math.ufromfpxf128
   )
 endif()
 
diff --git a/libc/config/gpu/amdgpu/entrypoints.txt b/libc/config/gpu/amdgpu/entrypoints.txt
index 12783aa4e5316..7a322e764e6a0 100644
--- a/libc/config/gpu/amdgpu/entrypoints.txt
+++ b/libc/config/gpu/amdgpu/entrypoints.txt
@@ -403,9 +403,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.frexpl
     libc.src.math.fromfp
     libc.src.math.fromfpf
+    libc.src.math.fromfpf128
     libc.src.math.fromfpl
     libc.src.math.fromfpx
     libc.src.math.fromfpxf
+    libc.src.math.fromfpxf128
     libc.src.math.fromfpxl
     libc.src.math.fsqrt
     libc.src.math.fsqrtl
@@ -529,9 +531,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.truncl
     libc.src.math.ufromfp
     libc.src.math.ufromfpf
+    libc.src.math.ufromfpf128
     libc.src.math.ufromfpl
     libc.src.math.ufromfpx
     libc.src.math.ufromfpxf
+    libc.src.math.ufromfpxf128
     libc.src.math.ufromfpxl
 )
 
diff --git a/libc/config/gpu/nvptx/entrypoints.txt b/libc/config/gpu/nvptx/entrypoints.txt
index 5820448e06663..504c0752356d1 100644
--- a/libc/config/gpu/nvptx/entrypoints.txt
+++ b/libc/config/gpu/nvptx/entrypoints.txt
@@ -400,9 +400,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     # FIXME: Broken.
     # libc.src.math.fromfp
     # libc.src.math.fromfpf
+    #libc.src.math.fromfpf128
     # libc.src.math.fromfpl
     # libc.src.math.fromfpx
     # libc.src.math.fromfpxf
+    #libc.src.math.fromfpxf128
     # libc.src.math.fromfpxl
     libc.src.math.fsqrt
     libc.src.math.fsqrtl
@@ -527,9 +529,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     # FIXME: Broken.
     # libc.src.math.ufromfp
     # libc.src.math.ufromfpf
+    #libc.src.math.ufromfpf128
     # libc.src.math.ufromfpl
     # libc.src.math.ufromfpx
     # libc.src.math.ufromfpxf
+    #libc.src.math.ufromfpxf128
     # libc.src.math.ufromfpxl
 )
 
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 071a7830b43d3..3a3665036e290 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -609,9 +609,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.frexpl
     libc.src.math.fromfp
     libc.src.math.fromfpf
+    libc.src.math.fromfpf128
     libc.src.math.fromfpl
     libc.src.math.fromfpx
     libc.src.math.fromfpxf
+    libc.src.math.fromfpxf128
     libc.src.math.fromfpxl
     libc.src.math.fsqrt
     libc.src.math.fsqrtl
@@ -737,9 +739,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.truncl
     libc.src.math.ufromfp
     libc.src.math.ufromfpf
+    libc.src.math.ufromfpf128
     libc.src.math.ufromfpl
     libc.src.math.ufromfpx
     libc.src.math.ufromfpxf
+    libc.src.math.ufromfpxf128
     libc.src.math.ufromfpxl
 )
 
@@ -906,8 +910,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.fmodf128
     libc.src.math.fmulf128
     libc.src.math.frexpf128
-    libc.src.math.fromfpf128
-    libc.src.math.fromfpxf128
     libc.src.math.fsqrtf128
     libc.src.math.fsubf128
     libc.src.math.getpayloadf128
@@ -941,8 +943,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.totalorderf128
     libc.src.math.totalordermagf128
     libc.src.math.truncf128
-    libc.src.math.ufromfpf128
-    libc.src.math.ufromfpxf128
   )
 endif()
 
diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index 1adbb04bb4cbe..2dd3dd00f8174 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -441,9 +441,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.frexpl
     libc.src.math.fromfp
     libc.src.math.fromfpf
+    libc.src.math.fromfpf128
     libc.src.math.fromfpl
     libc.src.math.fromfpx
     libc.src.math.fromfpxf
+    libc.src.math.fromfpxf128
     libc.src.math.fromfpxl
     libc.src.math.fsub
     libc.src.math.fsubl
@@ -554,9 +556,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.truncl
     libc.src.math.ufromfp
     libc.src.math.ufromfpf
+    libc.src.math.ufromfpf128
     libc.src.math.ufromfpl
     libc.src.math.ufromfpx
     libc.src.math.ufromfpxf
+    libc.src.math.ufromfpxf128
     libc.src.math.ufromfpxl
 )
 
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 66dd9dd790737..f87bb6575d1f6 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -682,9 +682,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.frexpl
     libc.src.math.fromfp
     libc.src.math.fromfpf
+    libc.src.math.fromfpf128
     libc.src.math.fromfpl
     libc.src.math.fromfpx
     libc.src.math.fromfpxf
+    libc.src.math.fromfpxf128
     libc.src.math.fromfpxl
     libc.src.math.fsqrt
     libc.src.math.fsqrtl
@@ -810,9 +812,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.truncl
     libc.src.math.ufromfp
     libc.src.math.ufromfpf
+    libc.src.math.ufromfpf128
     libc.src.math.ufromfpl
     libc.src.math.ufromfpx
     libc.src.math.ufromfpxf
+    libc.src.math.ufromfpxf128
     libc.src.math.ufromfpxl
 )
 
@@ -996,8 +1000,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.fmodf128
     libc.src.math.fmulf128
     libc.src.math.frexpf128
-    libc.src.math.fromfpf128
-    libc.src.math.fromfpxf128
     libc.src.math.fsqrtf128
     libc.src.math.fsubf128
     libc.src.math.getpayloadf128
@@ -1031,8 +1033,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.totalorderf128
     libc.src.math.totalordermagf128
     libc.src.math.truncf128
-    libc.src.math.ufromfpf128
-    libc.src.math.ufromfpxf128
   )
 endif()
 
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 6045886c2f11c..4daee6da955bb 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -687,9 +687,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.frexpl
     libc.src.math.fromfp
     libc.src.math.fromfpf
+    libc.src.math.fromfpf128
     libc.src.math.fromfpl
     libc.src.math.fromfpx
     libc.src.math.fromfpxf
+    libc.src.math.fromfpxf128
     libc.src.math.fromfpxl
     libc.src.math.fsqrt
     libc.src.math.fsqrtl
@@ -815,9 +817,11 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.truncl
     libc.src.math.ufromfp
     libc.src.math.ufromfpf
+    libc.src.math.ufromfpf128
     libc.src.math.ufromfpl
     libc.src.math.ufromfpx
     libc.src.math.ufromfpxf
+    libc.src.math.ufromfpxf128
     libc.src.math.ufromfpxl
 )
 
@@ -1001,8 +1005,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.fmodf128
     libc.src.math.fmulf128
     libc.src.math.frexpf128
-    libc.src.math.fromfpf128
-    libc.src.math.fromfpxf128
     libc.src.math.fsqrtf128
     libc.src.math.fsubf128
     libc.src.math.getpayloadf128
@@ -1036,8 +1038,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
     libc.src.math.totalorderf128
     libc.src.math.totalordermagf128
     libc.src.math.truncf128
-    libc.src.math.ufromfpf128
-    libc.src.math.ufromfpxf128
   )
 endif()
 
diff --git a/libc/config/windows/entrypoints.txt b/libc/config/windows/entrypoints.txt
index 142b83e71efe6..9765d1c00f21d 100644
--- a/libc/config/windows/entrypoints.txt
+++ b/libc/config/windows/entrypoints.txt
@@ -239,6 +239,8 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.frexp
     libc.src.math.frexpf
     libc.src.math.frexpl
+    libc.src.math.fromfpf128
+    libc.src.math.fromfpxf128
     libc.src.math.fsub
     libc.src.math.fsubl
     libc.src.math.hypot
@@ -322,6 +324,8 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.trunc
     libc.src.math.truncf
     libc.src.math.truncl
+    libc.src.math.ufromfpf128
+    libc.src.math.ufromfpxf128
 )
 
 list(APPEND TARGET_LIBM_ENTRYPOINTS
diff --git a/libc/shared/math/fromfpf128.h b/libc/shared/math/fromfpf128.h
index a0e5085de11aa..ff777ccd90f89 100644
--- a/libc/shared/math/fromfpf128.h
+++ b/libc/shared/math/fromfpf128.h
@@ -9,10 +9,6 @@
 #ifndef LLVM_LIBC_SHARED_MATH_FROMFPF128_H
 #define LLVM_LIBC_SHARED_MATH_FROMFPF128_H
 
-#include "include/llvm-libc-types/float128.h"
-
-#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
-
 #include "shared/libc_common.h"
 #include "src/__support/math/fromfpf128.h"
 
@@ -24,6 +20,4 @@ using math::fromfpf128;
 } // namespace shared
 } // namespace LIBC_NAMESPACE_DECL
 
-#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-
 #endif // LLVM_LIBC_SHARED_MATH_FROMFPF128_H
diff --git a/libc/shared/math/fromfpxf128.h b/libc/shared/math/fromfpxf128.h
index 1f1aba101d1bf..6c6ef6f13e49b 100644
--- a/libc/shared/math/fromfpxf128.h
+++ b/libc/shared/math/fromfpxf128.h
@@ -9,10 +9,6 @@
 #ifndef LLVM_LIBC_SHARED_MATH_FROMFPXF128_H
 #define LLVM_LIBC_SHARED_MATH_FROMFPXF128_H
 
-#include "include/llvm-libc-types/float128.h"
-
-#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
-
 #include "shared/libc_common.h"
 #include "src/__support/math/fromfpxf128.h"
 
@@ -24,6 +20,4 @@ using math::fromfpxf128;
 } // namespace shared
 } // namespace LIBC_NAMESPACE_DECL
 
-#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-
 #endif // LLVM_LIBC_SHARED_MATH_FROMFPXF128_H
diff --git a/libc/shared/math/ufromfpf128.h b/libc/shared/math/ufromfpf128.h
index 91195943c1e2e..25cf54d18dd41 100644
--- a/libc/shared/math/ufromfpf128.h
+++ b/libc/shared/math/ufromfpf128.h
@@ -9,10 +9,6 @@
 #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_NATIVE_FLOAT128
-
 #include "shared/libc_common.h"
 #include "src/__support/math/ufromfpf128.h"
 
@@ -24,6 +20,4 @@ using math::ufromfpf128;
 } // namespace shared
 } // namespace LIBC_NAMESPACE_DECL
 
-#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-
 #endif // LLVM_LIBC_SHARED_MATH_UFROMFPF128_H
diff --git a/libc/shared/math/ufromfpxf128.h b/libc/shared/math/ufromfpxf128.h
index 4be803c60877a..08dcb96ba0445 100644
--- a/libc/shared/math/ufromfpxf128.h
+++ b/libc/shared/math/ufromfpxf128.h
@@ -9,10 +9,6 @@
 #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_NATIVE_FLOAT128
-
 #include "shared/libc_common.h"
 #include "src/__support/math/ufromfpxf128.h"
 
@@ -24,6 +20,4 @@ using math::ufromfpxf128;
 } // namespace shared
 } // namespace LIBC_NAMESPACE_DECL
 
-#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-
 #endif // LLVM_LIBC_SHARED_MATH_UFROMFPXF128_H
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index db514db61a9df..7b9f333032998 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -1540,7 +1540,7 @@ add_header_library(
   HDRS
     fromfpf128.h
   DEPENDS
-    libc.include.llvm-libc-types.float128
+    libc.src.__support.FPUtil.float128
     libc.src.__support.FPUtil.nearest_integer_operations
     libc.src.__support.macros.config
 )
@@ -1597,7 +1597,7 @@ add_header_library(
   HDRS
     fromfpxf128.h
   DEPENDS
-    libc.include.llvm-libc-types.float128
+    libc.src.__support.FPUtil.float128
     libc.src.__support.FPUtil.nearest_integer_operations
     libc.src.__support.macros.config
 )
@@ -5763,7 +5763,7 @@ add_header_library(
   HDRS
     ufromfpf128.h
   DEPENDS
-    libc.include.llvm-libc-types.float128
+    libc.src.__support.FPUtil.float128
     libc.src.__support.FPUtil.nearest_integer_operations
     libc.src.__support.macros.config
 )
@@ -5820,7 +5820,7 @@ add_header_library(
   HDRS
     ufromfpxf128.h
   DEPENDS
-    libc.include.llvm-libc-types.float128
+    libc.src.__support.FPUtil.float128
     libc.src.__support.FPUtil.nearest_integer_operations
     libc.src.__support.macros.config
 )
diff --git a/libc/src/__support/math/fromfpf128.h b/libc/src/__support/math/fromfpf128.h
index 3415ce8e51f98..cbafd3c6b322f 100644
--- a/libc/src/__support/math/fromfpf128.h
+++ b/libc/src/__support/math/fromfpf128.h
@@ -9,17 +9,16 @@
 #ifndef LLVM_LIBC_SRC___SUPPORT_MATH_FROMFPF128_H
 #define LLVM_LIBC_SRC___SUPPORT_MATH_FROMFPF128_H
 
-#include "include/llvm-libc-types/float128.h"
-
-#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
-
 #include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/FPUtil/float128.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 namespace math {
 
-LIBC_INLINE constexpr float128 fromfpf128(float128 x, int rnd,
+using LIBC_NAMESPACE::fputil::Float128;
+
+LIBC_INLINE constexpr Float128 fromfpf128(Float128 x, int rnd,
                                           unsigned int width) {
   return fputil::fromfp</*IsSigned=*/true>(x, rnd, width);
 }
@@ -27,6 +26,4 @@ LIBC_INLINE constexpr float128 fromfpf128(float128 x, int rnd,
 } // namespace math
 } // namespace LIBC_NAMESPACE_DECL
 
-#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-
 #endif // LLVM_LIBC_SRC___SUPPORT_MATH_FROMFPF128_H
di...
[truncated]

``````````

</details>


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


More information about the libc-commits mailing list