This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-439-g5df9826


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  5df98260fe6718703cef3b5d337ec9f5d41eb815 (commit)
      from  4adaaafc9e0909107bb931d28fc2c48ce0a4de05 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5df98260fe6718703cef3b5d337ec9f5d41eb815

commit 5df98260fe6718703cef3b5d337ec9f5d41eb815
Author: David S. Miller <davem@davemloft.net>
Date:   Mon Mar 19 15:12:50 2012 -0700

    Fix sparc build after math_private.h cleanups.
    
    	* sysdeps/sparc/fpu/fenv_private.h: New file.
    	* sysdeps/sparc/fpu/math_private.h: Use it.
    	(libc_feholdexcept, libc_feholdexceptf, libc_feholdexceptl):
    	Remove.
    	(libc_feholdexcept_setround, libc_feholdexcept_setroundf,
    	(libc_feholdexcept_setroundl): Remove.
    	(libc_fetestexcept, libc_fetestexceptf, libc_fetestexceptl):
    	Remove.
    	(libc_fesetenv, libc_fesetenvf, libc_fesetenvl): Remove.
    	(libc_feupdateenv, libc_feupdateenvf, libc_feupdateenvf): Remove.

diff --git a/ChangeLog b/ChangeLog
index 66782ab..f6b7c2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2012-03-19  David S. Miller  <davem@davemloft.net>
+
+	* sysdeps/sparc/fpu/fenv_private.h: New file.
+	* sysdeps/sparc/fpu/math_private.h: Use it.
+	(libc_feholdexcept, libc_feholdexceptf, libc_feholdexceptl):
+	Remove.
+	(libc_feholdexcept_setround, libc_feholdexcept_setroundf,
+	(libc_feholdexcept_setroundl): Remove.
+	(libc_fetestexcept, libc_fetestexceptf, libc_fetestexceptl):
+	Remove.
+	(libc_fesetenv, libc_fesetenvf, libc_fesetenvl): Remove.
+	(libc_feupdateenv, libc_feupdateenvf, libc_feupdateenvf): Remove.
+
 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* sysdeps/x86_64/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ): Cast
diff --git a/sysdeps/sparc/fpu/fenv_private.h b/sysdeps/sparc/fpu/fenv_private.h
new file mode 100644
index 0000000..a6e8e95
--- /dev/null
+++ b/sysdeps/sparc/fpu/fenv_private.h
@@ -0,0 +1,106 @@
+#ifndef FENV_PRIVATE_H
+#define FENV_PRIVATE_H 1
+
+#include <fenv.h>
+
+static __always_inline void
+libc_feholdexcept (fenv_t *e)
+{
+  fenv_t etmp;
+  __fenv_stfsr(etmp);
+  *(e) = etmp;
+  etmp = etmp & ~((0x1f << 23) | FE_ALL_EXCEPT);
+  __fenv_ldfsr(etmp);
+}
+
+static __always_inline void
+libc_feholdexcept_setround (fenv_t *e, int r)
+{
+  fenv_t etmp;
+  __fenv_stfsr(etmp);
+  *(e) = etmp;
+  etmp = etmp & ~((0x1f << 23) | FE_ALL_EXCEPT);
+  etmp = (etmp & ~__FE_ROUND_MASK) | (r);
+  __fenv_ldfsr(etmp);
+}
+
+static __always_inline int
+libc_fetestexcept (int e)
+{
+  fenv_t etmp;
+  __fenv_stfsr(etmp);
+  return etmp & (e) & FE_ALL_EXCEPT;
+}
+
+static __always_inline void
+libc_fesetenv (fenv_t *e)
+{
+  __fenv_ldfsr(*e);
+}
+
+static __always_inline int
+libc_feupdateenv_test (fenv_t *e, int ex)
+{
+  fenv_t etmp;
+
+  __fenv_stfsr(etmp);
+  etmp &= FE_ALL_EXCEPT;
+
+  __fenv_ldfsr(*e);
+
+  __feraiseexcept (etmp);
+
+  return etmp & ex;
+}
+
+static __always_inline void
+libc_feupdateenv (fenv_t *e)
+{
+  libc_feupdateenv_test (e, 0);
+}
+
+static __always_inline void
+libc_feholdsetround (fenv_t *e, int r)
+{
+  fenv_t etmp;
+  __fenv_stfsr(etmp);
+  *(e) = etmp;
+  etmp = (etmp & ~__FE_ROUND_MASK) | (r);
+  __fenv_ldfsr(etmp);
+}
+
+static __always_inline void
+libc_feresetround (fenv_t *e)
+{
+  fenv_t etmp;
+  __fenv_stfsr(etmp);
+  etmp = (etmp & ~__FE_ROUND_MASK) | (*e & __FE_ROUND_MASK);
+  __fenv_ldfsr(etmp);
+}
+
+#define libc_feholdexceptf		libc_feholdexcept
+#define libc_feholdexcept_setroundf	libc_feholdexcept_setround
+#define libc_fetestexceptf		libc_fetestexcept
+#define libc_fesetenvf			libc_fesetenv
+#define libc_feupdateenv_testf		libc_feupdateenv_test
+#define libc_feupdateenvf		libc_feupdateenv
+#define libc_feholdsetroundf		libc_feholdsetround
+#define libc_feresetroundf		libc_feresetround
+#define libc_feholdexcept		libc_feholdexcept
+#define libc_feholdexcept_setround	libc_feholdexcept_setround
+#define libc_fetestexcept		libc_fetestexcept
+#define libc_fesetenv			libc_fesetenv
+#define libc_feupdateenv_test		libc_feupdateenv_test
+#define libc_feupdateenv		libc_feupdateenv
+#define libc_feholdsetround		libc_feholdsetround
+#define libc_feresetround		libc_feresetround
+#define libc_feholdexceptl		libc_feholdexcept
+#define libc_feholdexcept_setroundl	libc_feholdexcept_setround
+#define libc_fetestexceptl		libc_fetestexcept
+#define libc_fesetenvl			libc_fesetenv
+#define libc_feupdateenv_testl		libc_feupdateenv_test
+#define libc_feupdateenvl		libc_feupdateenv
+#define libc_feholdsetroundl		libc_feholdsetround
+#define libc_feresetroundl		libc_feresetround
+
+#endif /* FENV_PRIVATE_H */
diff --git a/sysdeps/sparc/fpu/math_private.h b/sysdeps/sparc/fpu/math_private.h
index 05ef623..27946ce 100644
--- a/sysdeps/sparc/fpu/math_private.h
+++ b/sysdeps/sparc/fpu/math_private.h
@@ -1,68 +1,7 @@
 #ifndef SPARC_MATH_PRIVATE_H
 #define SPARC_MATH_PRIVATE_H 1
 
+#include "fenv_private.h"
 #include_next <math_private.h>
-#include <fenv.h>
-
-#undef libc_feholdexcept
-#define libc_feholdexcept(e) \
-  do {							\
-     fenv_t etmp;					\
-     __fenv_stfsr(etmp);				\
-     *(e) = etmp;					\
-     etmp = etmp & ~((0x1f << 23) | FE_ALL_EXCEPT);	\
-     __fenv_ldfsr(etmp);				\
-  } while (0)
-#undef libc_feholdexceptf
-#define libc_feholdexceptf(e) libc_feholdexcept (e)
-#undef libc_feholdexceptl
-#define libc_feholdexceptl(e) libc_feholdexcept (e)
-
-#undef libc_feholdexcept_setround
-#define libc_feholdexcept_setround(e, r) \
-  do {							\
-     fenv_t etmp;					\
-     __fenv_stfsr(etmp);				\
-     *(e) = etmp;					\
-     etmp = etmp & ~((0x1f << 23) | FE_ALL_EXCEPT);	\
-     etmp = (etmp & ~__FE_ROUND_MASK) | (r);		\
-     __fenv_ldfsr(etmp);				\
-  } while (0)
-#undef libc_feholdexcept_setroundf
-#define libc_feholdexcept_setroundf(e, r) libc_feholdexcept_setround (e, r)
-#undef libc_feholdexcept_setroundl
-#define libc_feholdexcept_setroundl(e, r) libc_feholdexcept_setround (e, r)
-
-#undef libc_fetestexcept
-#define libc_fetestexcept(e) \
-  ({							\
-     fenv_t etmp;					\
-     __fenv_stfsr(etmp);				\
-     etmp & (e) & FE_ALL_EXCEPT; })
-#undef libc_fetestexceptf
-#define libc_fetestexceptf(e) libc_fetestexcept (e)
-#undef libc_fetestexceptl
-#define libc_fetestexceptl(e) libc_fetestexcept (e)
-
-#undef libc_fesetenv
-#define libc_fesetenv(e) \
-  __fenv_ldfsr(*e)
-#undef libc_fesetenvf
-#define libc_fesetenvf(e) libc_fesetenv (e)
-#undef libc_fesetenvl
-#define libc_fesetenvl(e) libc_fesetenv (e)
-
-#undef libc_feupdateenv
-#define libc_feupdateenv(e) \
-  do {						\
-     fenv_t etmp;				\
-     __fenv_stfsr(etmp);			\
-     __fenv_ldfsr(*e);				\
-     __feraiseexcept (etmp & FE_ALL_EXCEPT);	\
-  } while (0)
-#undef libc_feupdateenvf
-#define libc_feupdateenvf(e) libc_feupdateenv (e)
-#undef libc_feupdateenvl
-#define libc_feupdateenvl(e) libc_feupdateenv (e)
 
 #endif /* SPARC_MATH_PRIVATE_H */

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                        |   13 +++++
 sysdeps/sparc/fpu/fenv_private.h |  106 ++++++++++++++++++++++++++++++++++++++
 sysdeps/sparc/fpu/math_private.h |   63 +----------------------
 3 files changed, 120 insertions(+), 62 deletions(-)
 create mode 100644 sysdeps/sparc/fpu/fenv_private.h


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]