From 421a1d34bffab52263706b6332333e45fc10ab2f Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Thu, 8 Aug 2019 10:42:35 -0300 Subject: ldbl-128ibm-compat: Add regular character printing functions The 'mode' argument to __vfprintf_internal allows the selection of the long double format for all long double arguments requested by the format string. Currently, there are two possibilities: long double with the same format as double or long double as something else. The 'something else' format varies between architectures, and on powerpc64le, it means IBM Extended Precision format. In preparation for the third option of long double format on powerpc64le, this patch uses the new mode mask, PRINTF_LDBL_USES_FLOAT128, which tells __vfprintf_internal to save the floating-point values into variables of type __float128 and adjusts the parameters to __printf_fp and __printf_fphex as if it was a call from strfromf128. Many files from the stdio-common, wcsmbs, argp, misc, and libio directories will have IEEE binary128 counterparts. Setting the correct compiler options to these files (original and counterparts) would produce a large amount of repetitive Makefile rules. To avoid this repetition, this patch adds a Makefile routine that iterates over the files adding or removing the appropriate flags. Tested for powerpc64le. Reviewed-By: Florian Weimer Reviewed-By: Joseph Myers Reviewed-By: Paul E. Murphy --- sysdeps/ieee754/ldbl-128ibm-compat/test-printf-ieee128.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-printf-ieee128.c (limited to 'sysdeps/ieee754/ldbl-128ibm-compat/test-printf-ieee128.c') diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/test-printf-ieee128.c b/sysdeps/ieee754/ldbl-128ibm-compat/test-printf-ieee128.c new file mode 100644 index 0000000000..5de4ea3e7f --- /dev/null +++ b/sysdeps/ieee754/ldbl-128ibm-compat/test-printf-ieee128.c @@ -0,0 +1 @@ +#include -- cgit 1.4.1