[PATCH] PowerPC: Set/restore rounding mode only when needed
Joseph S. Myers
joseph@codesourcery.com
Tue Nov 26 10:25:00 GMT 2013
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
More information about the Libc-alpha
mailing list