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.21-3-g639e42e


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  639e42eb901b69d3a4d6414751c60fab0ca25119 (commit)
      from  76c109f292e074d5af4ac238a3075de0a4addd99 (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=639e42eb901b69d3a4d6414751c60fab0ca25119

commit 639e42eb901b69d3a4d6414751c60fab0ca25119
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Feb 6 15:39:17 2015 +0000

    soft-fp: Support floating-point extensions without quieting sNaNs.
    
    One special case needed in soft-fp to replace the old version in the
    Linux kernel is extending from a narrower floating-point format to a
    wider one without quieting signaling NaNs.  (This is for
    arch/powerpc/math-emu/lfs.c, where previously it used the old FP_CONV
    which didn't do anything special for NaNs, then handled packing
    specially for NaNs to avoid quieting at packing time, and discarded
    the exceptions from unpacking.)
    
    This patch accordingly refactors FP_EXTEND, creating a separate
    _FP_EXTEND_CNAN that offers a choice of how NaNs are handled, with
    FP_EXTEND reimplemented as a wrapper that provides the common case of
    the IEEE operation that does quiet signaling NaNs and raise exceptions
    for them.
    
    Tested for powerpc (e500) that installed stripped shared libraries are
    unchanged by this patch.
    
    	* soft-fp/op-common.h (FP_EXTEND): Rename to _FP_EXTEND_CNAN with
    	extra argument CHECK_NAN.  Redefine as wrapper around
    	_FP_EXTEND_CNAN.

diff --git a/ChangeLog b/ChangeLog
index af405a0..0ef8a61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-06  Joseph Myers  <joseph@codesourcery.com>
+
+	* soft-fp/op-common.h (FP_EXTEND): Rename to _FP_EXTEND_CNAN with
+	extra argument CHECK_NAN.  Redefine as wrapper around
+	_FP_EXTEND_CNAN.
+
 2015-02-06  Carlos O'Donell  <carlos@systemhalted.org>
 
 	* version.h (RELEASE): Set to "stable".
diff --git a/soft-fp/op-common.h b/soft-fp/op-common.h
index 6b8b52f..98cc721 100644
--- a/soft-fp/op-common.h
+++ b/soft-fp/op-common.h
@@ -1825,8 +1825,10 @@
 
 
 /* Extend from a narrower floating-point format to a wider one.  Input
-   and output are raw.  */
-#define FP_EXTEND(dfs, sfs, dwc, swc, D, S)				\
+   and output are raw.  If CHECK_NAN, then signaling NaNs are
+   converted to quiet with the "invalid" exception raised; otherwise
+   signaling NaNs remain signaling with no exception.  */
+#define _FP_EXTEND_CNAN(dfs, sfs, dwc, swc, D, S, check_nan)		\
   do									\
     {									\
       if (_FP_FRACBITS_##dfs < _FP_FRACBITS_##sfs			\
@@ -1876,18 +1878,22 @@
 	      D##_e = _FP_EXPMAX_##dfs;					\
 	      if (!_FP_FRAC_ZEROP_##swc (S))				\
 		{							\
-		  if (_FP_FRAC_SNANP (sfs, S))				\
+		  if (check_nan && _FP_FRAC_SNANP (sfs, S))		\
 		    FP_SET_EXCEPTION (FP_EX_INVALID			\
 				      | FP_EX_INVALID_SNAN);		\
 		  _FP_FRAC_SLL_##dwc (D, (_FP_FRACBITS_##dfs		\
 					  - _FP_FRACBITS_##sfs));	\
-		  _FP_SETQNAN (dfs, dwc, D);				\
+		  if (check_nan)					\
+		    _FP_SETQNAN (dfs, dwc, D);				\
 		}							\
 	    }								\
 	}								\
     }									\
   while (0)
 
+#define FP_EXTEND(dfs, sfs, dwc, swc, D, S)		\
+    _FP_EXTEND_CNAN (dfs, sfs, dwc, swc, D, S, 1)
+
 /* Truncate from a wider floating-point format to a narrower one.
    Input and output are semi-raw.  */
 #define FP_TRUNC(dfs, sfs, dwc, swc, D, S)				\

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

Summary of changes:
 ChangeLog           |    6 ++++++
 soft-fp/op-common.h |   14 ++++++++++----
 2 files changed, 16 insertions(+), 4 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]