From 10446f5d9f2cf4d91c8ae483fd2b5470242ae2a1 Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Sun, 10 Jun 2018 22:42:34 -0300 Subject: Prepare vfscanf to use __strtof128_internal 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 scanf-like functions is aware of these possibilites and, based on the format in use, properly calls __strtold_internal or __strtod_internal, saving the return to a variable of type double or long double. When library support for TS 18661-3 was added to glibc, a new function, __strtof128_internal, was added to enable reading of floating-point values with IEEE binary128 format into the _Float128 type. 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, this patch extends __vfscanf_internal and __vfwscanf_internal to call __strtof128_internal or __wcstof128_internal when appropriate. The result gets saved into a variable of _Float128 type. Tested for powerpc64le. --- ChangeLog | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 998f4c153f..c6ad912b11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2018-12-07 Gabriel F. T. Gomes + + * libio/libioP.h (SCANF_LDBL_USES_FLOAT128): New macro to be + used as a mask for the mode argument of __vfscanf_internal and + __vfwscanf_internal. + * stdio-common/vfscanf-internal.c + [defined COMPILE_WSCANF && __HAVE_FLOAT128_UNLIKE_LDBL] + (__strtof128_internal): Define to __wcstof128_internal. + [__HAVE_FLOAT128_UNLIKE_LDBL] (__vfscanf_internal): Call + __strtof128_internal or __wcstof128_internal when the format of + long double is the same as _Float128. + 2018-12-05 Samuel Thibault * include/unistd.h (__confstr): Add prototype and hidden prototype. -- cgit v1.2.3