summaryrefslogtreecommitdiff
path: root/config.h.in
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-10-13 00:52:54 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-10-13 00:52:54 +0000
commite8dab9477f33ab7a67405f4e147cbaa1a4bb443b (patch)
treef9a6edfe0acaaa15b4c8a42daad0ef31510e5994 /config.h.in
parent5b1766a0cde255eff9868a9eeb49f66a89842cb8 (diff)
downloadglibc-e8dab9477f33ab7a67405f4e147cbaa1a4bb443b.tar.gz
Fix powerpc32 llrint, llrintf bad exceptions (bug 16422).
The versions of llrint and llrintf for older powerpc32 processors convert the results of __rint / __rintf to long long int, resulting in spurious exceptions from such casts in certain cases. This patch makes glibc work around the problems with the libgcc conversions when the compiler used to build glibc doesn't use the fctidz instruction for them. Tested for powerpc. [BZ #16422] * sysdeps/powerpc/powerpc32/fpu/configure.ac (libc_cv_ppc_fctidz): New configure test. * sysdeps/powerpc/powerpc32/fpu/configure: Regenerated. * config.h.in [_LIBC] (HAVE_PPC_FCTIDZ): New macro. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include <limits.h>, <math_private.h> and <stdint.h>. (__llrint): Avoid conversions to long long int where those might raise spurious exceptions. * sysdeps/powerpc/powerpc32/fpu/s_llrintf.c: Include <math_private.h> and <stdint.h>. (__llrintf): Avoid conversions to long long int where those might raise spurious exceptions.
Diffstat (limited to 'config.h.in')
-rw-r--r--config.h.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/config.h.in b/config.h.in
index 7c851c97fe..5fd4897428 100644
--- a/config.h.in
+++ b/config.h.in
@@ -251,4 +251,7 @@
/* PowerPC32 uses fcfid for integer to floating point conversions. */
#define HAVE_PPC_FCFID 0
+/* PowerPC32 uses fctidz for floating point to long long conversions. */
+#define HAVE_PPC_FCTIDZ 0
+
#endif