[libc-commits] [libc] [libc] Enable Float80-type for x86_32 (PR #221408)

via libc-commits libc-commits at lists.llvm.org
Sat Sep 5 00:02:59 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Zorojuro (Sukumarsawant)

<details>
<summary>Changes</summary>

Enables for x86_32 by using Uint<96> 
```CPP
struct Float80 {
  #if __SIZEOF_LONG_DOUBLE__ == 12
    UInt<96> bits;
  #else
    UInt128 bits;
  #endif
 ```
for testing it on x86_32 
it needs -m32 and --msse2 extra flags other than your usual cmake for x86_32

---
Full diff: https://github.com/llvm/llvm-project/pull/221408.diff


1 Files Affected:

- (modified) libc/src/__support/FPUtil/float80.h (+4-1) 


``````````diff
diff --git a/libc/src/__support/FPUtil/float80.h b/libc/src/__support/FPUtil/float80.h
index 25c7ba9251a96..c0bc40cd6c1aa 100644
--- a/libc/src/__support/FPUtil/float80.h
+++ b/libc/src/__support/FPUtil/float80.h
@@ -26,8 +26,11 @@ namespace LIBC_NAMESPACE_DECL {
 namespace fputil {
 
 struct Float80 {
+#if __SIZEOF_LONG_DOUBLE__ == 12
+  UInt<96> bits;
+#else
   UInt128 bits;
-
+#endif
   LIBC_INLINE Float80() = default;
   LIBC_INLINE constexpr Float80(const Float80 &) = default;
   LIBC_INLINE constexpr Float80(Float80 &&) = default;

``````````

</details>


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


More information about the libc-commits mailing list