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.20-72-g2d6a47b


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  2d6a47ba4ca899746db7fb5ba75a82f2cda93a91 (commit)
      from  620f462e88f6e7b59488a963b3c42d89035e4ba6 (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=2d6a47ba4ca899746db7fb5ba75a82f2cda93a91

commit 2d6a47ba4ca899746db7fb5ba75a82f2cda93a91
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Oct 9 00:58:42 2014 +0000

    soft-fp: Remove FP_CLEAR_EXCEPTIONS.
    
    As noted in
    <https://sourceware.org/ml/libc-alpha/2013-10/msg00516.html>, the
    soft-fp macro FP_CLEAR_EXCEPTIONS should not be necessary, as soft-fp
    code should never set an exception and later clear it.
    
    In fact, all four uses in glibc (for SPARC) are indeed unnecessary:
    they appear in files that convert 32-bit or 64-bit integers to IEEE
    binary128, an operation that can never raise any exceptions.  If this
    was intended to enable the compiler to optimize away any FP_FROM_INT
    code testing for exceptional cases, we now have a better way of doing
    this: defining FP_NO_EXCEPTIONS before including soft-fp.h causes all
    code handling exceptions to be stubbed out, and the rounding mode to
    be hardwired for round-to-zero, to allow such optimizations for source
    files where (a) the operation in question, for the particular types in
    question, can never raise exceptions, but (b) some instances of the
    operation for other types can, so the macros used in the file do
    contain references to rounding or exceptions, albeit dead in that
    particular file.
    
    The uses in the Linux kernel are also unnecessary (clearing exceptions
    at a point where they are already cleared).
    
    This patch duly removes FP_CLEAR_EXCEPTIONS, making the SPARC code in
    question use FP_NO_EXCEPTIONS and stop using exception-related macros.
    
    	* soft-fp/soft-fp.h (FP_CLEAR_EXCEPTIONS): Remove macro.
    	* sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Define FP_NO_EXCEPTIONS.
    	(_Q_itoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
    	FP_HANDLE_EXCEPTIONS.
    	* sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Define FP_NO_EXCEPTIONS.
    	(_Q_lltoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
    	FP_HANDLE_EXCEPTIONS.
    	* sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Define FP_NO_EXCEPTIONS.
    	(_Q_ulltoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
    	FP_HANDLE_EXCEPTIONS.
    	* sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Define FP_NO_EXCEPTIONS.
    	(_Q_utoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
    	FP_HANDLE_EXCEPTIONS.

diff --git a/ChangeLog b/ChangeLog
index a24865e..b5faff4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2014-10-09  Joseph Myers  <joseph@codesourcery.com>
+
+	* soft-fp/soft-fp.h (FP_CLEAR_EXCEPTIONS): Remove macro.
+	* sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Define FP_NO_EXCEPTIONS.
+	(_Q_itoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
+	FP_HANDLE_EXCEPTIONS.
+	* sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Define FP_NO_EXCEPTIONS.
+	(_Q_lltoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
+	FP_HANDLE_EXCEPTIONS.
+	* sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Define FP_NO_EXCEPTIONS.
+	(_Q_ulltoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
+	FP_HANDLE_EXCEPTIONS.
+	* sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Define FP_NO_EXCEPTIONS.
+	(_Q_utoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
+	FP_HANDLE_EXCEPTIONS.
+
 2014-10-08  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #14132]
diff --git a/soft-fp/soft-fp.h b/soft-fp/soft-fp.h
index 5fb7358..ead9c97 100644
--- a/soft-fp/soft-fp.h
+++ b/soft-fp/soft-fp.h
@@ -128,9 +128,6 @@
 #define FP_SET_EXCEPTION(ex)				\
   _fex |= (ex)
 
-#define FP_CLEAR_EXCEPTIONS				\
-  _fex = 0
-
 #define FP_CUR_EXCEPTIONS				\
   (_fex)
 
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_itoq.c b/sysdeps/sparc/sparc32/soft-fp/q_itoq.c
index 3640506..1ebb2de 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_itoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_itoq.c
@@ -19,19 +19,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define FP_NO_EXCEPTIONS
 #include "soft-fp.h"
 #include "quad.h"
 
 long double _Q_itoq(const int a)
 {
-  FP_DECL_EX;
   FP_DECL_Q(C);
   int b = a;
   long double c;
 
   FP_FROM_INT_Q(C, b, 32, unsigned int);
   FP_PACK_RAW_Q(c, C);
-  FP_CLEAR_EXCEPTIONS;
-  FP_HANDLE_EXCEPTIONS;
   return c;
 }
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c b/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c
index 52b2712..b60d26d 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c
@@ -19,19 +19,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define FP_NO_EXCEPTIONS
 #include "soft-fp.h"
 #include "quad.h"
 
 long double _Q_lltoq(const long long a)
 {
-  FP_DECL_EX;
   FP_DECL_Q(C);
   long double c;
   long long b = a;
 
   FP_FROM_INT_Q(C, b, 64, unsigned long long);
   FP_PACK_RAW_Q(c, C);
-  FP_CLEAR_EXCEPTIONS;
-  FP_HANDLE_EXCEPTIONS;
   return c;
 }
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c b/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c
index 7512557..524fcb9 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c
@@ -19,19 +19,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define FP_NO_EXCEPTIONS
 #include "soft-fp.h"
 #include "quad.h"
 
 long double _Q_ulltoq(const unsigned long long a)
 {
-  FP_DECL_EX;
   FP_DECL_Q(C);
   long double c;
   unsigned long long b = a;
 
   FP_FROM_INT_Q(C, b, 64, unsigned long long);
   FP_PACK_RAW_Q(c, C);
-  FP_CLEAR_EXCEPTIONS;
-  FP_HANDLE_EXCEPTIONS;
   return c;
 }
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_utoq.c b/sysdeps/sparc/sparc32/soft-fp/q_utoq.c
index 0fb645c..0ba823e 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_utoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_utoq.c
@@ -19,19 +19,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define FP_NO_EXCEPTIONS
 #include "soft-fp.h"
 #include "quad.h"
 
 long double _Q_utoq(const unsigned int a)
 {
-  FP_DECL_EX;
   FP_DECL_Q(C);
   long double c;
   unsigned int b = a;
 
   FP_FROM_INT_Q(C, b, 32, unsigned int);
   FP_PACK_RAW_Q(c, C);
-  FP_CLEAR_EXCEPTIONS;
-  FP_HANDLE_EXCEPTIONS;
   return c;
 }

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

Summary of changes:
 ChangeLog                                |   16 ++++++++++++++++
 soft-fp/soft-fp.h                        |    3 ---
 sysdeps/sparc/sparc32/soft-fp/q_itoq.c   |    4 +---
 sysdeps/sparc/sparc32/soft-fp/q_lltoq.c  |    4 +---
 sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c |    4 +---
 sysdeps/sparc/sparc32/soft-fp/q_utoq.c   |    4 +---
 6 files changed, 20 insertions(+), 15 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]