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 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_sqrt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_sqrtf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fclrexcpt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fe_mask.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fe_nomask.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fegetmode.c Add femode_t functions: powerpc. 2016-09-07 16:46:47 +00:00
fegetround.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fenv_const.c Add femode_t functions. 2016-09-07 16:40:09 +00:00
fenv_libc.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fenv_private.h powerpc: Cleanup fenv_private.h 2016-10-21 16:40:03 -02:00
fesetenv.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fesetexcept.c Add fesetexcept: powerpc. 2016-08-16 16:22:12 +00:00
fesetmode.c Add femode_t functions: powerpc. 2016-09-07 16:46:47 +00:00
fesetround.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
feupdateenv.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fix-fp-int-compare-invalid.h Add iseqsig. 2016-10-06 22:19:38 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fsetexcptflg.c Add comment from sysdeps/powerpc/fpu/fraiseexcpt.c to fsetexcptflg.c. 2016-08-12 17:49:07 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
k_cosf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
k_rem_pio2f.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
k_sinf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
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 Link extra-libs consistently with libc and ld.so. 2013-05-31 16:16:33 +00:00
math_ldbl.h PowerPC: unify math_ldbl.h implementations 2013-03-08 11:07:15 -03:00
math_private.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_cosf.c Remove unused variables 2016-01-27 09:30:16 +01:00
s_fabs.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_fabsf.S
s_float_bitwise.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_fma.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_fmaf.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
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 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_isnanf.S
s_lrintf.S
s_rint.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_rintf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_sinf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
t_sqrt.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
tst-setcontext-fpscr.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00