This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC: Set/restore rounding mode only when needed
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 25 Nov 2013 18:52:26 +0000
- Subject: Re: [PATCH] PowerPC: Set/restore rounding mode only when needed
- Authentication-results: sourceware.org; auth=none
- References: <5280DDA5 dot 1060906 at linux dot vnet dot ibm dot com> <20131119131935 dot GE24544 at spoyarek dot pnq dot redhat dot com> <528CBBE7 dot 8040109 at linux dot vnet dot ibm dot com> <20131125095330 dot GN19834 at spoyarek dot pnq dot redhat dot com> <5293450A dot 20607 at linux dot vnet dot ibm dot com>
This breaks the build for powerpc-nofpu by introducing __fegetround
calls into ldbl-128ibm code when nothing defines __fegetround for
powerpc-nofpu. This patch updates the nofpu fenv_libc.h headers to
fix this (restoring the status quo of calls to fegetround rather than
introducing any sort of optimized version in the header).
2013-11-25 Joseph Myers <joseph@codesourcery.com>
* sysdeps/powerpc/nofpu/fenv_libc.h (__fegetround): New macro.
* sysdeps/powerpc/powerpc32/e500/nofpu/fenv_libc.h (__fegetround):
Likewise.
diff --git a/sysdeps/powerpc/nofpu/fenv_libc.h b/sysdeps/powerpc/nofpu/fenv_libc.h
index 14a2d04..a0b6b91 100644
--- a/sysdeps/powerpc/nofpu/fenv_libc.h
+++ b/sysdeps/powerpc/nofpu/fenv_libc.h
@@ -25,4 +25,7 @@
#include <fenv.h>
+/* ldbl-128ibm code uses __fegetround. */
+#define __fegetround() fegetround ()
+
#endif /* fenv_libc.h */
diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_libc.h b/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_libc.h
index 9637580..e905eda 100644
--- a/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_libc.h
+++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_libc.h
@@ -21,6 +21,9 @@
#include <fenv.h>
+/* ldbl-128ibm code uses __fegetround. */
+#define __fegetround() fegetround ()
+
int __feraiseexcept_spe (int);
libm_hidden_proto (__feraiseexcept_spe)
--
Joseph S. Myers
joseph@codesourcery.com