glibc/sysdeps/powerpc/powerpc64le
Gabriel F. T. Gomes c85e54ac6c Provide a C++ version of iseqsig (bug 22377)
In C++ mode, __MATH_TG cannot be used for defining iseqsig, because
__MATH_TG relies on __builtin_types_compatible_p, which is a C-only
builtin.  This is true when float128 is provided as an ABI-distinct type
from long double.

Moreover, the comparison macros from ISO C take two floating-point
arguments, which need not have the same type.  Choosing what underlying
function to call requires evaluating the formats of the arguments, then
selecting which is wider.  The macro __MATH_EVAL_FMT2 provides this
information, however, only the type of the macro expansion is relevant
(actually evaluating the expression would be incorrect).

This patch provides a C++ version of iseqsig, in which only the type of
__MATH_EVAL_FMT2 (__typeof or decltype) is used as a template parameter
for __iseqsig_type.  This function calls the appropriate underlying
function.

Tested for powerpc64le and x86_64.

	[BZ #22377]
	* math/Makefile [C++] (tests): Add test for iseqsig.
	* math/math.h [C++] (iseqsig): New implementation, which does
	not rely on __MATH_TG/__builtin_types_compatible_p.
	* math/test-math-iseqsig.cc: New file.
	* sysdeps/powerpc/powerpc64le/Makefile
	(CFLAGS-test-math-iseqsig.cc): New variable.
2017-12-19 23:26:59 -02:00
..
fpu powerpc64le: Enable float128 2017-06-26 15:04:47 -03:00
multiarch
power7
power8
power9 powerpc: Restrict xssqrtqp operands to Vector Registers (bug 21941) 2017-08-10 16:10:21 -03:00
configure powerpc64le: Require at least POWER8 for powerpc64le 2017-06-26 15:00:34 -03:00
configure.ac powerpc64le: Require at least POWER8 for powerpc64le 2017-06-26 15:00:34 -03:00
Implies
Implies-before powerpc64le: Enable float128 2017-06-26 15:04:47 -03:00
Makefile Provide a C++ version of iseqsig (bug 22377) 2017-12-19 23:26:59 -02:00