diff options
author | Gabriel F. T. Gomes <gabrielftg@linux.ibm.com> | 2019-06-27 17:43:44 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabrielftg@linux.ibm.com> | 2019-06-27 17:51:59 -0300 |
commit | 1626f499d159f17d5d99dc41497b52074f3850df (patch) | |
tree | dd408298c1a3b38707ce77e3b0cebae505c156c0 /ChangeLog | |
parent | a620bd7935c4b2dc94e472e62bd9a5c9434ea7b7 (diff) | |
download | glibc-1626f499d159f17d5d99dc41497b52074f3850df.tar.gz glibc-1626f499d159f17d5d99dc41497b52074f3850df.tar.xz glibc-1626f499d159f17d5d99dc41497b52074f3850df.zip |
Prepare vfprintf to use __printf_fp/__printf_fphex with float128 arg
On powerpc64le, long double can currently take two formats: the same as double (-mlong-double-64) or IBM Extended Precision (default with -mlong-double-128 or explicitly with -mabi=ibmlongdouble). The internal implementation of printf-like functions is aware of these possibilities and properly parses floating-point values from the variable arguments, before making calls to __printf_fp and __printf_fphex. These functions are also aware of the format possibilities and know how to convert both formats to string. When library support for TS 18661-3 was added to glibc, __printf_fp and __printf_fphex were extended with support for an additional type (__float128/_Float128) with a different format (binary128). Now that powerpc64le is getting support for its third long double format, and taking into account that this format is the same as the format of __float128/_Float128, this patch extends __vfprintf_internal to properly call __printf_fp and __printf_fphex with this new format. Tested for powerpc64le (with additional patches to actually enable the use of these preparations) and for x86_64. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 306c942a45..24057036a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2019-06-27 Gabriel F. T. Gomes <gabrielftg@linux.ibm.com> + + * libio/libioP.h (PRINTF_LDBL_USES_FLOAT128): New macro to be + used as a mask for the mode argument of __vfprintf_internal. + * stdio-common/printf-parse.h (printf_arg): New union member: + pa_float128. + * stdio-common/vfprintf-internal.c + (PARSE_FLOAT_VA_ARG_EXTENDED): New macro. + (PARSE_FLOAT_VA_ARG): Likewise. + (SETUP_FLOAT128_INFO): Likewise. + (process_arg): Use PARSE_FLOAT_VA_ARG_EXTENDED and + SETUP_FLOAT128_INFO. + [__HAVE_FLOAT128_UNLIKE_LDBL] (printf_positional): Write + floating-point value to the new union member, pa_float128. + (printf_positional): Zero-initialize args_value[cnt] with memset. + 2019-06-27 Florian Weimer <fweimer@redhat.com> [BZ #24740] |