[compiler-rt] [builtins] Generate __multc3 for z/OS (PR #77554)
Sean Perry via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 10:37:14 PST 2024
================
@@ -189,8 +189,10 @@ 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
#define CRT_HAS_F128
#define CRT_HAS_IEEE_TF
----------------
perry-ca wrote:
The CRT_HAS_F128 needs to be defined for hex float too. The Qcomplex and COMPLEXTF_REAL/COMPLEXTF_IMAGINARY ids are only defined if CRT_HAS_F128 is defined and multc3.c/divtc3.c depend on those.
I agree with CRT_HAS_IEEE_TF. This should also only be defined if CRT_HAS_TF_MODE is defined.
https://github.com/llvm/llvm-project/pull/77554
More information about the llvm-commits
mailing list