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

via libc-commits libc-commits at lists.llvm.org
Sat Sep 12 08:22:50 PDT 2026


Author: Zorojuro
Date: 2026-09-12T20:52:45+05:30
New Revision: 1ae00a52bbe432ff8174664ce28fb33cc600f6f0

URL: https://github.com/llvm/llvm-project/commit/1ae00a52bbe432ff8174664ce28fb33cc600f6f0
DIFF: https://github.com/llvm/llvm-project/commit/1ae00a52bbe432ff8174664ce28fb33cc600f6f0.diff

LOG: [libc] Enable Float80-type for x86_32 (#221408)

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

Added: 
    

Modified: 
    libc/src/__support/FPUtil/float80.h

Removed: 
    


################################################################################
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;


        


More information about the libc-commits mailing list