Skip to content

Commit fef5e08

Browse files
committed
simplify conditional code for QUAD
1 parent b3bcc70 commit fef5e08

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

compiler-rt/lib/builtins/fp_lib.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,7 @@ static __inline fp_t __compiler_rt_fmax(fp_t x, fp_t y) {
369369
}
370370

371371
#elif defined(QUAD_PRECISION)
372-
#if defined(CRT_HAS_TF_MODE)
373-
#if defined(CRT_HAS_IEEE_TF)
372+
#if defined(CRT_HAS_IEEE_TF) && defined(CRT_HAS_INT128)
374373
// The generic implementation only works for ieee754 floating point. For other
375374
// floating point types, continue to rely on the libm implementation for now.
376375
static __inline tf_float __compiler_rt_logbtf(tf_float x) {
@@ -387,9 +386,6 @@ static __inline tf_float __compiler_rt_fmaxtf(tf_float x, tf_float y) {
387386
#define __compiler_rt_fmaxl __compiler_rt_fmaxtf
388387
#define crt_fabstf crt_fabsf128
389388
#define crt_copysigntf crt_copysignf128
390-
#else
391-
#error Unsupported TF mode type
392-
#endif
393389
#elif defined(CRT_LDBL_128BIT)
394390
static __inline tf_float __compiler_rt_logbtf(tf_float x) {
395391
return crt_logbl(x);
@@ -405,6 +401,8 @@ static __inline tf_float __compiler_rt_fmaxtf(tf_float x, tf_float y) {
405401
#define __compiler_rt_fmaxl crt_fmaxl
406402
#define crt_fabstf crt_fabsl
407403
#define crt_copysigntf crt_copysignl
404+
#else
405+
#error Unsupported QUAD_PRECISION mode
408406
#endif
409407

410408
#endif // *_PRECISION

0 commit comments

Comments
 (0)