This patch updates the soft-fp code in libgcc from glibc.  There are
no changes here of significance to the use of soft-fp in GCC (and so
no testsuite additions); it's simply an update to bring in the latest
soft-fp version (which will also hopefully go into Linux 4.4 to
replace the 15-year-old copy currently in Linux).

Bootstrapped with no regressions on x86_64-pc-linux-gnu.  Applied to 
mainline.

2015-09-28  Joseph Myers  <jos...@codesourcery.com>

        * soft-fp/adddf3.c: Update from glibc.
        * soft-fp/addsf3.c: Likewise.
        * soft-fp/addtf3.c: Likewise.
        * soft-fp/divdf3.c: Likewise.
        * soft-fp/divsf3.c: Likewise.
        * soft-fp/divtf3.c: Likewise.
        * soft-fp/double.h: Likewise.
        * soft-fp/eqdf2.c: Likewise.
        * soft-fp/eqsf2.c: Likewise.
        * soft-fp/eqtf2.c: Likewise.
        * soft-fp/extenddftf2.c: Likewise.
        * soft-fp/extended.h: Likewise.
        * soft-fp/extendsfdf2.c: Likewise.
        * soft-fp/extendsftf2.c: Likewise.
        * soft-fp/extendxftf2.c: Likewise.
        * soft-fp/fixdfdi.c: Likewise.
        * soft-fp/fixdfsi.c: Likewise.
        * soft-fp/fixdfti.c: Likewise.
        * soft-fp/fixsfdi.c: Likewise.
        * soft-fp/fixsfsi.c: Likewise.
        * soft-fp/fixsfti.c: Likewise.
        * soft-fp/fixtfdi.c: Likewise.
        * soft-fp/fixtfsi.c: Likewise.
        * soft-fp/fixtfti.c: Likewise.
        * soft-fp/fixunsdfdi.c: Likewise.
        * soft-fp/fixunsdfsi.c: Likewise.
        * soft-fp/fixunsdfti.c: Likewise.
        * soft-fp/fixunssfdi.c: Likewise.
        * soft-fp/fixunssfsi.c: Likewise.
        * soft-fp/fixunssfti.c: Likewise.
        * soft-fp/fixunstfdi.c: Likewise.
        * soft-fp/fixunstfsi.c: Likewise.
        * soft-fp/fixunstfti.c: Likewise.
        * soft-fp/floatdidf.c: Likewise.
        * soft-fp/floatdisf.c: Likewise.
        * soft-fp/floatditf.c: Likewise.
        * soft-fp/floatsidf.c: Likewise.
        * soft-fp/floatsisf.c: Likewise.
        * soft-fp/floatsitf.c: Likewise.
        * soft-fp/floattidf.c: Likewise.
        * soft-fp/floattisf.c: Likewise.
        * soft-fp/floattitf.c: Likewise.
        * soft-fp/floatundidf.c: Likewise.
        * soft-fp/floatundisf.c: Likewise.
        * soft-fp/floatunditf.c: Likewise.
        * soft-fp/floatunsidf.c: Likewise.
        * soft-fp/floatunsisf.c: Likewise.
        * soft-fp/floatunsitf.c: Likewise.
        * soft-fp/floatuntidf.c: Likewise.
        * soft-fp/floatuntisf.c: Likewise.
        * soft-fp/floatuntitf.c: Likewise.
        * soft-fp/gedf2.c: Likewise.
        * soft-fp/gesf2.c: Likewise.
        * soft-fp/getf2.c: Likewise.
        * soft-fp/ledf2.c: Likewise.
        * soft-fp/lesf2.c: Likewise.
        * soft-fp/letf2.c: Likewise.
        * soft-fp/muldf3.c: Likewise.
        * soft-fp/mulsf3.c: Likewise.
        * soft-fp/multf3.c: Likewise.
        * soft-fp/negdf2.c: Likewise.
        * soft-fp/negsf2.c: Likewise.
        * soft-fp/negtf2.c: Likewise.
        * soft-fp/op-1.h: Likewise.
        * soft-fp/op-2.h: Likewise.
        * soft-fp/op-4.h: Likewise.
        * soft-fp/op-8.h: Likewise.
        * soft-fp/op-common.h: Likewise.
        * soft-fp/quad.h: Likewise.
        * soft-fp/single.h: Likewise.
        * soft-fp/soft-fp.h: Likewise.
        * soft-fp/subdf3.c: Likewise.
        * soft-fp/subsf3.c: Likewise.
        * soft-fp/subtf3.c: Likewise.
        * soft-fp/truncdfsf2.c: Likewise.
        * soft-fp/trunctfdf2.c: Likewise.
        * soft-fp/trunctfsf2.c: Likewise.
        * soft-fp/trunctfxf2.c: Likewise.
        * soft-fp/unorddf2.c: Likewise.
        * soft-fp/unordsf2.c: Likewise.
        * soft-fp/unordtf2.c: Likewise.

Index: libgcc/soft-fp/adddf3.c
===================================================================
--- libgcc/soft-fp/adddf3.c     (revision 228199)
+++ libgcc/soft-fp/adddf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a + b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/addsf3.c
===================================================================
--- libgcc/soft-fp/addsf3.c     (revision 228199)
+++ libgcc/soft-fp/addsf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a + b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/addtf3.c
===================================================================
--- libgcc/soft-fp/addtf3.c     (revision 228199)
+++ libgcc/soft-fp/addtf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a + b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/divdf3.c
===================================================================
--- libgcc/soft-fp/divdf3.c     (revision 228199)
+++ libgcc/soft-fp/divdf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a / b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/divsf3.c
===================================================================
--- libgcc/soft-fp/divsf3.c     (revision 228199)
+++ libgcc/soft-fp/divsf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a / b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/divtf3.c
===================================================================
--- libgcc/soft-fp/divtf3.c     (revision 228199)
+++ libgcc/soft-fp/divtf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a / b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/double.h
===================================================================
--- libgcc/soft-fp/double.h     (revision 228199)
+++ libgcc/soft-fp/double.h     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Definitions for IEEE Double Precision
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com),
                  Jakub Jelinek (j...@ultra.linux.cz),
@@ -30,6 +30,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef SOFT_FP_DOUBLE_H
+#define SOFT_FP_DOUBLE_H       1
+
 #if _FP_W_TYPE_SIZE < 32
 # error "Here's a nickel kid.  Go buy yourself a real computer."
 #endif
@@ -182,6 +185,8 @@ union _FP_UNION_D
 # define FP_CMP_UNORD_D(r, X, Y, ex)   _FP_CMP_UNORD (D, 2, (r), X, Y, (ex))
 
 # define FP_TO_INT_D(r, X, rsz, rsg)   _FP_TO_INT (D, 2, (r), X, (rsz), (rsg))
+# define FP_TO_INT_ROUND_D(r, X, rsz, rsg)     \
+  _FP_TO_INT_ROUND (D, 2, (r), X, (rsz), (rsg))
 # define FP_FROM_INT_D(X, r, rs, rt)   _FP_FROM_INT (D, 2, X, (r), (rs), rt)
 
 # define _FP_FRAC_HIGH_D(X)    _FP_FRAC_HIGH_2 (X)
@@ -304,6 +309,8 @@ union _FP_UNION_D
 # define FP_CMP_UNORD_D(r, X, Y, ex)   _FP_CMP_UNORD (D, 1, (r), X, Y, (ex))
 
 # define FP_TO_INT_D(r, X, rsz, rsg)   _FP_TO_INT (D, 1, (r), X, (rsz), (rsg))
+# define FP_TO_INT_ROUND_D(r, X, rsz, rsg)     \
+  _FP_TO_INT_ROUND (D, 1, (r), X, (rsz), (rsg))
 # define FP_FROM_INT_D(X, r, rs, rt)   _FP_FROM_INT (D, 1, X, (r), (rs), rt)
 
 # define _FP_FRAC_HIGH_D(X)    _FP_FRAC_HIGH_1 (X)
@@ -312,3 +319,5 @@ union _FP_UNION_D
 # define _FP_FRAC_HIGH_DW_D(X) _FP_FRAC_HIGH_2 (X)
 
 #endif /* W_TYPE_SIZE < 64 */
+
+#endif /* !SOFT_FP_DOUBLE_H */
Index: libgcc/soft-fp/eqdf2.c
===================================================================
--- libgcc/soft-fp/eqdf2.c      (revision 228199)
+++ libgcc/soft-fp/eqdf2.c      (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 otherwise
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/eqsf2.c
===================================================================
--- libgcc/soft-fp/eqsf2.c      (revision 228199)
+++ libgcc/soft-fp/eqsf2.c      (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 otherwise
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/eqtf2.c
===================================================================
--- libgcc/soft-fp/eqtf2.c      (revision 228199)
+++ libgcc/soft-fp/eqtf2.c      (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 otherwise
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/extenddftf2.c
===================================================================
--- libgcc/soft-fp/extenddftf2.c        (revision 228199)
+++ libgcc/soft-fp/extenddftf2.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a converted to IEEE quad
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/extended.h
===================================================================
--- libgcc/soft-fp/extended.h   (revision 228199)
+++ libgcc/soft-fp/extended.h   (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Definitions for IEEE Extended Precision.
-   Copyright (C) 1999-2014 Free Software Foundation, Inc.
+   Copyright (C) 1999-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek (j...@ultra.linux.cz).
 
@@ -27,6 +27,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef SOFT_FP_EXTENDED_H
+#define SOFT_FP_EXTENDED_H     1
+
 #if _FP_W_TYPE_SIZE < 32
 # error "Here's a nickel, kid. Go buy yourself a real computer."
 #endif
@@ -292,6 +295,8 @@ union _FP_UNION_E
 # define FP_CMP_UNORD_E(r, X, Y, ex)   _FP_CMP_UNORD (E, 4, (r), X, Y, (ex))
 
 # define FP_TO_INT_E(r, X, rsz, rsg)   _FP_TO_INT (E, 4, (r), X, (rsz), (rsg))
+# define FP_TO_INT_ROUND_E(r, X, rsz, rsg)     \
+  _FP_TO_INT_ROUND (E, 4, (r), X, (rsz), (rsg))
 # define FP_FROM_INT_E(X, r, rs, rt)   _FP_FROM_INT (E, 4, X, (r), (rs), rt)
 
 # define _FP_FRAC_HIGH_E(X)    (X##_f[2])
@@ -494,6 +499,8 @@ union _FP_UNION_E
 # define FP_CMP_UNORD_E(r, X, Y, ex)   _FP_CMP_UNORD (E, 2, (r), X, Y, (ex))
 
 # define FP_TO_INT_E(r, X, rsz, rsg)   _FP_TO_INT (E, 2, (r), X, (rsz), (rsg))
+# define FP_TO_INT_ROUND_E(r, X, rsz, rsg)     \
+  _FP_TO_INT_ROUND (E, 2, (r), X, (rsz), (rsg))
 # define FP_FROM_INT_E(X, r, rs, rt)   _FP_FROM_INT (E, 2, X, (r), (rs), rt)
 
 # define _FP_FRAC_HIGH_E(X)    (X##_f1)
@@ -502,3 +509,5 @@ union _FP_UNION_E
 # define _FP_FRAC_HIGH_DW_E(X) (X##_f[2])
 
 #endif /* not _FP_W_TYPE_SIZE < 64 */
+
+#endif /* !SOFT_FP_EXTENDED_H */
Index: libgcc/soft-fp/extendsfdf2.c
===================================================================
--- libgcc/soft-fp/extendsfdf2.c        (revision 228199)
+++ libgcc/soft-fp/extendsfdf2.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a converted to IEEE double
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/extendsftf2.c
===================================================================
--- libgcc/soft-fp/extendsftf2.c        (revision 228199)
+++ libgcc/soft-fp/extendsftf2.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a converted to IEEE quad
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/extendxftf2.c
===================================================================
--- libgcc/soft-fp/extendxftf2.c        (revision 228199)
+++ libgcc/soft-fp/extendxftf2.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a converted to IEEE quad
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/fixdfdi.c
===================================================================
--- libgcc/soft-fp/fixdfdi.c    (revision 228199)
+++ libgcc/soft-fp/fixdfdi.c    (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit signed integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixdfsi.c
===================================================================
--- libgcc/soft-fp/fixdfsi.c    (revision 228199)
+++ libgcc/soft-fp/fixdfsi.c    (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit signed integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixdfti.c
===================================================================
--- libgcc/soft-fp/fixdfti.c    (revision 228199)
+++ libgcc/soft-fp/fixdfti.c    (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert IEEE double to 128bit signed integer
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/fixsfdi.c
===================================================================
--- libgcc/soft-fp/fixsfdi.c    (revision 228199)
+++ libgcc/soft-fp/fixsfdi.c    (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit signed integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixsfsi.c
===================================================================
--- libgcc/soft-fp/fixsfsi.c    (revision 228199)
+++ libgcc/soft-fp/fixsfsi.c    (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit signed integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixsfti.c
===================================================================
--- libgcc/soft-fp/fixsfti.c    (revision 228199)
+++ libgcc/soft-fp/fixsfti.c    (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert IEEE single to 128bit signed integer
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/fixtfdi.c
===================================================================
--- libgcc/soft-fp/fixtfdi.c    (revision 228199)
+++ libgcc/soft-fp/fixtfdi.c    (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit signed integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixtfsi.c
===================================================================
--- libgcc/soft-fp/fixtfsi.c    (revision 228199)
+++ libgcc/soft-fp/fixtfsi.c    (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit signed integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixtfti.c
===================================================================
--- libgcc/soft-fp/fixtfti.c    (revision 228199)
+++ libgcc/soft-fp/fixtfti.c    (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert IEEE quad to 128bit signed integer
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/fixunsdfdi.c
===================================================================
--- libgcc/soft-fp/fixunsdfdi.c (revision 228199)
+++ libgcc/soft-fp/fixunsdfdi.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit unsigned integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixunsdfsi.c
===================================================================
--- libgcc/soft-fp/fixunsdfsi.c (revision 228199)
+++ libgcc/soft-fp/fixunsdfsi.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit unsigned integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixunsdfti.c
===================================================================
--- libgcc/soft-fp/fixunsdfti.c (revision 228199)
+++ libgcc/soft-fp/fixunsdfti.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert IEEE double to 128bit unsigned integer
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/fixunssfdi.c
===================================================================
--- libgcc/soft-fp/fixunssfdi.c (revision 228199)
+++ libgcc/soft-fp/fixunssfdi.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit unsigned integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixunssfsi.c
===================================================================
--- libgcc/soft-fp/fixunssfsi.c (revision 228199)
+++ libgcc/soft-fp/fixunssfsi.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit unsigned integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixunssfti.c
===================================================================
--- libgcc/soft-fp/fixunssfti.c (revision 228199)
+++ libgcc/soft-fp/fixunssfti.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert IEEE single to 128bit unsigned integer
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/fixunstfdi.c
===================================================================
--- libgcc/soft-fp/fixunstfdi.c (revision 228199)
+++ libgcc/soft-fp/fixunstfdi.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit unsigned integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixunstfsi.c
===================================================================
--- libgcc/soft-fp/fixunstfsi.c (revision 228199)
+++ libgcc/soft-fp/fixunstfsi.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit unsigned integer
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/fixunstfti.c
===================================================================
--- libgcc/soft-fp/fixunstfti.c (revision 228199)
+++ libgcc/soft-fp/fixunstfti.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert IEEE quad to 128bit unsigned integer
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/floatdidf.c
===================================================================
--- libgcc/soft-fp/floatdidf.c  (revision 228199)
+++ libgcc/soft-fp/floatdidf.c  (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit signed integer to IEEE double
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floatdisf.c
===================================================================
--- libgcc/soft-fp/floatdisf.c  (revision 228199)
+++ libgcc/soft-fp/floatdisf.c  (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit signed integer to IEEE single
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floatditf.c
===================================================================
--- libgcc/soft-fp/floatditf.c  (revision 228199)
+++ libgcc/soft-fp/floatditf.c  (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit signed integer to IEEE quad
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floatsidf.c
===================================================================
--- libgcc/soft-fp/floatsidf.c  (revision 228199)
+++ libgcc/soft-fp/floatsidf.c  (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit signed integer to IEEE double
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floatsisf.c
===================================================================
--- libgcc/soft-fp/floatsisf.c  (revision 228199)
+++ libgcc/soft-fp/floatsisf.c  (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit signed integer to IEEE single
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floatsitf.c
===================================================================
--- libgcc/soft-fp/floatsitf.c  (revision 228199)
+++ libgcc/soft-fp/floatsitf.c  (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit signed integer to IEEE quad
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floattidf.c
===================================================================
--- libgcc/soft-fp/floattidf.c  (revision 228199)
+++ libgcc/soft-fp/floattidf.c  (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 128bit signed integer to IEEE double
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/floattisf.c
===================================================================
--- libgcc/soft-fp/floattisf.c  (revision 228199)
+++ libgcc/soft-fp/floattisf.c  (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 128bit signed integer to IEEE single
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/floattitf.c
===================================================================
--- libgcc/soft-fp/floattitf.c  (revision 228199)
+++ libgcc/soft-fp/floattitf.c  (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 128bit signed integer to IEEE quad
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/floatundidf.c
===================================================================
--- libgcc/soft-fp/floatundidf.c        (revision 228199)
+++ libgcc/soft-fp/floatundidf.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit unsigned integer to IEEE double
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floatundisf.c
===================================================================
--- libgcc/soft-fp/floatundisf.c        (revision 228199)
+++ libgcc/soft-fp/floatundisf.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit unsigned integer to IEEE single
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floatunditf.c
===================================================================
--- libgcc/soft-fp/floatunditf.c        (revision 228199)
+++ libgcc/soft-fp/floatunditf.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit unsigned integer to IEEE quad
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floatunsidf.c
===================================================================
--- libgcc/soft-fp/floatunsidf.c        (revision 228199)
+++ libgcc/soft-fp/floatunsidf.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit unsigned integer to IEEE double
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floatunsisf.c
===================================================================
--- libgcc/soft-fp/floatunsisf.c        (revision 228199)
+++ libgcc/soft-fp/floatunsisf.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit unsigned integer to IEEE single
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floatunsitf.c
===================================================================
--- libgcc/soft-fp/floatunsitf.c        (revision 228199)
+++ libgcc/soft-fp/floatunsitf.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit unsigned integer to IEEE quad
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/floatuntidf.c
===================================================================
--- libgcc/soft-fp/floatuntidf.c        (revision 228199)
+++ libgcc/soft-fp/floatuntidf.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 128bit unsigned integer to IEEE double
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/floatuntisf.c
===================================================================
--- libgcc/soft-fp/floatuntisf.c        (revision 228199)
+++ libgcc/soft-fp/floatuntisf.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 128bit unsigned integer to IEEE single
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/floatuntitf.c
===================================================================
--- libgcc/soft-fp/floatuntitf.c        (revision 228199)
+++ libgcc/soft-fp/floatuntitf.c        (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 128bit unsigned integer to IEEE quad
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/gedf2.c
===================================================================
--- libgcc/soft-fp/gedf2.c      (revision 228199)
+++ libgcc/soft-fp/gedf2.c      (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/gesf2.c
===================================================================
--- libgcc/soft-fp/gesf2.c      (revision 228199)
+++ libgcc/soft-fp/gesf2.c      (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/getf2.c
===================================================================
--- libgcc/soft-fp/getf2.c      (revision 228199)
+++ libgcc/soft-fp/getf2.c      (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/ledf2.c
===================================================================
--- libgcc/soft-fp/ledf2.c      (revision 228199)
+++ libgcc/soft-fp/ledf2.c      (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/lesf2.c
===================================================================
--- libgcc/soft-fp/lesf2.c      (revision 228199)
+++ libgcc/soft-fp/lesf2.c      (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/letf2.c
===================================================================
--- libgcc/soft-fp/letf2.c      (revision 228199)
+++ libgcc/soft-fp/letf2.c      (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/muldf3.c
===================================================================
--- libgcc/soft-fp/muldf3.c     (revision 228199)
+++ libgcc/soft-fp/muldf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a * b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/mulsf3.c
===================================================================
--- libgcc/soft-fp/mulsf3.c     (revision 228199)
+++ libgcc/soft-fp/mulsf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a * b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/multf3.c
===================================================================
--- libgcc/soft-fp/multf3.c     (revision 228199)
+++ libgcc/soft-fp/multf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a * b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/negdf2.c
===================================================================
--- libgcc/soft-fp/negdf2.c     (revision 228199)
+++ libgcc/soft-fp/negdf2.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return -a
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/negsf2.c
===================================================================
--- libgcc/soft-fp/negsf2.c     (revision 228199)
+++ libgcc/soft-fp/negsf2.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return -a
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/negtf2.c
===================================================================
--- libgcc/soft-fp/negtf2.c     (revision 228199)
+++ libgcc/soft-fp/negtf2.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return -a
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/op-1.h
===================================================================
--- libgcc/soft-fp/op-1.h       (revision 228199)
+++ libgcc/soft-fp/op-1.h       (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Basic one-word fraction declaration and manipulation.
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com),
                  Jakub Jelinek (j...@ultra.linux.cz),
@@ -30,7 +30,10 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#define _FP_FRAC_DECL_1(X)     _FP_W_TYPE X##_f
+#ifndef SOFT_FP_OP_1_H
+#define SOFT_FP_OP_1_H 1
+
+#define _FP_FRAC_DECL_1(X)     _FP_W_TYPE X##_f _FP_ZERO_INIT
 #define _FP_FRAC_COPY_1(D, S)  (D##_f = S##_f)
 #define _FP_FRAC_SET_1(X, I)   (X##_f = I)
 #define _FP_FRAC_HIGH_1(X)     (X##_f)
@@ -362,3 +365,5 @@
 /* Convert FP values between word sizes.  */
 
 #define _FP_FRAC_COPY_1_1(D, S)                (D##_f = S##_f)
+
+#endif /* !SOFT_FP_OP_1_H */
Index: libgcc/soft-fp/op-2.h
===================================================================
--- libgcc/soft-fp/op-2.h       (revision 228199)
+++ libgcc/soft-fp/op-2.h       (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Basic two-word fraction declaration and manipulation.
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com),
                  Jakub Jelinek (j...@ultra.linux.cz),
@@ -30,7 +30,11 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#define _FP_FRAC_DECL_2(X)     _FP_W_TYPE X##_f0, X##_f1
+#ifndef SOFT_FP_OP_2_H
+#define SOFT_FP_OP_2_H 1
+
+#define _FP_FRAC_DECL_2(X)                             \
+  _FP_W_TYPE X##_f0 _FP_ZERO_INIT, X##_f1 _FP_ZERO_INIT
 #define _FP_FRAC_COPY_2(D, S)  (D##_f0 = S##_f0, D##_f1 = S##_f1)
 #define _FP_FRAC_SET_2(X, I)   __FP_FRAC_SET_2 (X, I)
 #define _FP_FRAC_HIGH_2(X)     (X##_f1)
@@ -454,8 +458,8 @@
                                       _p240, _q240, _r240, _s240;      \
       UDItype _t240, _u240, _v240, _w240, _x240, _y240 = 0;            \
                                                                        \
-      if ((wfracbits) < 106 || (wfracbits) > 120)                      \
-       abort ();                                                       \
+      _FP_STATIC_ASSERT ((wfracbits) >= 106 && (wfracbits) <= 120,     \
+                        "wfracbits out of range");                     \
                                                                        \
       setfetz;                                                         \
                                                                        \
@@ -697,3 +701,5 @@
 #define _FP_FRAC_COPY_2_1(D, S)                ((D##_f0 = S##_f), (D##_f1 = 0))
 
 #define _FP_FRAC_COPY_2_2(D, S)                _FP_FRAC_COPY_2 (D, S)
+
+#endif /* !SOFT_FP_OP_2_H */
Index: libgcc/soft-fp/op-4.h
===================================================================
--- libgcc/soft-fp/op-4.h       (revision 228199)
+++ libgcc/soft-fp/op-4.h       (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Basic four-word fraction declaration and manipulation.
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com),
                  Jakub Jelinek (j...@ultra.linux.cz),
@@ -30,6 +30,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef SOFT_FP_OP_4_H
+#define SOFT_FP_OP_4_H 1
+
 #define _FP_FRAC_DECL_4(X)     _FP_W_TYPE X##_f[4]
 #define _FP_FRAC_COPY_4(D, S)                  \
   (D##_f[0] = S##_f[0], D##_f[1] = S##_f[1],   \
@@ -868,3 +871,5 @@
   while (0)
 
 #define _FP_FRAC_COPY_4_4(D, S)        _FP_FRAC_COPY_4 (D, S)
+
+#endif /* !SOFT_FP_OP_4_H */
Index: libgcc/soft-fp/op-8.h
===================================================================
--- libgcc/soft-fp/op-8.h       (revision 228199)
+++ libgcc/soft-fp/op-8.h       (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Basic eight-word fraction declaration and manipulation.
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com),
                  Jakub Jelinek (j...@ultra.linux.cz) and
@@ -29,6 +29,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef SOFT_FP_OP_8_H
+#define SOFT_FP_OP_8_H 1
+
 /* We need just a few things from here for op-4, if we ever need some
    other macros, they can be added.  */
 #define _FP_FRAC_DECL_8(X)     _FP_W_TYPE X##_f[8]
@@ -143,3 +146,5 @@
       X##_f[0] |= (_FP_FRAC_SRS_8_s != 0);                             \
     }                                                                  \
   while (0)
+
+#endif /* !SOFT_FP_OP_8_H */
Index: libgcc/soft-fp/op-common.h
===================================================================
--- libgcc/soft-fp/op-common.h  (revision 228199)
+++ libgcc/soft-fp/op-common.h  (working copy)
@@ -1,5 +1,5 @@
 /* Software floating-point emulation. Common operations.
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com),
                  Jakub Jelinek (j...@ultra.linux.cz),
@@ -29,10 +29,13 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#define _FP_DECL(wc, X)                                \
-  _FP_I_TYPE X##_c __attribute__ ((unused));   \
-  _FP_I_TYPE X##_s __attribute__ ((unused));   \
-  _FP_I_TYPE X##_e __attribute__ ((unused));   \
+#ifndef SOFT_FP_OP_COMMON_H
+#define SOFT_FP_OP_COMMON_H    1
+
+#define _FP_DECL(wc, X)                                                \
+  _FP_I_TYPE X##_c __attribute__ ((unused)) _FP_ZERO_INIT;     \
+  _FP_I_TYPE X##_s __attribute__ ((unused)) _FP_ZERO_INIT;     \
+  _FP_I_TYPE X##_e __attribute__ ((unused)) _FP_ZERO_INIT;     \
   _FP_FRAC_DECL_##wc (X)
 
 /* Test whether the qNaN bit denotes a signaling NaN.  */
@@ -414,6 +417,7 @@
       if (X##_s == Y##_s)                                              \
        {                                                               \
          /* Addition.  */                                              \
+         __label__ add1, add2, add3, add_done;                         \
          R##_s = X##_s;                                                \
          int _FP_ADD_INTERNAL_ediff = X##_e - Y##_e;                   \
          if (_FP_ADD_INTERNAL_ediff > 0)                               \
@@ -599,6 +603,7 @@
       else                                                             \
        {                                                               \
          /* Subtraction.  */                                           \
+         __label__ sub1, sub2, sub3, norm, sub_done;                   \
          int _FP_ADD_INTERNAL_ediff = X##_e - Y##_e;                   \
          if (_FP_ADD_INTERNAL_ediff > 0)                               \
            {                                                           \
@@ -922,7 +927,7 @@
          break;                                                \
                                                                \
        default:                                                \
-         abort ();                                             \
+         _FP_UNREACHABLE;                                      \
        }                                                       \
     }                                                          \
   while (0)
@@ -933,6 +938,7 @@
 #define _FP_FMA(fs, wc, dwc, R, X, Y, Z)                               \
   do                                                                   \
     {                                                                  \
+      __label__ done_fma;                                              \
       FP_DECL_##fs (_FP_FMA_T);                                                
\
       _FP_FMA_T##_s = X##_s ^ Y##_s;                                   \
       _FP_FMA_T##_e = X##_e + Y##_e + 1;                               \
@@ -1086,7 +1092,7 @@
          break;                                                        \
                                                                        \
        default:                                                        \
-         abort ();                                                     \
+         _FP_UNREACHABLE;                                              \
        }                                                               \
                                                                        \
       /* T = X * Y is zero, infinity or NaN.  */                       \
@@ -1113,6 +1119,7 @@
          R##_s = Z##_s;                                                \
          _FP_FRAC_COPY_##wc (R, Z);                                    \
          R##_c = Z##_c;                                                \
+         R##_e = Z##_e;                                                \
          break;                                                        \
                                                                        \
        case _FP_CLS_COMBINE (FP_CLS_INF, FP_CLS_INF):                  \
@@ -1141,7 +1148,7 @@
          break;                                                        \
                                                                        \
        default:                                                        \
-         abort ();                                                     \
+         _FP_UNREACHABLE;                                              \
        }                                                               \
     done_fma: ;                                                                
\
     }                                                                  \
@@ -1208,7 +1215,7 @@
          break;                                                \
                                                                \
        default:                                                \
-         abort ();                                             \
+         _FP_UNREACHABLE;                                      \
        }                                                       \
     }                                                          \
   while (0)
@@ -1248,6 +1255,46 @@
     }                                                                  \
   while (0)
 
+/* Helper for comparisons.  If denormal operands would raise an
+   exception, check for them, and flush to zero as appropriate
+   (otherwise, we need only check and flush to zero if it might affect
+   the result, which is done later with _FP_CMP_CHECK_FLUSH_ZERO).  */
+#define _FP_CMP_CHECK_DENORM(fs, wc, X, Y)                             \
+  do                                                                   \
+    {                                                                  \
+      if (FP_EX_DENORM != 0)                                           \
+       {                                                               \
+         /* We must ensure the correct exceptions are raised for       \
+            denormal operands, even though this may not affect the     \
+            result of the comparison.  */                              \
+         if (FP_DENORM_ZERO)                                           \
+           {                                                           \
+             _FP_CHECK_FLUSH_ZERO (fs, wc, X);                         \
+             _FP_CHECK_FLUSH_ZERO (fs, wc, Y);                         \
+           }                                                           \
+         else                                                          \
+           {                                                           \
+             if ((X##_e == 0 && !_FP_FRAC_ZEROP_##wc (X))              \
+                 || (Y##_e == 0 && !_FP_FRAC_ZEROP_##wc (Y)))          \
+               FP_SET_EXCEPTION (FP_EX_DENORM);                        \
+           }                                                           \
+       }                                                               \
+    }                                                                  \
+  while (0)
+
+/* Helper for comparisons.  Check for flushing denormals for zero if
+   we didn't need to check earlier for any denormal operands.  */
+#define _FP_CMP_CHECK_FLUSH_ZERO(fs, wc, X, Y) \
+  do                                           \
+    {                                          \
+      if (FP_EX_DENORM == 0)                   \
+       {                                       \
+         _FP_CHECK_FLUSH_ZERO (fs, wc, X);     \
+         _FP_CHECK_FLUSH_ZERO (fs, wc, Y);     \
+       }                                       \
+    }                                          \
+  while (0)
+
 /* Main differential comparison routine.  The inputs should be raw not
    cooked.  The return is -1, 0, 1 for normal values, UN
    otherwise.  */
@@ -1255,6 +1302,7 @@
 #define _FP_CMP(fs, wc, ret, X, Y, un, ex)                             \
   do                                                                   \
     {                                                                  \
+      _FP_CMP_CHECK_DENORM (fs, wc, X, Y);                             \
       /* NANs are unordered.  */                                       \
       if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc (X))       \
          || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc (Y)))    \
@@ -1267,8 +1315,7 @@
          int _FP_CMP_is_zero_x;                                        \
          int _FP_CMP_is_zero_y;                                        \
                                                                        \
-         _FP_CHECK_FLUSH_ZERO (fs, wc, X);                             \
-         _FP_CHECK_FLUSH_ZERO (fs, wc, Y);                             \
+         _FP_CMP_CHECK_FLUSH_ZERO (fs, wc, X, Y);                      \
                                                                        \
          _FP_CMP_is_zero_x                                             \
            = (!X##_e && _FP_FRAC_ZEROP_##wc (X)) ? 1 : 0;              \
@@ -1303,6 +1350,7 @@
 #define _FP_CMP_EQ(fs, wc, ret, X, Y, ex)                              \
   do                                                                   \
     {                                                                  \
+      _FP_CMP_CHECK_DENORM (fs, wc, X, Y);                             \
       /* NANs are unordered.  */                                       \
       if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc (X))       \
          || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc (Y)))    \
@@ -1312,8 +1360,7 @@
        }                                                               \
       else                                                             \
        {                                                               \
-         _FP_CHECK_FLUSH_ZERO (fs, wc, X);                             \
-         _FP_CHECK_FLUSH_ZERO (fs, wc, Y);                             \
+         _FP_CMP_CHECK_FLUSH_ZERO (fs, wc, X, Y);                      \
                                                                        \
          (ret) = !(X##_e == Y##_e                                      \
                    && _FP_FRAC_EQ_##wc (X, Y)                          \
@@ -1328,6 +1375,7 @@
 #define _FP_CMP_UNORD(fs, wc, ret, X, Y, ex)                           \
   do                                                                   \
     {                                                                  \
+      _FP_CMP_CHECK_DENORM (fs, wc, X, Y);                             \
       (ret) = ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc (X))  \
               || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc (Y))); \
       if (ret)                                                         \
@@ -1525,19 +1573,234 @@
     }                                                                  \
   while (0)
 
+/* Convert from floating point to integer, rounding according to the
+   current rounding direction.  Input is raw.  RSIGNED is as for
+   _FP_TO_INT.  */
+#define _FP_TO_INT_ROUND(fs, wc, r, X, rsize, rsigned)                 \
+  do                                                                   \
+    {                                                                  \
+      __label__ _FP_TO_INT_ROUND_done;                                 \
+      if (X##_e < _FP_EXPBIAS_##fs)                                    \
+       {                                                               \
+         int _FP_TO_INT_ROUND_rounds_away = 0;                         \
+         if (X##_e == 0)                                               \
+           {                                                           \
+             if (_FP_FRAC_ZEROP_##wc (X))                              \
+               {                                                       \
+                 (r) = 0;                                              \
+                 goto _FP_TO_INT_ROUND_done;                           \
+               }                                                       \
+             else                                                      \
+               {                                                       \
+                 FP_SET_EXCEPTION (FP_EX_DENORM);                      \
+                 if (FP_DENORM_ZERO)                                   \
+                   {                                                   \
+                     (r) = 0;                                          \
+                     goto _FP_TO_INT_ROUND_done;                       \
+                   }                                                   \
+               }                                                       \
+           }                                                           \
+         /* The result is 0, 1 or -1 depending on the rounding mode;   \
+            -1 may cause overflow in the unsigned case.  */            \
+         switch (FP_ROUNDMODE)                                         \
+           {                                                           \
+           case FP_RND_NEAREST:                                        \
+             _FP_TO_INT_ROUND_rounds_away                              \
+               = (X##_e == _FP_EXPBIAS_##fs - 1                        \
+                  && !_FP_FRAC_ZEROP_##wc (X));                        \
+             break;                                                    \
+           case FP_RND_ZERO:                                           \
+             /* _FP_TO_INT_ROUND_rounds_away is already 0.  */         \
+             break;                                                    \
+           case FP_RND_PINF:                                           \
+             _FP_TO_INT_ROUND_rounds_away = !X##_s;                    \
+             break;                                                    \
+           case FP_RND_MINF:                                           \
+             _FP_TO_INT_ROUND_rounds_away = X##_s;                     \
+             break;                                                    \
+           }                                                           \
+         if ((rsigned) == 0 && _FP_TO_INT_ROUND_rounds_away && X##_s)  \
+           {                                                           \
+             /* Result of -1 for an unsigned conversion.  */           \
+             (r) = 0;                                                  \
+             FP_SET_EXCEPTION (FP_EX_INVALID | FP_EX_INVALID_CVI);     \
+           }                                                           \
+         else if ((rsize) == 1 && (rsigned) > 0                        \
+                  && _FP_TO_INT_ROUND_rounds_away && !X##_s)           \
+           {                                                           \
+             /* Converting to a 1-bit signed bit-field, which cannot   \
+                represent +1.  */                                      \
+             (r) = ((rsigned) == 2 ? -1 : 0);                          \
+             FP_SET_EXCEPTION (FP_EX_INVALID | FP_EX_INVALID_CVI);     \
+           }                                                           \
+         else                                                          \
+           {                                                           \
+             (r) = (_FP_TO_INT_ROUND_rounds_away                       \
+                    ? (X##_s ? -1 : 1)                                 \
+                    : 0);                                              \
+             FP_SET_EXCEPTION (FP_EX_INEXACT);                         \
+           }                                                           \
+       }                                                               \
+      else if ((rsigned) == 2                                          \
+              && (X##_e                                                \
+                  >= ((_FP_EXPMAX_##fs                                 \
+                       < _FP_EXPBIAS_##fs + _FP_FRACBITS_##fs + (rsize) - 1) \
+                      ? _FP_EXPMAX_##fs                                \
+                      : _FP_EXPBIAS_##fs + _FP_FRACBITS_##fs + (rsize) - 1))) \
+       {                                                               \
+         /* Overflow resulting in 0.  */                               \
+         (r) = 0;                                                      \
+         FP_SET_EXCEPTION (FP_EX_INVALID                               \
+                           | FP_EX_INVALID_CVI                         \
+                           | ((FP_EX_INVALID_SNAN                      \
+                               && _FP_ISSIGNAN (fs, wc, X))            \
+                              ? FP_EX_INVALID_SNAN                     \
+                              : 0));                                   \
+       }                                                               \
+      else if ((rsigned) != 2                                          \
+              && (X##_e >= (_FP_EXPMAX_##fs < _FP_EXPBIAS_##fs + (rsize) \
+                            ? _FP_EXPMAX_##fs                          \
+                            : (_FP_EXPBIAS_##fs + (rsize)              \
+                               - ((rsigned) > 0 && !X##_s)))           \
+                  || ((rsigned) == 0 && X##_s)))                       \
+       {                                                               \
+         /* Definite overflow (does not require rounding to tell).  */ \
+         if ((rsigned) != 0)                                           \
+           {                                                           \
+             (r) = 1;                                                  \
+             (r) <<= (rsize) - 1;                                      \
+             (r) -= 1 - X##_s;                                         \
+           }                                                           \
+         else                                                          \
+           {                                                           \
+             (r) = 0;                                                  \
+             if (!X##_s)                                               \
+               (r) = ~(r);                                             \
+           }                                                           \
+                                                                       \
+         FP_SET_EXCEPTION (FP_EX_INVALID                               \
+                           | FP_EX_INVALID_CVI                         \
+                           | ((FP_EX_INVALID_SNAN                      \
+                               && _FP_ISSIGNAN (fs, wc, X))            \
+                              ? FP_EX_INVALID_SNAN                     \
+                              : 0));                                   \
+       }                                                               \
+      else                                                             \
+       {                                                               \
+         /* The value is finite, with magnitude at least 1.  If        \
+            the conversion is unsigned, the value is positive.         \
+            If RSIGNED is not 2, the value does not definitely         \
+            overflow by virtue of its exponent, but may still turn     \
+            out to overflow after rounding; if RSIGNED is 2, the       \
+            exponent may be such that the value definitely overflows,  \
+            but at least one mantissa bit will not be shifted out.  */ \
+         int _FP_TO_INT_ROUND_inexact = 0;                             \
+         _FP_FRAC_HIGH_RAW_##fs (X) |= _FP_IMPLBIT_##fs;               \
+         if (X##_e >= _FP_EXPBIAS_##fs + _FP_FRACBITS_##fs - 1)        \
+           {                                                           \
+             /* The value is an integer, no rounding needed.  */       \
+             _FP_FRAC_ASSEMBLE_##wc ((r), X, (rsize));                 \
+             (r) <<= X##_e - _FP_EXPBIAS_##fs - _FP_FRACBITS_##fs + 1; \
+           }                                                           \
+         else                                                          \
+           {                                                           \
+             /* May need to shift in order to round (unless there      \
+                are exactly _FP_WORKBITS fractional bits already).  */ \
+             int _FP_TO_INT_ROUND_rshift                               \
+               = (_FP_FRACBITS_##fs + _FP_EXPBIAS_##fs                 \
+                  - 1 - _FP_WORKBITS - X##_e);                         \
+             if (_FP_TO_INT_ROUND_rshift > 0)                          \
+               _FP_FRAC_SRS_##wc (X, _FP_TO_INT_ROUND_rshift,          \
+                                  _FP_WFRACBITS_##fs);                 \
+             else if (_FP_TO_INT_ROUND_rshift < 0)                     \
+               _FP_FRAC_SLL_##wc (X, -_FP_TO_INT_ROUND_rshift);        \
+             /* Round like _FP_ROUND, but setting                      \
+                _FP_TO_INT_ROUND_inexact instead of directly setting   \
+                the "inexact" exception, since it may turn out we      \
+                should set "invalid" instead.  */                      \
+             if (_FP_FRAC_LOW_##wc (X) & 7)                            \
+               {                                                       \
+                 _FP_TO_INT_ROUND_inexact = 1;                         \
+                 switch (FP_ROUNDMODE)                                 \
+                   {                                                   \
+                   case FP_RND_NEAREST:                                \
+                     _FP_ROUND_NEAREST (wc, X);                        \
+                     break;                                            \
+                   case FP_RND_ZERO:                                   \
+                     _FP_ROUND_ZERO (wc, X);                           \
+                     break;                                            \
+                   case FP_RND_PINF:                                   \
+                     _FP_ROUND_PINF (wc, X);                           \
+                     break;                                            \
+                   case FP_RND_MINF:                                   \
+                     _FP_ROUND_MINF (wc, X);                           \
+                     break;                                            \
+                   }                                                   \
+               }                                                       \
+             _FP_FRAC_SRL_##wc (X, _FP_WORKBITS);                      \
+             _FP_FRAC_ASSEMBLE_##wc ((r), X, (rsize));                 \
+           }                                                           \
+         if ((rsigned) != 0 && X##_s)                                  \
+           (r) = -(r);                                                 \
+         /* An exponent of RSIZE - 1 always needs testing for          \
+            overflow (either directly overflowing, or overflowing      \
+            when rounding up results in 2^RSIZE).  An exponent of      \
+            RSIZE - 2 can overflow for positive values when rounding   \
+            up to 2^(RSIZE-1), but cannot overflow for negative        \
+            values.  Smaller exponents cannot overflow.  */            \
+         if (X##_e >= (_FP_EXPBIAS_##fs + (rsize) - 1                  \
+                       - ((rsigned) > 0 && !X##_s)))                   \
+           {                                                           \
+             if (X##_e > _FP_EXPBIAS_##fs + (rsize) - 1                \
+                 || (X##_e == _FP_EXPBIAS_##fs + (rsize) - 1           \
+                     && (X##_s                                         \
+                         ? (r) != (((typeof (r)) 1) << ((rsize) - 1))  \
+                         : ((rsigned) > 0 || (r) == 0)))               \
+                 || ((rsigned) > 0                                     \
+                     && !X##_s                                         \
+                     && X##_e == _FP_EXPBIAS_##fs + (rsize) - 2        \
+                     && (r) == (((typeof (r)) 1) << ((rsize) - 1))))   \
+               {                                                       \
+                 if ((rsigned) != 2)                                   \
+                   {                                                   \
+                     if ((rsigned) != 0)                               \
+                       {                                               \
+                         (r) = 1;                                      \
+                         (r) <<= (rsize) - 1;                          \
+                         (r) -= 1 - X##_s;                             \
+                       }                                               \
+                     else                                              \
+                       {                                               \
+                         (r) = 0;                                      \
+                         (r) = ~(r);                                   \
+                       }                                               \
+                   }                                                   \
+                 _FP_TO_INT_ROUND_inexact = 0;                         \
+                 FP_SET_EXCEPTION (FP_EX_INVALID | FP_EX_INVALID_CVI); \
+               }                                                       \
+           }                                                           \
+         if (_FP_TO_INT_ROUND_inexact)                                 \
+           FP_SET_EXCEPTION (FP_EX_INEXACT);                           \
+       }                                                               \
+    _FP_TO_INT_ROUND_done: ;                                           \
+    }                                                                  \
+  while (0)
+
 /* Convert integer to fp.  Output is raw.  RTYPE is unsigned even if
    input is signed.  */
 #define _FP_FROM_INT(fs, wc, X, r, rsize, rtype)                       \
   do                                                                   \
     {                                                                  \
+      __label__ pack_semiraw;                                          \
       if (r)                                                           \
        {                                                               \
-         rtype _FP_FROM_INT_ur;                                        \
+         rtype _FP_FROM_INT_ur = (r);                                  \
                                                                        \
          if ((X##_s = ((r) < 0)))                                      \
-           (r) = -(rtype) (r);                                         \
+           _FP_FROM_INT_ur = -_FP_FROM_INT_ur;                         \
                                                                        \
-         _FP_FROM_INT_ur = (rtype) (r);                                \
+         _FP_STATIC_ASSERT ((rsize) <= 2 * _FP_W_TYPE_SIZE,            \
+                            "rsize too large");                        \
          (void) (((rsize) <= _FP_W_TYPE_SIZE)                          \
                  ? ({                                                  \
                      int _FP_FROM_INT_lz;                              \
@@ -1546,17 +1809,15 @@
                      X##_e = (_FP_EXPBIAS_##fs + _FP_W_TYPE_SIZE - 1   \
                               - _FP_FROM_INT_lz);                      \
                    })                                                  \
-                 : (((rsize) <= 2 * _FP_W_TYPE_SIZE)                   \
-                    ? ({                                               \
-                        int _FP_FROM_INT_lz;                           \
-                        __FP_CLZ_2 (_FP_FROM_INT_lz,                   \
-                                    (_FP_W_TYPE) (_FP_FROM_INT_ur      \
-                                                  >> _FP_W_TYPE_SIZE), \
-                                    (_FP_W_TYPE) _FP_FROM_INT_ur);     \
-                        X##_e = (_FP_EXPBIAS_##fs + 2 * _FP_W_TYPE_SIZE - 1 \
-                                 - _FP_FROM_INT_lz);                   \
-                      })                                               \
-                    : (abort (), 0)));                                 \
+                 : ({                                          \
+                     int _FP_FROM_INT_lz;                              \
+                     __FP_CLZ_2 (_FP_FROM_INT_lz,                      \
+                                 (_FP_W_TYPE) (_FP_FROM_INT_ur         \
+                                               >> _FP_W_TYPE_SIZE),    \
+                                 (_FP_W_TYPE) _FP_FROM_INT_ur);        \
+                     X##_e = (_FP_EXPBIAS_##fs + 2 * _FP_W_TYPE_SIZE - 1 \
+                              - _FP_FROM_INT_lz);                      \
+                   }));                                                \
                                                                        \
          if ((rsize) - 1 + _FP_EXPBIAS_##fs >= _FP_EXPMAX_##fs         \
              && X##_e >= _FP_EXPMAX_##fs)                              \
@@ -1608,16 +1869,24 @@
 
 
 /* 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                      \
-         || (_FP_EXPMAX_##dfs - _FP_EXPBIAS_##dfs                      \
-             < _FP_EXPMAX_##sfs - _FP_EXPBIAS_##sfs)                   \
-         || (_FP_EXPBIAS_##dfs < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1 \
-             && _FP_EXPBIAS_##dfs != _FP_EXPBIAS_##sfs))               \
-       abort ();                                                       \
+      _FP_STATIC_ASSERT (_FP_FRACBITS_##dfs >= _FP_FRACBITS_##sfs,     \
+                        "destination mantissa narrower than source");  \
+      _FP_STATIC_ASSERT ((_FP_EXPMAX_##dfs - _FP_EXPBIAS_##dfs         \
+                         >= _FP_EXPMAX_##sfs - _FP_EXPBIAS_##sfs),     \
+                        "destination max exponent smaller"             \
+                        " than source");                               \
+      _FP_STATIC_ASSERT (((_FP_EXPBIAS_##dfs                           \
+                          >= (_FP_EXPBIAS_##sfs                        \
+                              + _FP_FRACBITS_##sfs - 1))               \
+                         || (_FP_EXPBIAS_##dfs == _FP_EXPBIAS_##sfs)), \
+                        "source subnormals do not all become normal,"  \
+                        " but bias not the same");                     \
       D##_s = S##_s;                                                   \
       _FP_FRAC_COPY_##dwc##_##swc (D, S);                              \
       if (_FP_EXP_NORMAL (sfs, swc, S))                                        
\
@@ -1659,12 +1928,13 @@
              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);                          \
                }                                                       \
            }                                                           \
        }                                                               \
@@ -1671,15 +1941,22 @@
     }                                                                  \
   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)                             \
   do                                                                   \
     {                                                                  \
-      if (_FP_FRACBITS_##sfs < _FP_FRACBITS_##dfs                      \
-         || (_FP_EXPBIAS_##sfs < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1 \
-             && _FP_EXPBIAS_##sfs != _FP_EXPBIAS_##dfs))               \
-       abort ();                                                       \
+      _FP_STATIC_ASSERT (_FP_FRACBITS_##sfs >= _FP_FRACBITS_##dfs,     \
+                        "destination mantissa wider than source");     \
+      _FP_STATIC_ASSERT (((_FP_EXPBIAS_##sfs                           \
+                          >= (_FP_EXPBIAS_##dfs                        \
+                              + _FP_FRACBITS_##dfs - 1))               \
+                         || _FP_EXPBIAS_##sfs == _FP_EXPBIAS_##dfs),   \
+                        "source subnormals do not all become same,"    \
+                        " but bias not the same");                     \
       D##_s = S##_s;                                                   \
       if (_FP_EXP_NORMAL (sfs, swc, S))                                        
\
        {                                                               \
@@ -1768,14 +2045,18 @@
 # define __FP_CLZ(r, x)                                                        
\
   do                                                                   \
     {                                                                  \
+      _FP_STATIC_ASSERT ((sizeof (_FP_W_TYPE) == sizeof (unsigned int) \
+                         || (sizeof (_FP_W_TYPE)                       \
+                             == sizeof (unsigned long))                \
+                         || (sizeof (_FP_W_TYPE)                       \
+                             == sizeof (unsigned long long))),         \
+                        "_FP_W_TYPE size unsupported for clz");        \
       if (sizeof (_FP_W_TYPE) == sizeof (unsigned int))                        
\
        (r) = __builtin_clz (x);                                        \
       else if (sizeof (_FP_W_TYPE) == sizeof (unsigned long))          \
        (r) = __builtin_clzl (x);                                       \
-      else if (sizeof (_FP_W_TYPE) == sizeof (unsigned long long))     \
+      else /* sizeof (_FP_W_TYPE) == sizeof (unsigned long long).  */  \
        (r) = __builtin_clzll (x);                                      \
-      else                                                             \
-       abort ();                                                       \
     }                                                                  \
   while (0)
 #endif /* ndef __FP_CLZ */
@@ -1844,3 +2125,5 @@
 #define _FP_DIV_MEAT_1_loop(fs, R, X, Y)  _FP_DIV_MEAT_N_loop (fs, 1, R, X, Y)
 #define _FP_DIV_MEAT_2_loop(fs, R, X, Y)  _FP_DIV_MEAT_N_loop (fs, 2, R, X, Y)
 #define _FP_DIV_MEAT_4_loop(fs, R, X, Y)  _FP_DIV_MEAT_N_loop (fs, 4, R, X, Y)
+
+#endif /* !SOFT_FP_OP_COMMON_H */
Index: libgcc/soft-fp/quad.h
===================================================================
--- libgcc/soft-fp/quad.h       (revision 228199)
+++ libgcc/soft-fp/quad.h       (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Definitions for IEEE Quad Precision.
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com),
                  Jakub Jelinek (j...@ultra.linux.cz),
@@ -30,6 +30,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef SOFT_FP_QUAD_H
+#define SOFT_FP_QUAD_H 1
+
 #if _FP_W_TYPE_SIZE < 32
 # error "Here's a nickel, kid. Go buy yourself a real computer."
 #endif
@@ -187,6 +190,8 @@ union _FP_UNION_Q
 # define FP_CMP_UNORD_Q(r, X, Y, ex)   _FP_CMP_UNORD (Q, 4, (r), X, Y, (ex))
 
 # define FP_TO_INT_Q(r, X, rsz, rsg)   _FP_TO_INT (Q, 4, (r), X, (rsz), (rsg))
+# define FP_TO_INT_ROUND_Q(r, X, rsz, rsg)     \
+  _FP_TO_INT_ROUND (Q, 4, (r), X, (rsz), (rsg))
 # define FP_FROM_INT_Q(X, r, rs, rt)   _FP_FROM_INT (Q, 4, X, (r), (rs), rt)
 
 # define _FP_FRAC_HIGH_Q(X)    _FP_FRAC_HIGH_4 (X)
@@ -311,6 +316,8 @@ union _FP_UNION_Q
 # define FP_CMP_UNORD_Q(r, X, Y, ex)   _FP_CMP_UNORD (Q, 2, (r), X, Y, (ex))
 
 # define FP_TO_INT_Q(r, X, rsz, rsg)   _FP_TO_INT (Q, 2, (r), X, (rsz), (rsg))
+# define FP_TO_INT_ROUND_Q(r, X, rsz, rsg)     \
+  _FP_TO_INT_ROUND (Q, 2, (r), X, (rsz), (rsg))
 # define FP_FROM_INT_Q(X, r, rs, rt)   _FP_FROM_INT (Q, 2, X, (r), (rs), rt)
 
 # define _FP_FRAC_HIGH_Q(X)    _FP_FRAC_HIGH_2 (X)
@@ -319,3 +326,5 @@ union _FP_UNION_Q
 # define _FP_FRAC_HIGH_DW_Q(X) _FP_FRAC_HIGH_4 (X)
 
 #endif /* not _FP_W_TYPE_SIZE < 64 */
+
+#endif /* !SOFT_FP_QUAD_H */
Index: libgcc/soft-fp/single.h
===================================================================
--- libgcc/soft-fp/single.h     (revision 228199)
+++ libgcc/soft-fp/single.h     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Definitions for IEEE Single Precision.
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com),
                  Jakub Jelinek (j...@ultra.linux.cz),
@@ -30,6 +30,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef SOFT_FP_SINGLE_H
+#define SOFT_FP_SINGLE_H       1
+
 #if _FP_W_TYPE_SIZE < 32
 # error "Here's a nickel kid.  Go buy yourself a real computer."
 #endif
@@ -180,6 +183,8 @@ union _FP_UNION_S
 #define FP_CMP_UNORD_S(r, X, Y, ex)    _FP_CMP_UNORD (S, 1, (r), X, Y, (ex))
 
 #define FP_TO_INT_S(r, X, rsz, rsg)    _FP_TO_INT (S, 1, (r), X, (rsz), (rsg))
+#define FP_TO_INT_ROUND_S(r, X, rsz, rsg)      \
+  _FP_TO_INT_ROUND (S, 1, (r), X, (rsz), (rsg))
 #define FP_FROM_INT_S(X, r, rs, rt)    _FP_FROM_INT (S, 1, X, (r), (rs), rt)
 
 #define _FP_FRAC_HIGH_S(X)     _FP_FRAC_HIGH_1 (X)
@@ -190,3 +195,5 @@ union _FP_UNION_S
 #else
 # define _FP_FRAC_HIGH_DW_S(X) _FP_FRAC_HIGH_1 (X)
 #endif
+
+#endif /* !SOFT_FP_SINGLE_H */
Index: libgcc/soft-fp/soft-fp.h
===================================================================
--- libgcc/soft-fp/soft-fp.h    (revision 228199)
+++ libgcc/soft-fp/soft-fp.h    (working copy)
@@ -1,5 +1,5 @@
 /* Software floating-point emulation.
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com),
                  Jakub Jelinek (j...@ultra.linux.cz),
@@ -30,10 +30,14 @@
    <http://www.gnu.org/licenses/>.  */
 
 #ifndef SOFT_FP_H
-#define SOFT_FP_H
+#define SOFT_FP_H      1
 
 #ifdef _LIBC
 # include <sfp-machine.h>
+#elif defined __KERNEL__
+/* The Linux kernel uses asm/ names for architecture-specific
+   files.  */
+# include <asm/sfp-machine.h>
 #else
 # include "sfp-machine.h"
 #endif
@@ -47,6 +51,37 @@
 # endif
 #endif
 
+/* For unreachable default cases in switch statements over bitwise OR
+   of FP_CLS_* values.  */
+#if (defined __GNUC__                                                  \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
+# define _FP_UNREACHABLE       __builtin_unreachable ()
+#else
+# define _FP_UNREACHABLE       abort ()
+#endif
+
+#if ((defined __GNUC__                                                 \
+      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))     \
+     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
+# define _FP_STATIC_ASSERT(expr, msg)          \
+  _Static_assert ((expr), msg)
+#else
+# define _FP_STATIC_ASSERT(expr, msg)                                  \
+  extern int (*__Static_assert_function (void))                                
\
+    [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
+#endif
+
+/* In the Linux kernel, some architectures have a single function that
+   uses different kinds of unpacking and packing depending on the
+   instruction being emulated, meaning it is not readily visible to
+   the compiler that variables from _FP_DECL and _FP_FRAC_DECL_*
+   macros are only used in cases where they were initialized.  */
+#ifdef __KERNEL__
+# define _FP_ZERO_INIT         = 0
+#else
+# define _FP_ZERO_INIT
+#endif
+
 #define _FP_WORKBITS           3
 #define _FP_WORK_LSB           ((_FP_W_TYPE) 1 << 3)
 #define _FP_WORK_ROUND         ((_FP_W_TYPE) 1 << 2)
@@ -316,10 +351,4 @@ typedef USItype UHWtype;
 # endif
 #endif
 
-#ifdef _LIBC
-# include <stdlib.h>
-#else
-extern void abort (void);
-#endif
-
-#endif
+#endif /* !SOFT_FP_H */
Index: libgcc/soft-fp/subdf3.c
===================================================================
--- libgcc/soft-fp/subdf3.c     (revision 228199)
+++ libgcc/soft-fp/subdf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a - b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/subsf3.c
===================================================================
--- libgcc/soft-fp/subsf3.c     (revision 228199)
+++ libgcc/soft-fp/subsf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a - b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/subtf3.c
===================================================================
--- libgcc/soft-fp/subtf3.c     (revision 228199)
+++ libgcc/soft-fp/subtf3.c     (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a - b
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/truncdfsf2.c
===================================================================
--- libgcc/soft-fp/truncdfsf2.c (revision 228199)
+++ libgcc/soft-fp/truncdfsf2.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Truncate IEEE double into IEEE single
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/trunctfdf2.c
===================================================================
--- libgcc/soft-fp/trunctfdf2.c (revision 228199)
+++ libgcc/soft-fp/trunctfdf2.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Truncate IEEE quad into IEEE double
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/trunctfsf2.c
===================================================================
--- libgcc/soft-fp/trunctfsf2.c (revision 228199)
+++ libgcc/soft-fp/trunctfsf2.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Truncate IEEE quad into IEEE single
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (r...@cygnus.com) and
                  Jakub Jelinek (j...@ultra.linux.cz).
Index: libgcc/soft-fp/trunctfxf2.c
===================================================================
--- libgcc/soft-fp/trunctfxf2.c (revision 228199)
+++ libgcc/soft-fp/trunctfxf2.c (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Truncate IEEE quad into IEEE extended
-   Copyright (C) 2007-2014 Free Software Foundation, Inc.
+   Copyright (C) 2007-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Uros Bizjak (ubiz...@gmail.com).
 
Index: libgcc/soft-fp/unorddf2.c
===================================================================
--- libgcc/soft-fp/unorddf2.c   (revision 228199)
+++ libgcc/soft-fp/unorddf2.c   (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 1 iff a or b is a NaN, 0 otherwise.
-   Copyright (C) 2006-2014 Free Software Foundation, Inc.
+   Copyright (C) 2006-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Joseph Myers (jos...@codesourcery.com).
 
Index: libgcc/soft-fp/unordsf2.c
===================================================================
--- libgcc/soft-fp/unordsf2.c   (revision 228199)
+++ libgcc/soft-fp/unordsf2.c   (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 1 iff a or b is a NaN, 0 otherwise.
-   Copyright (C) 2006-2014 Free Software Foundation, Inc.
+   Copyright (C) 2006-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Joseph Myers (jos...@codesourcery.com).
 
Index: libgcc/soft-fp/unordtf2.c
===================================================================
--- libgcc/soft-fp/unordtf2.c   (revision 228199)
+++ libgcc/soft-fp/unordtf2.c   (working copy)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 1 iff a or b is a NaN, 0 otherwise.
-   Copyright (C) 2006-2014 Free Software Foundation, Inc.
+   Copyright (C) 2006-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Joseph Myers (jos...@codesourcery.com).
 

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to