glibc/sysdeps/powerpc/fpu
Joseph Myers 9ce4ac64b2 Fix powerpc fmax, fmin sNaN handling (bug 20947).
Various fmax and fmin function implementations mishandle sNaN
arguments:

(a) When both arguments are NaNs, the return value should be a qNaN,
but sometimes it is an sNaN if at least one argument is an sNaN.

(b) Under TS 18661-1 semantics, if either argument is an sNaN then the
result should be a qNaN (whereas if one argument is a qNaN and the
other is not a NaN, the result should be the non-NaN argument).
Various implementations treat sNaNs like qNaNs here.

This patch fixes the powerpc versions of these functions (shared by
float and double, 32-bit and 64-bit).  The structure of those versions
is that all ordered cases are already handled before anything dealing
with the case where the arguments are unordered; thus, this patch
causes no change to the code executed in the common case (neither
argument a NaN).

Tested for powerpc (32-bit and 64-bit), together with tests to be
added along with the x86_64 / x86 fixes.

	[BZ #20947]
	* sysdeps/powerpc/fpu/s_fmax.S (__fmax): Add the arguments when
	either is a signaling NaN.
	* sysdeps/powerpc/fpu/s_fmin.S (__fmin): Likewise.
2016-12-15 00:43:16 +00:00
..
e_hypot.c Fix hypot sNaN handling (bug 20940). 2016-12-07 01:16:36 +00:00
e_hypotf.c Fix hypot sNaN handling (bug 20940). 2016-12-07 01:16:36 +00:00
e_rem_pio2f.c
e_sqrt.c
e_sqrtf.c
fclrexcpt.c
fe_mask.c
fe_nomask.c
fedisblxcpt.c
feenablxcpt.c
fegetenv.c
fegetexcept.c
fegetmode.c
fegetround.c
feholdexcpt.c
fenv_const.c
fenv_libc.h
fenv_private.h powerpc: Cleanup fenv_private.h 2016-10-21 16:40:03 -02:00
fesetenv.c
fesetexcept.c
fesetmode.c
fesetround.c
feupdateenv.c
fgetexcptflg.c
fix-fp-int-compare-invalid.h Add iseqsig. 2016-10-06 22:19:38 +00:00
fraiseexcpt.c
fsetexcptflg.c
ftestexcept.c
k_cosf.c
k_rem_pio2f.c
k_sinf.c
libm-test-ulps powerpc: Regenerate ULPs 2016-10-05 08:57:47 -03:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
Makefile
math_ldbl.h
math_private.h
s_cosf.c
s_fabs.S
s_fabsf.S
s_float_bitwise.h
s_fma.S
s_fmaf.S
s_fmax.S Fix powerpc fmax, fmin sNaN handling (bug 20947). 2016-12-15 00:43:16 +00:00
s_fmaxf.S
s_fmin.S Fix powerpc fmax, fmin sNaN handling (bug 20947). 2016-12-15 00:43:16 +00:00
s_fminf.S
s_isnan.c
s_isnanf.S
s_lrintf.S
s_rint.c
s_rintf.c
s_sinf.c
t_sqrt.c
tst-setcontext-fpscr.c