================
@@ -189,11 +189,15 @@ typedef long double tf_float;
 #define CRT_LDBL_IEEE_F128
 #endif
 #define TF_C(x) x##L
-#elif __LDBL_MANT_DIG__ == 113
-// Use long double instead of __float128 if it matches the IEEE 128-bit format.
+#elif __LDBL_MANT_DIG__ == 113 ||                                              
\
+    (__FLT_RADIX__ == 16 && __LDBL_MANT_DIG__ == 28)
+// Use long double instead of __float128 if it matches the IEEE 128-bit format
+// or the IBM hexadecimal format.
 #define CRT_LDBL_128BIT
+#if __LDBL_MANT_DIG__ == 113
 #define CRT_HAS_F128
 #define CRT_HAS_IEEE_TF
+#endif
 #define CRT_LDBL_IEEE_F128
----------------
arichardson wrote:

```suggestion
#define CRT_LDBL_128BIT
#define CRT_HAS_F128
#if __LDBL_MANT_DIG__ == 113
#define CRT_HAS_IEEE_TF
#define CRT_LDBL_IEEE_F128
#endif
```

I was suggesting to not define the tf_float is IEEE macros, CRT_HAS_F128 should 
still be set since we do have a 128-bit floating point type.

https://github.com/llvm/llvm-project/pull/77554
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to