glibc/sysdeps/ieee754
Zack Weinberg c75772e3f0 Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl.
On platforms where long double used to have the same format as double,
but later switched to a different format (alpha, s390, sparc, and
powerpc), accessing the older behavior is possible and it happens via
__nldbl_* functions (not on the API, but accessible from header
redirection and from compat symbols).  These functions write to the
global flag __ldbl_is_dbl, which tells other functions that long double
variables should be handled as double.  This patch takes the first step
towards removing this global flag and creates __vstrfmon_l_internal,
which takes an explicit flags parameter.

This change arguably makes the generated code slightly worse on
architectures where __ldbl_is_dbl is never true; right now, on those
architectures, it's a compile-time constant; after this change, the
compiler could theoretically prove that __vstrfmon_l_internal was
never called with a nonzero flags argument, but it would probably need
LTO to do it.  This is not performance critical code and I tend to
think that the maintainability benefits of removing action at a
distance are worth it.  However, we _could_ wrap the runtime flag
check with a macro that was defined to ignore its argument and always
return false on architectures where __ldbl_is_dbl is never true, if
people think the codegen benefits are important.

Tested for powerpc and powerpc64le.
2018-11-16 09:21:14 -02:00
..
dbl-64 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
float128 Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
flt-32 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-64-128 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-96 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-128 Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
ldbl-128ibm Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-128ibm-compat ldbl-128ibm-compat: Add printf_size 2018-07-02 10:51:01 -03:00
ldbl-opt Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl. 2018-11-16 09:21:14 -02:00
soft-fp sysdeps/ieee754/soft-fp: ignore maybe-uninitialized with -O [BZ #19444] 2018-10-02 15:40:57 +00:00
ieee754.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
k_standard.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
k_standardf.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
k_standardl.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
Makefile Avoid -Wno-write-strings for k_standard.c. 2015-02-26 22:50:54 +00:00
s_lib_version.c Simplify math-svid-compat code. 2017-08-28 15:19:52 +00:00
s_matherr.c Obsolete matherr, _LIB_VERSION, libieee.a. 2017-08-21 17:45:10 +00:00
s_signgam.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00