diff options
Diffstat (limited to 'stdlib/tst-strtod-round-skeleton.c')
-rw-r--r-- | stdlib/tst-strtod-round-skeleton.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/stdlib/tst-strtod-round-skeleton.c b/stdlib/tst-strtod-round-skeleton.c index 1a9f663878..763c9ce983 100644 --- a/stdlib/tst-strtod-round-skeleton.c +++ b/stdlib/tst-strtod-round-skeleton.c @@ -92,9 +92,27 @@ /* Add type specific choosing macros below. */ #define CHOOSE_f(f,...) f +#define CHOOSE_f32(f,...) f #define CHOOSE_d(f,d,...) d +#define CHOOSE_f64(f,d,...) d +#define CHOOSE_f32x(f,d,...) d #define CHOOSE_f128(f,d,ld64i,ld64m,ld106,ld113,...) ld113 -/* long double is special, and handled above. */ +/* long double is special, and handled above. _Float16 would require + updates to the generator to generate appropriate expectations, and + updates to the test inputs to cover difficult rounding cases for + _Float16. */ + +#if __HAVE_FLOAT64X +# if FLT64X_MANT_DIG == 113 && FLT64X_MAX_EXP == 16384 +# define CHOOSE_f64x(f,d,ld64i,ld64m,ld106,ld113,...) ld113 +# elif (FLT64X_MANT_DIG == 64 \ + && FLT64X_MAX_EXP == 16384 \ + && FLT64X_MIN_EXP == -16381) +# define CHOOSE_f64x(f,d,ld64i,...) ld64i +# else +# error "unknown _Float64x format" +# endif +#endif /* Selector for expected result field of a given type. */ #define _ENTRY(FSUF, FTYPE, FTOSTR, LSUF, CSUF, ...) \ |