Skip to content

Commit 1bcdabe

Browse files
vitalybukajustinfargnoli
authored andcommitted
Revert "[builtins] Generate __multc3 for z/OS" (llvm#77881)
Reverts llvm#77554 because of llvm#77880
1 parent 055da68 commit 1bcdabe

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

compiler-rt/lib/builtins/divtc3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define QUAD_PRECISION
1414
#include "fp_lib.h"
1515

16-
#if defined(CRT_HAS_F128)
16+
#if defined(CRT_HAS_TF_MODE)
1717

1818
// Returns: the quotient of (a + ib) / (c + id)
1919

compiler-rt/lib/builtins/fp_lib.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ static __inline void wideMultiply(rep_t a, rep_t b, rep_t *hi, rep_t *lo) {
188188
#undef Word_HiMask
189189
#undef Word_LoMask
190190
#undef Word_FullMask
191-
#else
192-
typedef long double fp_t;
193191
#endif // defined(CRT_HAS_TF_MODE)
194192
#else
195193
#error SINGLE_PRECISION, DOUBLE_PRECISION or QUAD_PRECISION must be defined.
@@ -376,10 +374,10 @@ static __inline fp_t __compiler_rt_fmax(fp_t x, fp_t y) {
376374
#endif
377375
}
378376

379-
#elif defined(QUAD_PRECISION)
377+
#elif defined(QUAD_PRECISION) && defined(CRT_HAS_TF_MODE)
380378
// The generic implementation only works for ieee754 floating point. For other
381379
// floating point types, continue to rely on the libm implementation for now.
382-
#if defined(CRT_HAS_IEEE_TF) && defined(CRT_HAS_128BIT)
380+
#if defined(CRT_HAS_IEEE_TF)
383381
static __inline tf_float __compiler_rt_logbtf(tf_float x) {
384382
return __compiler_rt_logbX(x);
385383
}
@@ -407,8 +405,6 @@ static __inline tf_float __compiler_rt_fmaxtf(tf_float x, tf_float y) {
407405
#define __compiler_rt_logbl crt_logbl
408406
#define __compiler_rt_scalbnl crt_scalbnl
409407
#define __compiler_rt_fmaxl crt_fmaxl
410-
#define crt_fabstf crt_fabsl
411-
#define crt_copysigntf crt_copysignl
412408
#else
413409
#error Unsupported TF mode type
414410
#endif

compiler-rt/lib/builtins/int_types.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,12 @@ typedef long double tf_float;
189189
#define CRT_LDBL_IEEE_F128
190190
#endif
191191
#define TF_C(x) x##L
192-
#elif __LDBL_MANT_DIG__ == 113 || \
193-
(__FLT_RADIX__ == 16 && __LDBL_MANT_DIG__ == 28)
194-
// Use long double instead of __float128 if it matches the IEEE 128-bit format
195-
// or the IBM hexadecimal format.
192+
#elif __LDBL_MANT_DIG__ == 113
193+
// Use long double instead of __float128 if it matches the IEEE 128-bit format.
196194
#define CRT_LDBL_128BIT
197195
#define CRT_HAS_F128
198-
#if __LDBL_MANT_DIG__ == 113
199196
#define CRT_HAS_IEEE_TF
200197
#define CRT_LDBL_IEEE_F128
201-
#endif
202198
typedef long double tf_float;
203199
#define TF_C(x) x##L
204200
#elif defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)

compiler-rt/lib/builtins/multc3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "int_lib.h"
1616
#include "int_math.h"
1717

18-
#if defined(CRT_HAS_F128)
18+
#if defined(CRT_HAS_TF_MODE)
1919

2020
// Returns: the product of a + ib and c + id
2121

0 commit comments

Comments
 (0)