glibc/sysdeps
Joseph Myers d7025badd8 Fix powerpc32 llround, llroundf exceptions (bug 19125).
The powerpc32 implementations of llroundf and llround produce spurious
and missing exceptions (some arising from such exceptions from
conversions to long long, some present even when fctidz is used).

This patch fixes those problems in a similar way to the llrint /
llrintf fixes.  The spurious exceptions in the fctidz case for large
arguments arise from a converted value that saturated as LLONG_MAX
being converted back to float or double (the conversion back being
inexact, but "inexact" must not be raised together with "invalid"),
and from the subtraction x - xrf also being inexact for sufficiently
large arguments (whether the saturation was to LLONG_MAX or
LLONG_MIN); those are fixed by returning early if the argument is
large enough that no rounding is needed.

This code is not used for --with-cpu=power4 builds (I suspect the code
used in that case may also produce spurious "inexact" exceptions, but
that's something to investigate later).

Tested for powerpc.

	[BZ #19125]
	* sysdeps/powerpc/powerpc32/fpu/s_llround.c: Include <limits.h>,
	<math_private.h> and <stdint.h>.
	(__llround): Avoid conversions to and from long long int, and
	subtractions, where those might raise spurious exceptions.
	* sysdeps/powerpc/powerpc32/fpu/s_llroundf.c: Include
	<math_private.h> and <stdint.h>.
	(__llroundf): Avoid conversions to and from long long int, and
	subtractions, where those might raise spurious exceptions.
2015-10-13 23:30:20 +00:00
..
aarch64 Regenerate aarch64 libm-test-ulps 2015-09-24 14:22:31 +01:00
alpha Move bits/atomic.h to atomic-machine.h (bug 14912). 2015-09-11 20:00:19 +00:00
arm Regenerate ARM libm-test-ulps. 2015-10-09 22:30:26 +00:00
generic Fix lrint, llrint, lround, llround missing exceptions for MIPS (bug 16399). 2015-10-09 21:02:19 +00:00
gnu Add more TCP_* values to netinet/tcp.h. 2015-09-01 13:45:49 +00:00
hppa Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
i386 Remove configure tests for -mno-vzeroupper support. 2015-10-09 16:03:48 +00:00
ia64 Move bits/atomic.h to atomic-machine.h (bug 14912). 2015-09-11 20:00:19 +00:00
ieee754 Fix lrint, llrint, lround, llround missing exceptions for MIPS (bug 16399). 2015-10-09 21:02:19 +00:00
init_array NPTL: Initializer for .init_array-only configurations. 2015-02-13 13:19:11 -08:00
m68k Use soft-fp fma for no-FPU ColdFire (bug 13304). 2015-09-25 17:30:56 +00:00
mach Add task_notify to mach_interface_list 2015-10-08 02:14:43 +02:00
microblaze Use soft-fp fma for MicroBlaze (bug 13304). 2015-09-25 17:29:19 +00:00
mips Regenerate MIPS libm-test-ulps. 2015-10-09 22:39:11 +00:00
nacl NaCl: Do not install <sys/mtio.h>. 2015-09-11 14:16:18 -07:00
nios2 Fixes extern protected data handling testcases elf/tst-protected1a 2015-07-26 05:27:18 -07:00
nptl Use __libc_ptf_call in _longjmp_unwind 2015-09-18 12:22:47 -07:00
posix To fix BZ #18675, use __fstatvfs64 in __fpathconf. 2015-09-09 18:41:25 -07:00
powerpc Fix powerpc32 llround, llroundf exceptions (bug 19125). 2015-10-13 23:30:20 +00:00
pthread Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912). 2015-09-08 21:11:03 +00:00
s390 Move bits/atomic.h to atomic-machine.h (bug 14912). 2015-09-11 20:00:19 +00:00
sh Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
sparc Make scalbn set errno (bug 6803). 2015-09-16 21:11:00 +00:00
tile Don't use dbl-64/wordsize-64 lround based on llround for ILP32 (bug 19079). 2015-10-07 00:40:12 +00:00
unix Use INLINE_SYSCALL_ERROR_RETURN_VALUE 2015-10-13 12:01:10 -07:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
x86 Fix pow missing underflows (bug 18825). 2015-09-25 22:29:10 +00:00
x86_64 Support x86-64 assmebler without AVX512 2015-10-13 10:36:27 -07:00