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.27.9000-5-gd23a496


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  d23a4962bb35a38b86bccf9ab1d426e2531c250d (commit)
      from  5f167950dffde066dea973e90456fe95350e2e68 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d23a4962bb35a38b86bccf9ab1d426e2531c250d

commit d23a4962bb35a38b86bccf9ab1d426e2531c250d
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Feb 1 20:52:59 2018 +0000

    Move some fenv.h override macros to generic math_private.h.
    
    Various configurations lacking support for floating-point exceptions
    and rounding modes have a math_private.h that overrides certain
    functions and macros, internal and external, to avoid references to
    FE_* constants that are undefined in those configurations.  For
    example, there are unconditional feraiseexcept (FE_INVALID) calls in
    generic libm code, and these macro definitions duly define
    feraiseexcept to ignore its argument to avoid an error from FE_INVALID
    being undefined.
    
    In fact it is easy to tell in an architecture-independent way whether
    this is needed, by testing whether FE_ALL_EXCEPT == 0.  Thus, this
    patch puts such a test, and feraiseexcept and __feraiseexcept macros,
    in the generic math_private.h, so reducing the duplication between
    architecture versions of this header.  The feclearexcept macro present
    in several versions of this header, and fetestexcept in the tile
    version, are not needed; they would have been needed before there were
    proper soft-fp fma implementations (when generic versions, that depend
    on FE_TOWARDZERO and FE_INEXACT, were being used for configurations
    not supporting those features), but aren't needed any more, and so are
    removed.
    
    The tile version of this header has several inline functions for
    fenv.h functions to optimize calls to them away in such configurations
    where they do nothing useful, and all these header versions also have
    definitions of some of the libc_fe* internal macros.  I intend to make
    those generic in subsequent patches.
    
    Tested with build-many-glibcs.py that installed stripped shared
    libraries are unchanged by this patch.
    
    	* sysdeps/generic/math_private.h [FE_ALL_EXCEPT == 0]
    	(feraiseexcept): New macro.
    	[FE_ALL_EXCEPT == 0] (__feraiseexcept): Likewise.
    	* sysdeps/m68k/coldfire/nofpu/math_private.h (feraiseexcept):
    	Remove macro.
    	(__feraiseexcept): Likewise.
    	(feclearexcept): Likewise.
    	* sysdeps/microblaze/math_private.h (feraiseexcept): Likewise.
    	(__feraiseexcept): Likewise.
    	(feclearexcept): Likewise.
    	* sysdeps/nios2/math_private.h (feraiseexcept): Likewise.
    	(__feraiseexcept): Likewise.
    	(feclearexcept): Likewise.
    	* sysdeps/tile/math_private.h (feraiseexcept): Likewise.
    	(__feraiseexcept): Likewise.
    	(feclearexcept): Likewise.
    	(fetestexcept): Likewise.

diff --git a/ChangeLog b/ChangeLog
index e1262c6..4a574f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2018-02-01  Joseph Myers  <joseph@codesourcery.com>
 
+	* sysdeps/generic/math_private.h [FE_ALL_EXCEPT == 0]
+	(feraiseexcept): New macro.
+	[FE_ALL_EXCEPT == 0] (__feraiseexcept): Likewise.
+	* sysdeps/m68k/coldfire/nofpu/math_private.h (feraiseexcept):
+	Remove macro.
+	(__feraiseexcept): Likewise.
+	(feclearexcept): Likewise.
+	* sysdeps/microblaze/math_private.h (feraiseexcept): Likewise.
+	(__feraiseexcept): Likewise.
+	(feclearexcept): Likewise.
+	* sysdeps/nios2/math_private.h (feraiseexcept): Likewise.
+	(__feraiseexcept): Likewise.
+	(feclearexcept): Likewise.
+	* sysdeps/tile/math_private.h (feraiseexcept): Likewise.
+	(__feraiseexcept): Likewise.
+	(feclearexcept): Likewise.
+	(fetestexcept): Likewise.
+
 	* sysdeps/m68k/coldfire/math-tests.h: New file.
 
 	* sysdeps/m68k/fpu/bits/fenv.h: Move to ....
diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h
index e4b9d86..acfbd9b 100644
--- a/sysdeps/generic/math_private.h
+++ b/sysdeps/generic/math_private.h
@@ -644,4 +644,14 @@ libc_feresetround_noex_ctx (struct rm_ctx *ctx)
   SET_RESTORE_ROUND_GENERIC (RM, libc_feholdsetround_53bit,	      \
 			     libc_feresetround_53bit)
 
+/* When no floating-point exceptions are defined in <fenv.h>, make
+   feraiseexcept ignore its argument so that unconditional
+   feraiseexcept calls do not cause errors for undefined exceptions.
+   Define it to expand to a void expression so that any calls testing
+   the result of feraiseexcept do produce errors.  */
+#if FE_ALL_EXCEPT == 0
+# define feraiseexcept(excepts) ((void) 0)
+# define __feraiseexcept(excepts) ((void) 0)
+#endif
+
 #endif /* _MATH_PRIVATE_H_ */
diff --git a/sysdeps/m68k/coldfire/nofpu/math_private.h b/sysdeps/m68k/coldfire/nofpu/math_private.h
index 879577b..951f026 100644
--- a/sysdeps/m68k/coldfire/nofpu/math_private.h
+++ b/sysdeps/m68k/coldfire/nofpu/math_private.h
@@ -30,9 +30,7 @@
    success in every case.
 
    The overrides for libc_ functions must happen before we include
-   the generic math_private.h, and the overrides for regular
-   <fenv.h> functions must happen afterwards, to avoid clashing with
-   the declarations of those functions.  */
+   the generic math_private.h.  */
 
 #define libc_fesetround(rnd)                   ({ 0; })
 #define libc_fetestexcept(exc)                 ({ 0; })
@@ -45,8 +43,4 @@
 
 #include_next <math_private.h>
 
-#define feraiseexcept(excepts)                 ({ 0; })
-#define __feraiseexcept(excepts)               ({ 0; })
-#define feclearexcept(exc)                     ({ 0; })
-
 #endif
diff --git a/sysdeps/microblaze/math_private.h b/sysdeps/microblaze/math_private.h
index d82e8bf..1a2c521 100644
--- a/sysdeps/microblaze/math_private.h
+++ b/sysdeps/microblaze/math_private.h
@@ -17,9 +17,7 @@
    success in every case.
 
    The overrides for libc_ functions must happen before we include
-   the generic math_private.h, and the overrides for regular
-   <fenv.h> functions must happen afterwards, to avoid clashing with
-   the declarations of those functions.  */
+   the generic math_private.h.  */
 
 #define libc_fesetround(rnd)                   ({ 0; })
 #define libc_fetestexcept(exc)                 ({ 0; })
@@ -32,8 +30,4 @@
 
 #include_next <math_private.h>
 
-#define feraiseexcept(excepts)                 ({ 0; })
-#define __feraiseexcept(excepts)               ({ 0; })
-#define feclearexcept(exc)                     ({ 0; })
-
 #endif
diff --git a/sysdeps/nios2/math_private.h b/sysdeps/nios2/math_private.h
index 373da2a..2514041 100644
--- a/sysdeps/nios2/math_private.h
+++ b/sysdeps/nios2/math_private.h
@@ -16,9 +16,7 @@
    success in every case.
 
    The overrides for libc_ functions must happen before we include
-   the generic math_private.h, and the overrides for regular
-   <fenv.h> functions must happen afterwards, to avoid clashing with
-   the declarations of those functions.  */
+   the generic math_private.h.  */
 
 #define libc_fesetround(rnd)                   ({ 0; })
 #define libc_fetestexcept(exc)                 ({ 0; })
@@ -31,8 +29,4 @@
 
 #include_next <math_private.h>
 
-#define feraiseexcept(excepts)                 ({ 0; })
-#define __feraiseexcept(excepts)               ({ 0; })
-#define feclearexcept(exc)                     ({ 0; })
-
 #endif
diff --git a/sysdeps/tile/math_private.h b/sysdeps/tile/math_private.h
index 99daec4..6dc43f4 100644
--- a/sysdeps/tile/math_private.h
+++ b/sysdeps/tile/math_private.h
@@ -26,10 +26,6 @@
 
 #include_next <math_private.h>
 
-#define feraiseexcept(excepts)			({ 0; })
-#define __feraiseexcept(excepts)		({ 0; })
-#define feclearexcept(exc)			({ 0; })
-#define fetestexcept(exc)			({ 0; })
 extern inline int fegetenv (fenv_t *__e)	{ return 0; }
 extern inline int __fegetenv (fenv_t *__e)	{ return 0; }
 extern inline int fesetenv (const fenv_t *__e)	{ return 0; }

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

Summary of changes:
 ChangeLog                                  |   18 ++++++++++++++++++
 sysdeps/generic/math_private.h             |   10 ++++++++++
 sysdeps/m68k/coldfire/nofpu/math_private.h |    8 +-------
 sysdeps/microblaze/math_private.h          |    8 +-------
 sysdeps/nios2/math_private.h               |    8 +-------
 sysdeps/tile/math_private.h                |    4 ----
 6 files changed, 31 insertions(+), 25 deletions(-)


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]