diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c606a6ecf3d9617b01cb3e4ebd79ba1fcfaebd52..b0632ff7df82f0ef7144131f0631b3bf3e99fc4d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-21  Joseph Myers  <joseph@codesourcery.com>
+
+	PR other/53317
+	* gcc.dg/torture/fp-int-convert-float128-timode-2.c: New test.
+
 2013-06-20  Uros Bizjak  <ubizjak@gmail.com>
 
 	PR target/57655
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
new file mode 100644
index 0000000000000000000000000000000000000000..9990e190c60239007f8c6df4030d2454874e797c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
@@ -0,0 +1,21 @@
+/* Test floating-point conversions.  __float128 type with TImode: bug
+   53317.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "" } */
+
+extern void abort (void);
+extern void exit (int);
+
+int
+main (void)
+{
+  volatile unsigned long long a = 0x1000000000000ULL;
+  volatile unsigned long long b = 0xffffffffffffffffULL;
+  unsigned __int128 c = (((unsigned __int128) a) << 64) | b;
+  __float128 d = c;
+  if (d != 0x1.000000000000ffffffffffffffffp112q)
+    abort ();
+  exit (0);
+}
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 56b3463923789a3b626c349ea38a52e8adc7b275..b23ec657d0f158e761b275adea536d159464030c 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,86 @@
+2013-06-21  Joseph Myers  <joseph@codesourcery.com>
+
+	PR other/53317
+	* 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/fixdfdi.c: Likewise.
+	* soft-fp/fixdfsi.c: Likewise.
+	* soft-fp/fixsfdi.c: Likewise.
+	* soft-fp/fixsfsi.c: Likewise.
+	* soft-fp/fixtfdi.c: Likewise.
+	* soft-fp/fixtfsi.c: Likewise.
+	* soft-fp/fixunsdfdi.c: Likewise.
+	* soft-fp/fixunsdfsi.c: Likewise.
+	* soft-fp/fixunssfdi.c: Likewise.
+	* soft-fp/fixunssfsi.c: Likewise.
+	* soft-fp/fixunstfdi.c: Likewise.
+	* soft-fp/fixunstfsi.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/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/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/unorddf2.c: Likewise.
+	* soft-fp/unordsf2.c: Likewise.
+	* soft-fp/unordtf2.c: Likewise.
+	* config/aarch64/sfp-machine.h (_FP_QNANNEGATEDP): Define to 0.
+	* config/arm/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
+	* config/c6x/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
+	* config/i386/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
+	* config/ia64/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
+	* config/lm32/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
+	* config/moxie/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
+	* config/rs6000/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
+	* config/score/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
+	* config/tilegx/sfp-machine32.h (_FP_QNANNEGATEDP): Likewise.
+	* config/tilegx/sfp-machine64.h (_FP_QNANNEGATEDP): Likewise.
+	* config/tilepro/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
+
 2013-06-16  Jürgen Urban  <JuergenUrban@gmx.de>
 
 	* config/mips/lib2funcs.c: New file.
diff --git a/libgcc/config/aarch64/sfp-machine.h b/libgcc/config/aarch64/sfp-machine.h
index 456bea4ebb7813245aea5b6b14a8b3d96f10babd..306da1749b3047bb1963d3f217e0d328e88a8dac 100644
--- a/libgcc/config/aarch64/sfp-machine.h
+++ b/libgcc/config/aarch64/sfp-machine.h
@@ -45,6 +45,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 /* This appears to be in line with the VFP conventions in the v7-a
    ARM-ARM. Need to check with the v8 version.  */
diff --git a/libgcc/config/arm/sfp-machine.h b/libgcc/config/arm/sfp-machine.h
index a89d05a00ba39f6f4b7759eb79e0510af30931e6..bb34895ebf47f65f9da78d637248ce63dea26106 100644
--- a/libgcc/config/arm/sfp-machine.h
+++ b/libgcc/config/arm/sfp-machine.h
@@ -29,6 +29,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 /* Someone please check this.  */
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
diff --git a/libgcc/config/c6x/sfp-machine.h b/libgcc/config/c6x/sfp-machine.h
index 8ab17652412b5636fcace22afeaa356a66f9701c..277959bc95fa5822811ea6c00cb26debadf35ac2 100644
--- a/libgcc/config/c6x/sfp-machine.h
+++ b/libgcc/config/c6x/sfp-machine.h
@@ -50,6 +50,7 @@
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 /* Someone please check this.  */
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
diff --git a/libgcc/config/i386/sfp-machine.h b/libgcc/config/i386/sfp-machine.h
index b19d94b6192d37ccfd92b28b0cb6ccf754f22bf1..4587b132d4445d03ad137c1ba3b5afa4d9172b04 100644
--- a/libgcc/config/i386/sfp-machine.h
+++ b/libgcc/config/i386/sfp-machine.h
@@ -15,6 +15,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #endif
 
 #define _FP_KEEPNANFRACP	1
+#define _FP_QNANNEGATEDP 0
 
 #define _FP_NANSIGN_S		1
 #define _FP_NANSIGN_D		1
diff --git a/libgcc/config/ia64/sfp-machine.h b/libgcc/config/ia64/sfp-machine.h
index 47741946330e975296aa96e976084c100e9f9995..e06bc9a4b57b491efc24de13068e526bfdf0c217 100644
--- a/libgcc/config/ia64/sfp-machine.h
+++ b/libgcc/config/ia64/sfp-machine.h
@@ -24,6 +24,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define _FP_NANFRAC_Q		_FP_QNANBIT_Q, 0
 
 #define _FP_KEEPNANFRACP	1
+#define _FP_QNANNEGATEDP 0
 
 #define _FP_NANSIGN_S		1
 #define _FP_NANSIGN_D		1
diff --git a/libgcc/config/lm32/sfp-machine.h b/libgcc/config/lm32/sfp-machine.h
index 19038485493cbf7532b82609147e7d4695587a5d..6dc15ba2d0bcaa207c2f463e7bb7ba07ac727e3e 100644
--- a/libgcc/config/lm32/sfp-machine.h
+++ b/libgcc/config/lm32/sfp-machine.h
@@ -22,6 +22,7 @@
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 /* Someone please check this.  */
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
diff --git a/libgcc/config/moxie/sfp-machine.h b/libgcc/config/moxie/sfp-machine.h
index 98f9f1bf491d427f4b3b22d84eba1ba60f91ef51..139d3ea48665f627376d5c876ea4d58355711757 100644
--- a/libgcc/config/moxie/sfp-machine.h
+++ b/libgcc/config/moxie/sfp-machine.h
@@ -27,6 +27,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 /* Someone please check this.  */
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
diff --git a/libgcc/config/rs6000/sfp-machine.h b/libgcc/config/rs6000/sfp-machine.h
index a0d1631bbb8b296d55da7a44012a5ed46a5cb220..58c8721bcfc11d5ebfd981db18c59ac38478faad 100644
--- a/libgcc/config/rs6000/sfp-machine.h
+++ b/libgcc/config/rs6000/sfp-machine.h
@@ -27,6 +27,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 /* Someone please check this.  */
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
diff --git a/libgcc/config/score/sfp-machine.h b/libgcc/config/score/sfp-machine.h
index 98f9f1bf491d427f4b3b22d84eba1ba60f91ef51..139d3ea48665f627376d5c876ea4d58355711757 100644
--- a/libgcc/config/score/sfp-machine.h
+++ b/libgcc/config/score/sfp-machine.h
@@ -27,6 +27,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 /* Someone please check this.  */
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
diff --git a/libgcc/config/tilegx/sfp-machine32.h b/libgcc/config/tilegx/sfp-machine32.h
index 378410001677abba09037475b97091efbce7133a..31a203252fcb237e032bd163ec23e7d9a22733ab 100644
--- a/libgcc/config/tilegx/sfp-machine32.h
+++ b/libgcc/config/tilegx/sfp-machine32.h
@@ -32,6 +32,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define _FP_NANSIGN_Q		1
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
   do {								\
diff --git a/libgcc/config/tilegx/sfp-machine64.h b/libgcc/config/tilegx/sfp-machine64.h
index 88bdcf5a3180280e023c4d29c9073a5cddb98e89..7cf352e63f5fad861d0cf9c9d3ff1aba4c86f4de 100644
--- a/libgcc/config/tilegx/sfp-machine64.h
+++ b/libgcc/config/tilegx/sfp-machine64.h
@@ -32,6 +32,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define _FP_NANSIGN_Q		1
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
   do {								\
diff --git a/libgcc/config/tilepro/sfp-machine.h b/libgcc/config/tilepro/sfp-machine.h
index ac5b8285e2ea149fbd56a1cce57b499c7876df92..a921533e144aff11c2306244730c3fe890c83d88 100644
--- a/libgcc/config/tilepro/sfp-machine.h
+++ b/libgcc/config/tilepro/sfp-machine.h
@@ -27,6 +27,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define _FP_NANSIGN_Q		1
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
   do {								\
diff --git a/libgcc/soft-fp/adddf3.c b/libgcc/soft-fp/adddf3.c
index 5e66461e55538d68f35747b08e48e52395ee180e..55df554b050d42a84fd1ad065b9db4cb8c858c3c 100644
--- a/libgcc/soft-fp/adddf3.c
+++ b/libgcc/soft-fp/adddf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a + b
-   Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/addsf3.c b/libgcc/soft-fp/addsf3.c
index 7f61d167b1e5fd622936c08a6dc1b9be12df8bf2..8a31449e379ad81f515dd1dd58e60129da3b60b9 100644
--- a/libgcc/soft-fp/addsf3.c
+++ b/libgcc/soft-fp/addsf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a + b
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/addtf3.c b/libgcc/soft-fp/addtf3.c
index f5da01998982879b1c672f974bf0b1c6d7450b6a..7a2732513a9d67d4bc43eb393ddd4dbd00a74da9 100644
--- a/libgcc/soft-fp/addtf3.c
+++ b/libgcc/soft-fp/addtf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a + b
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/divdf3.c b/libgcc/soft-fp/divdf3.c
index 105beab8d7028be5038de4124a3be3ab31491834..c3dcf8085e41f3bd167f4b9603be606122cf18c2 100644
--- a/libgcc/soft-fp/divdf3.c
+++ b/libgcc/soft-fp/divdf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a / b
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/divsf3.c b/libgcc/soft-fp/divsf3.c
index 41e32c0368026981a411b83d96bda3d450f9b7a4..063462f8a16dfb95da0067e6af52f20b29502296 100644
--- a/libgcc/soft-fp/divsf3.c
+++ b/libgcc/soft-fp/divsf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a / b
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/divtf3.c b/libgcc/soft-fp/divtf3.c
index b932351bf3fb5148e41eeffcee39421f601164d4..03d017ddb6e3d57f47da5a868d1d5b0b49483b2c 100644
--- a/libgcc/soft-fp/divtf3.c
+++ b/libgcc/soft-fp/divtf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a / b
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/double.h b/libgcc/soft-fp/double.h
index 5bad49c14d8d62a8c2f6ab5f77e8dbf148447c14..759c2eb661adcaa7b81b615c469a80c0e32ed3ee 100644
--- a/libgcc/soft-fp/double.h
+++ b/libgcc/soft-fp/double.h
@@ -1,7 +1,6 @@
 /* Software floating-point emulation.
    Definitions for IEEE Double Precision
-   Copyright (C) 1997, 1998, 1999, 2006, 2007, 2008, 2009, 2012
-   Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
 		  Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/eqdf2.c b/libgcc/soft-fp/eqdf2.c
index b5749b43a3ccf0befcb3b63870100ad01d89d4e7..c93c118f4e5d3e895da878a5e65cb617da6da46c 100644
--- a/libgcc/soft-fp/eqdf2.c
+++ b/libgcc/soft-fp/eqdf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 otherwise
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/eqsf2.c b/libgcc/soft-fp/eqsf2.c
index 8bf3603dc1dac61cd0d5995ae31f2f4834ec9dd1..e5b2a5f36aac57b0339be6ffaefe39e12924ea51 100644
--- a/libgcc/soft-fp/eqsf2.c
+++ b/libgcc/soft-fp/eqsf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 otherwise
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/eqtf2.c b/libgcc/soft-fp/eqtf2.c
index e40f31aa420389d2fafd7af17a641379a9b80415..47b5d5cb61803859481591366a60d071349057c5 100644
--- a/libgcc/soft-fp/eqtf2.c
+++ b/libgcc/soft-fp/eqtf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 otherwise
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/extenddftf2.c b/libgcc/soft-fp/extenddftf2.c
index f7082ef708a2a462dbaf1d133b38d35c0dbaf8fc..ff76a8cc2ff5676f238f1ea6d5d6e684c1f22b5f 100644
--- a/libgcc/soft-fp/extenddftf2.c
+++ b/libgcc/soft-fp/extenddftf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a converted to IEEE quad
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/extended.h b/libgcc/soft-fp/extended.h
index af9c6e65a8ba1d0c6f43d07b61a1f720e2de0263..74927550eb21404e8cfb76e7c0201cff06c3955d 100644
--- a/libgcc/soft-fp/extended.h
+++ b/libgcc/soft-fp/extended.h
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Definitions for IEEE Extended Precision.
-   Copyright (C) 1999,2006,2007,2012 Free Software Foundation, Inc.
+   Copyright (C) 1999-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek (jj@ultra.linux.cz).
 
@@ -203,7 +203,7 @@ union _FP_UNION_E
  * anyway, we optimize it by doing most of the calculations
  * in two UWtype registers instead of four.
  */
- 
+
 #define _FP_SQRT_MEAT_E(R, S, T, X, q)			\
   do {							\
     q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1);		\
@@ -416,7 +416,7 @@ union _FP_UNION_E
 	R##_f0 |= _FP_WORK_STICKY;			\
       }							\
   } while (0)
- 
+
 #define FP_CMP_E(r,X,Y,un)	_FP_CMP(E,2,r,X,Y,un)
 #define FP_CMP_EQ_E(r,X,Y)	_FP_CMP_EQ(E,2,r,X,Y)
 #define FP_CMP_UNORD_E(r,X,Y)	_FP_CMP_UNORD(E,2,r,X,Y)
diff --git a/libgcc/soft-fp/extendsfdf2.c b/libgcc/soft-fp/extendsfdf2.c
index ac843754e68b0e2eee5f2d4914b4cb71588617cc..7fc4046f8ae96737e351697101a8186c97a23fc7 100644
--- a/libgcc/soft-fp/extendsfdf2.c
+++ b/libgcc/soft-fp/extendsfdf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a converted to IEEE double
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/extendsftf2.c b/libgcc/soft-fp/extendsftf2.c
index a0d627083478a06042219f90fcacba398a5f216d..8271a88466b926395857141cbc65c2a534c82be6 100644
--- a/libgcc/soft-fp/extendsftf2.c
+++ b/libgcc/soft-fp/extendsftf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a converted to IEEE quad
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixdfdi.c b/libgcc/soft-fp/fixdfdi.c
index d1060bc6211bdd6932282612c4405d3a1a1ecc70..71ce1d4d71ce5b81c6d01521b89f3178439ca925 100644
--- a/libgcc/soft-fp/fixdfdi.c
+++ b/libgcc/soft-fp/fixdfdi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit signed integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixdfsi.c b/libgcc/soft-fp/fixdfsi.c
index 63887197e510ee5a85d7e53264afbc683b7229ad..f0c9960644be908bbb6f1d08c540614ff90c11c2 100644
--- a/libgcc/soft-fp/fixdfsi.c
+++ b/libgcc/soft-fp/fixdfsi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit signed integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixsfdi.c b/libgcc/soft-fp/fixsfdi.c
index 9dc04b6de4c4bd9578d5825c37821e2704177c79..5f69d6a2885847ed3dbb9d9965c669e432636cee 100644
--- a/libgcc/soft-fp/fixsfdi.c
+++ b/libgcc/soft-fp/fixsfdi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit signed integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixsfsi.c b/libgcc/soft-fp/fixsfsi.c
index c17514a2424904f54769a8175d29cbe37c28e78c..6fffdd737825246b6059b250b896625fd0cdf452 100644
--- a/libgcc/soft-fp/fixsfsi.c
+++ b/libgcc/soft-fp/fixsfsi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit signed integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixtfdi.c b/libgcc/soft-fp/fixtfdi.c
index 3731580c94f1495eb113b8e412dbdc387600e4d1..ac67bfbd3c0835f81dd9895439ff3c6a7ebc60e0 100644
--- a/libgcc/soft-fp/fixtfdi.c
+++ b/libgcc/soft-fp/fixtfdi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit signed integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixtfsi.c b/libgcc/soft-fp/fixtfsi.c
index 9ceed12c73cceacf6932b5a5fdcae8317c34984a..8f27ff66f0e916094aa2a760e96e93cbdffd6025 100644
--- a/libgcc/soft-fp/fixtfsi.c
+++ b/libgcc/soft-fp/fixtfsi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit signed integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunsdfdi.c b/libgcc/soft-fp/fixunsdfdi.c
index 4a5a7df61d14dbbda4644ee8133e9c956f0e9036..82fe1c75380bf3c2f54741b514ff3fb430a825e2 100644
--- a/libgcc/soft-fp/fixunsdfdi.c
+++ b/libgcc/soft-fp/fixunsdfdi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit unsigned integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunsdfsi.c b/libgcc/soft-fp/fixunsdfsi.c
index 82b54ad4f746ac6c2fcfa676b82b27e78ace1898..43287b007323a30dd6c3e3122d61f6cf7ce20932 100644
--- a/libgcc/soft-fp/fixunsdfsi.c
+++ b/libgcc/soft-fp/fixunsdfsi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit unsigned integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunssfdi.c b/libgcc/soft-fp/fixunssfdi.c
index d99f6faa8171ddb2f1ab29105f915cbdbdb8a6af..c0691c663cf4d8fb0f8d0ad20c6633ba41066df1 100644
--- a/libgcc/soft-fp/fixunssfdi.c
+++ b/libgcc/soft-fp/fixunssfdi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit unsigned integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunssfsi.c b/libgcc/soft-fp/fixunssfsi.c
index b226b1fca2a2ba71915ae0ebc48d6490784e00d3..3d00ce8d56c22e994d2c5690e727bc79ebe7891d 100644
--- a/libgcc/soft-fp/fixunssfsi.c
+++ b/libgcc/soft-fp/fixunssfsi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit unsigned integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunstfdi.c b/libgcc/soft-fp/fixunstfdi.c
index 97c4ec9475743bb05530a27324cc0e461a369483..d6038fa8914d280262069006f8fe5591c3fabcef 100644
--- a/libgcc/soft-fp/fixunstfdi.c
+++ b/libgcc/soft-fp/fixunstfdi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 64bit unsigned integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunstfsi.c b/libgcc/soft-fp/fixunstfsi.c
index df4ca9a746648edb5a11ef3efdd3aa7ddc9802ae..c8481f1caf0ba28a1f97cf7fb9f82a8180d212bc 100644
--- a/libgcc/soft-fp/fixunstfsi.c
+++ b/libgcc/soft-fp/fixunstfsi.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a to 32bit unsigned integer
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatdidf.c b/libgcc/soft-fp/floatdidf.c
index c1e0084c23a2993d1c5d63e788edfec24d7e681c..f6f594a84f6b4527d048bf53d5d0bb38ba12cb50 100644
--- a/libgcc/soft-fp/floatdidf.c
+++ b/libgcc/soft-fp/floatdidf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit signed integer to IEEE double
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatdisf.c b/libgcc/soft-fp/floatdisf.c
index 76a9245380f030ab9e99677bb706464aceae290b..72252e4a999184cb4f70db59aac39ec3ff2e79ef 100644
--- a/libgcc/soft-fp/floatdisf.c
+++ b/libgcc/soft-fp/floatdisf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit signed integer to IEEE single
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatditf.c b/libgcc/soft-fp/floatditf.c
index d6d881869fdaa7ed5d7ff680c6ab48d49c245d84..68da6c60b0d160f0009947eb4474d93948fd26cf 100644
--- a/libgcc/soft-fp/floatditf.c
+++ b/libgcc/soft-fp/floatditf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit signed integer to IEEE quad
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatsidf.c b/libgcc/soft-fp/floatsidf.c
index 3409ecd90d0389fa4a66adead04a0858b0703324..ec578fba79106c93545539ba9663e56781c70e66 100644
--- a/libgcc/soft-fp/floatsidf.c
+++ b/libgcc/soft-fp/floatsidf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit signed integer to IEEE double
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatsisf.c b/libgcc/soft-fp/floatsisf.c
index 002aa177bb13713b9a5182c6125dc58044e0ec7b..c9ff205d7fd291420391ac0ba151969b4c1015e5 100644
--- a/libgcc/soft-fp/floatsisf.c
+++ b/libgcc/soft-fp/floatsisf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit signed integer to IEEE single
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatsitf.c b/libgcc/soft-fp/floatsitf.c
index 9cc6e6593aadcd170308f157f9d1a13b88466b93..6e24b9ea634579ab30cefc62550d3eb126dfdf70 100644
--- a/libgcc/soft-fp/floatsitf.c
+++ b/libgcc/soft-fp/floatsitf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit signed integer to IEEE quad
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatundidf.c b/libgcc/soft-fp/floatundidf.c
index ab1152c698c1aeaf19316c9a8b542e3c37b527d1..1babcec8e0bbd4456496462aeb84416856aec096 100644
--- a/libgcc/soft-fp/floatundidf.c
+++ b/libgcc/soft-fp/floatundidf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit unsigned integer to IEEE double
-   Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatundisf.c b/libgcc/soft-fp/floatundisf.c
index ff544f9c6aa993c81c9c815800f30e2ed7dba52f..1c645c023d388bd6a9cea9c825586c656cde8ce8 100644
--- a/libgcc/soft-fp/floatundisf.c
+++ b/libgcc/soft-fp/floatundisf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit unsigned integer to IEEE single
-   Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatunditf.c b/libgcc/soft-fp/floatunditf.c
index 0723c40b145970e7a373124ab90c08db3cd07fe5..fff73fdb67caa858f730bd8515fe57176a35345b 100644
--- a/libgcc/soft-fp/floatunditf.c
+++ b/libgcc/soft-fp/floatunditf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 64bit unsigned integer to IEEE quad
-   Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatunsidf.c b/libgcc/soft-fp/floatunsidf.c
index 4a955daaa192e489a125a7f1216e14850105e8e0..548dc7c0c46ccda29ffda7bee568f75330c92aae 100644
--- a/libgcc/soft-fp/floatunsidf.c
+++ b/libgcc/soft-fp/floatunsidf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit unsigned integer to IEEE double
-   Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatunsisf.c b/libgcc/soft-fp/floatunsisf.c
index 7d588c6d1e74a7bb7bb450c35d2b274384ce7d54..2c0cc897636c8ca5a30b6126fe3f73cfc7e4574c 100644
--- a/libgcc/soft-fp/floatunsisf.c
+++ b/libgcc/soft-fp/floatunsisf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit unsigned integer to IEEE single
-   Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatunsitf.c b/libgcc/soft-fp/floatunsitf.c
index e9a88f8467f399e6af50b0c10fe7d9e3ab73784f..1099c2ee849488e670a4589fa38e721eed45b672 100644
--- a/libgcc/soft-fp/floatunsitf.c
+++ b/libgcc/soft-fp/floatunsitf.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Convert a 32bit unsigned integer to IEEE quad
-   Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/gedf2.c b/libgcc/soft-fp/gedf2.c
index 55298e5e0e8c2be70f4899e9165176915cc2e5db..0ef9f5de2c87a1343f757cde09bb9a451fd541c2 100644
--- a/libgcc/soft-fp/gedf2.c
+++ b/libgcc/soft-fp/gedf2.c
@@ -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,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/gesf2.c b/libgcc/soft-fp/gesf2.c
index ea7c226663069b783017be66ffd434b7fd0269a9..f0a83773104126125b48e836e0e604107e5abf93 100644
--- a/libgcc/soft-fp/gesf2.c
+++ b/libgcc/soft-fp/gesf2.c
@@ -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,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/getf2.c b/libgcc/soft-fp/getf2.c
index dd19a9d004533c1c2bfcb6842870a184eb8d2464..705d48b905393c6764b37c16ef258fc484897940 100644
--- a/libgcc/soft-fp/getf2.c
+++ b/libgcc/soft-fp/getf2.c
@@ -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,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/ledf2.c b/libgcc/soft-fp/ledf2.c
index 7642ced5d33c38d8b9ef79ba1b67942cbc270fd5..7b8f403bb80fc3bc5556ffad36f279e84c2fa488 100644
--- a/libgcc/soft-fp/ledf2.c
+++ b/libgcc/soft-fp/ledf2.c
@@ -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,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/lesf2.c b/libgcc/soft-fp/lesf2.c
index 594b11401e2086f2e4f349fe6f706aef0ca6d68a..41f823b5fc28b27f43dd2e7427a98394cbea7d3a 100644
--- a/libgcc/soft-fp/lesf2.c
+++ b/libgcc/soft-fp/lesf2.c
@@ -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,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/letf2.c b/libgcc/soft-fp/letf2.c
index ae3060eab32ed2c167d7cf36f2b41e3fc01ed8fa..59342ca4cb9729c1fc1a2c63b031338eb461dde6 100644
--- a/libgcc/soft-fp/letf2.c
+++ b/libgcc/soft-fp/letf2.c
@@ -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,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/muldf3.c b/libgcc/soft-fp/muldf3.c
index 8aaebc0cc5b0fefc5fa9ed0aef914916228224bf..8c08281b46f62a3a4bb70f73a3d6cf8d66cf9f18 100644
--- a/libgcc/soft-fp/muldf3.c
+++ b/libgcc/soft-fp/muldf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a * b
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/mulsf3.c b/libgcc/soft-fp/mulsf3.c
index 18c49a59f95ec528af2ad0487efc1c29f44f2bc2..f0341a56c5fe0a83c20fef8122dded9bf20bdf99 100644
--- a/libgcc/soft-fp/mulsf3.c
+++ b/libgcc/soft-fp/mulsf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a * b
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/multf3.c b/libgcc/soft-fp/multf3.c
index 9fd10d8e2374d105b01298c7ebd8ee1c24d7eb72..35badf2fc8d18b9355912d431e2d8e82a481120e 100644
--- a/libgcc/soft-fp/multf3.c
+++ b/libgcc/soft-fp/multf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a * b
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/negdf2.c b/libgcc/soft-fp/negdf2.c
index 08494aa5ba3e240339aa2333e7a198e902d2e25a..3cc6f5f400b5d36860c2bb81147d8de72f06757d 100644
--- a/libgcc/soft-fp/negdf2.c
+++ b/libgcc/soft-fp/negdf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return -a
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/negsf2.c b/libgcc/soft-fp/negsf2.c
index 1eb9a500828935c262729d113db070edd8542889..d8d5910603675fcf945d9ea27e5b3f99bd48d29d 100644
--- a/libgcc/soft-fp/negsf2.c
+++ b/libgcc/soft-fp/negsf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return -a
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/negtf2.c b/libgcc/soft-fp/negtf2.c
index fe9f05e4ba8f6a16471cc4671e504bb5a900566f..1c08441487b68399a7e2f487146f12155cca6735 100644
--- a/libgcc/soft-fp/negtf2.c
+++ b/libgcc/soft-fp/negtf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return -a
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/op-1.h b/libgcc/soft-fp/op-1.h
index 2cffb7fb3ca7b120a48f56b19b4c934d6e01154f..8e05e2fab7e474ff2ae4180abaf4f3327b5018c5 100644
--- a/libgcc/soft-fp/op-1.h
+++ b/libgcc/soft-fp/op-1.h
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Basic one-word fraction declaration and manipulation.
-   Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
 		  Jakub Jelinek (jj@ultra.linux.cz),
@@ -233,7 +233,7 @@ do {							\
 	_nl = X##_f << (_FP_W_TYPE_SIZE - 1);				\
 	_nh = X##_f >> 1;						\
       }									\
-    									\
+									\
     udiv_qrnnd(_q, _r, _nh, _nl, _y);					\
     R##_f = _q | (_r != 0);						\
   } while (0)
@@ -255,14 +255,14 @@ do {							\
     udiv_qrnnd(_q, _r, _nh, _nl, Y##_f);		\
     R##_f = _q | (_r != 0);				\
   } while (0)
-  
-  
+
+
 /*
  * Square root algorithms:
  * We have just one right now, maybe Newton approximation
  * should be added for those machines where division is fast.
  */
- 
+
 #define _FP_SQRT_MEAT_1(R, S, T, X, q)			\
   do {							\
     while (q != _FP_WORK_ROUND)				\
@@ -286,7 +286,7 @@ do {							\
   } while (0)
 
 /*
- * Assembly/disassembly for converting to/from integral types.  
+ * Assembly/disassembly for converting to/from integral types.
  * No shifting or overflow handled here.
  */
 
diff --git a/libgcc/soft-fp/op-2.h b/libgcc/soft-fp/op-2.h
index 7c7a95836891af5a02808e331b945f4fb8c66114..48e01d26dc4dc8c79747ac0da270f1a0920657c3 100644
--- a/libgcc/soft-fp/op-2.h
+++ b/libgcc/soft-fp/op-2.h
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Basic two-word fraction declaration and manipulation.
-   Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
 		  Jakub Jelinek (jj@ultra.linux.cz),
@@ -145,7 +145,7 @@
 #define _FP_MAXFRAC_2		(~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0)
 
 /*
- * Internals 
+ * Internals
  */
 
 #define __FP_FRAC_SET_2(X,I1,I0)	(X##_f0 = I0, X##_f1 = I1)
@@ -348,7 +348,7 @@
    point multiplication.  This is useful if floating point
    multiplication has much bigger throughput than integer multiply.
    It is supposed to work for _FP_W_TYPE_SIZE 64 and wfracbits
-   between 106 and 120 only.  
+   between 106 and 120 only.
    Caller guarantees that X and Y has (1LLL << (wfracbits - 1)) set.
    SETFETZ is a macro which will disable all FPU exceptions and set rounding
    towards zero,  RESETFE should optionally reset it back.  */
@@ -433,10 +433,10 @@
     R##_f1 = (_t240 << (128 - (wfracbits - 1)))					\
 	     | ((_u240 & 0xffffff) >> ((wfracbits - 1) - 104));			\
     R##_f0 = ((_u240 & 0xffffff) << (168 - (wfracbits - 1)))			\
-    	     | ((_v240 & 0xffffff) << (144 - (wfracbits - 1)))			\
-    	     | ((_w240 & 0xffffff) << (120 - (wfracbits - 1)))			\
-    	     | ((_x240 & 0xffffff) >> ((wfracbits - 1) - 96))			\
-    	     | _y240;								\
+	     | ((_v240 & 0xffffff) << (144 - (wfracbits - 1)))			\
+	     | ((_w240 & 0xffffff) << (120 - (wfracbits - 1)))			\
+	     | ((_x240 & 0xffffff) >> ((wfracbits - 1) - 96))			\
+	     | _y240;								\
     resetfe;									\
   } while (0)
 
@@ -544,7 +544,7 @@
  * We have just one right now, maybe Newton approximation
  * should be added for those machines where division is fast.
  */
- 
+
 #define _FP_SQRT_MEAT_2(R, S, T, X, q)			\
   do {							\
     while (q)						\
@@ -586,7 +586,7 @@
 
 
 /*
- * Assembly/disassembly for converting to/from integral types.  
+ * Assembly/disassembly for converting to/from integral types.
  * No shifting or overflow handled here.
  */
 
diff --git a/libgcc/soft-fp/op-4.h b/libgcc/soft-fp/op-4.h
index a81e7ab7c6b9c184031e16d05158d27c4ce654ed..007b01f36c8b6667c2c0773daf56bcfd2e95d84f 100644
--- a/libgcc/soft-fp/op-4.h
+++ b/libgcc/soft-fp/op-4.h
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Basic four-word fraction declaration and manipulation.
-   Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
 		  Jakub Jelinek (jj@ultra.linux.cz),
@@ -81,7 +81,7 @@
   } while (0)
 
 
-/* Right shift with sticky-lsb. 
+/* Right shift with sticky-lsb.
  * What this actually means is that we do a standard right-shift,
  * but that if any of the bits that fall off the right hand side
  * were one then we always set the LSbit.
@@ -435,7 +435,7 @@
  * We have just one right now, maybe Newton approximation
  * should be added for those machines where division is fast.
  */
- 
+
 #define _FP_SQRT_MEAT_4(R, S, T, X, q)				\
   do {								\
     while (q)							\
@@ -481,7 +481,7 @@
 	    S##_f[2] += (T##_f[1] > S##_f[1]);			\
 	    S##_f[3] += (T##_f[2] > S##_f[2]);			\
 	    __FP_FRAC_DEC_3(X##_f[3], X##_f[2], X##_f[1],	\
-	    		    T##_f[3], T##_f[2], T##_f[1]);	\
+			    T##_f[3], T##_f[2], T##_f[1]);	\
 	    R##_f[1] += q;					\
 	  }							\
 	_FP_FRAC_SLL_4(X, 1);					\
@@ -516,7 +516,7 @@
 
 
 /*
- * Internals 
+ * Internals
  */
 
 #define __FP_FRAC_SET_4(X,I3,I2,I1,I0)					\
@@ -618,9 +618,9 @@
 /* Convert FP values between word sizes. This appears to be more
  * complicated than I'd have expected it to be, so these might be
  * wrong... These macros are in any case somewhat bogus because they
- * use information about what various FRAC_n variables look like 
+ * use information about what various FRAC_n variables look like
  * internally [eg, that 2 word vars are X_f0 and x_f1]. But so do
- * the ones in op-2.h and op-1.h. 
+ * the ones in op-2.h and op-1.h.
  */
 #define _FP_FRAC_COPY_1_4(D, S)		(D##_f = S##_f[0])
 
@@ -630,7 +630,7 @@ do {						\
   D##_f1 = S##_f[1];				\
 } while (0)
 
-/* Assembly/disassembly for converting to/from integral types.  
+/* Assembly/disassembly for converting to/from integral types.
  * No shifting or overflow handled here.
  */
 /* Put the FP value X into r, which is an integer of size rsize. */
diff --git a/libgcc/soft-fp/op-8.h b/libgcc/soft-fp/op-8.h
index 9643793f1367fb7f57db5d410952d9552f3651f6..8890d02201cd87568ef659b8facb20af44d23cf1 100644
--- a/libgcc/soft-fp/op-8.h
+++ b/libgcc/soft-fp/op-8.h
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Basic eight-word fraction declaration and manipulation.
-   Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
 		  Jakub Jelinek (jj@ultra.linux.cz) and
@@ -77,7 +77,7 @@
   } while (0)
 
 
-/* Right shift with sticky-lsb. 
+/* Right shift with sticky-lsb.
  * What this actually means is that we do a standard right-shift,
  * but that if any of the bits that fall off the right hand side
  * were one then we always set the LSbit.
diff --git a/libgcc/soft-fp/op-common.h b/libgcc/soft-fp/op-common.h
index 12fb16e5efe9eb4fe57ea71cd4534eaa91ead5b4..c4acb9916139f393a33ccac8e00ceab1d9f51029 100644
--- a/libgcc/soft-fp/op-common.h
+++ b/libgcc/soft-fp/op-common.h
@@ -1,5 +1,5 @@
 /* Software floating-point emulation. Common operations.
-   Copyright (C) 1997,1998,1999,2006,2007,2012 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
 		  Jakub Jelinek (jj@ultra.linux.cz),
@@ -29,10 +29,22 @@
    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)), X##_s, X##_e;	\
+#define _FP_DECL(wc, X)				\
+  _FP_I_TYPE X##_c __attribute__((unused));	\
+  _FP_I_TYPE X##_s __attribute__((unused));	\
+  _FP_I_TYPE X##_e;				\
   _FP_FRAC_DECL_##wc(X)
 
+/* Test whether the qNaN bit denotes a signaling NaN.  */
+#define _FP_FRAC_SNANP(fs, X)						\
+  ((_FP_QNANNEGATEDP)							\
+   ? (_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)			\
+   : !(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs))
+#define _FP_FRAC_SNANP_SEMIRAW(fs, X)					\
+  ((_FP_QNANNEGATEDP)							\
+   ? (_FP_FRAC_HIGH_##fs(X) & _FP_QNANBIT_SH_##fs)			\
+   : !(_FP_FRAC_HIGH_##fs(X) & _FP_QNANBIT_SH_##fs))
+
 /*
  * Finish truely unpacking a native fp value by classifying the kind
  * of fp value and normalizing both the exponent and the fraction.
@@ -72,7 +84,7 @@ do {									\
       {									\
 	X##_c = FP_CLS_NAN;						\
 	/* Check for signaling NaN */					\
-	if (!(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs))		\
+	if (_FP_FRAC_SNANP(fs, X))					\
 	  FP_SET_EXCEPTION(FP_EX_INVALID);				\
       }									\
     break;								\
@@ -110,7 +122,7 @@ do {							\
 do {								\
   if (X##_e == _FP_EXPMAX_##fs					\
       && !_FP_FRAC_ZEROP_##wc(X)				\
-      && !(_FP_FRAC_HIGH_##fs(X) & _FP_QNANBIT_SH_##fs))	\
+      && _FP_FRAC_SNANP_SEMIRAW(fs, X))				\
     FP_SET_EXCEPTION(FP_EX_INVALID);				\
 } while (0)
 
@@ -125,6 +137,39 @@ do {									\
   _FP_FRAC_SLL_##wc(R, _FP_WORKBITS);					\
 } while (0)
 
+/* Make the fractional part a quiet NaN, preserving the payload
+   if possible, otherwise make it the canonical quiet NaN and set
+   the sign bit accordingly.  */
+#define _FP_SETQNAN(fs, wc, X)						\
+do {									\
+  if (_FP_QNANNEGATEDP)							\
+    {									\
+      _FP_FRAC_HIGH_RAW_##fs(X) &= _FP_QNANBIT_##fs - 1;		\
+      if (_FP_FRAC_ZEROP_##wc(X))					\
+	{								\
+	  X##_s = _FP_NANSIGN_##fs;					\
+	  _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs);			\
+	}								\
+    }									\
+  else									\
+    _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs;			\
+} while (0)
+#define _FP_SETQNAN_SEMIRAW(fs, wc, X)					\
+do {									\
+  if (_FP_QNANNEGATEDP)							\
+    {									\
+      _FP_FRAC_HIGH_##fs(X) &= _FP_QNANBIT_SH_##fs - 1;			\
+      if (_FP_FRAC_ZEROP_##wc(X))					\
+	{								\
+	  X##_s = _FP_NANSIGN_##fs;					\
+	  _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs);			\
+	  _FP_FRAC_SLL_##wc(X, _FP_WORKBITS);				\
+	}								\
+    }									\
+  else									\
+    _FP_FRAC_HIGH_##fs(X) |= _FP_QNANBIT_SH_##fs;			\
+} while (0)
+
 /* Test whether a biased exponent is normal (not zero or maximum).  */
 #define _FP_EXP_NORMAL(fs, wc, X)	(((X##_e + 1) & _FP_EXPMAX_##fs) > 1)
 
@@ -157,7 +202,7 @@ do {								\
 	  X##_s = _FP_NANSIGN_##fs;				\
 	}							\
       else							\
-	_FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs;		\
+	_FP_SETQNAN(fs, wc, X);					\
     }								\
 } while (0)
 
@@ -271,7 +316,7 @@ do {								\
 	X##_s = _FP_NANSIGN_##fs;				\
       }								\
     else							\
-      _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs;		\
+      _FP_SETQNAN(fs, wc, X);					\
     break;							\
   }								\
 } while (0)
@@ -285,7 +330,7 @@ do {								\
   if (X##_e == _FP_EXPMAX_##fs)					\
     {								\
       if (!_FP_FRAC_ZEROP_##wc(X)				\
-	  && !(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs))	\
+	  && _FP_FRAC_SNANP(fs, X))				\
 	__ret = 1;						\
     }								\
   __ret;							\
@@ -746,11 +791,11 @@ do {									 \
 #define _FP_MUL(fs, wc, R, X, Y)			\
 do {							\
   R##_s = X##_s ^ Y##_s;				\
+  R##_e = X##_e + Y##_e + 1;				\
   switch (_FP_CLS_COMBINE(X##_c, Y##_c))		\
   {							\
   case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NORMAL):	\
     R##_c = FP_CLS_NORMAL;				\
-    R##_e = X##_e + Y##_e + 1;				\
 							\
     _FP_MUL_MEAT_##fs(R,X,Y);				\
 							\
@@ -809,11 +854,11 @@ do {							\
 #define _FP_DIV(fs, wc, R, X, Y)			\
 do {							\
   R##_s = X##_s ^ Y##_s;				\
+  R##_e = X##_e - Y##_e;				\
   switch (_FP_CLS_COMBINE(X##_c, Y##_c))		\
   {							\
   case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NORMAL):	\
     R##_c = FP_CLS_NORMAL;				\
-    R##_e = X##_e - Y##_e;				\
 							\
     _FP_DIV_MEAT_##fs(R,X,Y);				\
     break;						\
@@ -947,37 +992,37 @@ do {									\
     case FP_CLS_NAN:							\
 	_FP_FRAC_COPY_##wc(R, X);					\
 	R##_s = X##_s;							\
-    	R##_c = FP_CLS_NAN;						\
-    	break;								\
+	R##_c = FP_CLS_NAN;						\
+	break;								\
     case FP_CLS_INF:							\
-    	if (X##_s)							\
-    	  {								\
-    	    R##_s = _FP_NANSIGN_##fs;					\
+	if (X##_s)							\
+	  {								\
+	    R##_s = _FP_NANSIGN_##fs;					\
 	    R##_c = FP_CLS_NAN; /* NAN */				\
 	    _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs);			\
 	    FP_SET_EXCEPTION(FP_EX_INVALID);				\
-    	  }								\
-    	else								\
-    	  {								\
-    	    R##_s = 0;							\
-    	    R##_c = FP_CLS_INF; /* sqrt(+inf) = +inf */			\
-    	  }								\
-    	break;								\
+	  }								\
+	else								\
+	  {								\
+	    R##_s = 0;							\
+	    R##_c = FP_CLS_INF; /* sqrt(+inf) = +inf */			\
+	  }								\
+	break;								\
     case FP_CLS_ZERO:							\
 	R##_s = X##_s;							\
 	R##_c = FP_CLS_ZERO; /* sqrt(+-0) = +-0 */			\
 	break;								\
     case FP_CLS_NORMAL:							\
-    	R##_s = 0;							\
+	R##_s = 0;							\
         if (X##_s)							\
           {								\
-	    R##_c = FP_CLS_NAN; /* sNAN */				\
+	    R##_c = FP_CLS_NAN; /* NAN */				\
 	    R##_s = _FP_NANSIGN_##fs;					\
 	    _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs);			\
 	    FP_SET_EXCEPTION(FP_EX_INVALID);				\
 	    break;							\
           }								\
-    	R##_c = FP_CLS_NORMAL;						\
+	R##_c = FP_CLS_NORMAL;						\
         if (X##_e & 1)							\
           _FP_FRAC_SLL_##wc(X, 1);					\
         R##_e = X##_e >> 1;						\
@@ -1118,8 +1163,9 @@ do {									\
 	  {								     \
 	    /* Exactly representable; shift left.  */			     \
 	    _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize);			     \
-	    _FP_FRAC_SLL_##wc(X, (_FP_EXPBIAS_##fs			     \
-				  + _FP_FRACBITS_##fs - 1 - X##_e));	     \
+	    if (_FP_EXPBIAS_##fs + _FP_FRACBITS_##fs - 1 - X##_e > 0)	     \
+	      _FP_FRAC_SLL_##wc(X, (_FP_EXPBIAS_##fs			     \
+				    + _FP_FRACBITS_##fs - 1 - X##_e));	     \
 	  }								     \
 	else								     \
 	  {								     \
@@ -1197,7 +1243,7 @@ do {									 \
 	  D##_e = _FP_EXPMAX_##dfs;					 \
 	  if (!_FP_FRAC_ZEROP_##swc(S))					 \
 	    {								 \
-	      if (!(_FP_FRAC_HIGH_RAW_##sfs(S) & _FP_QNANBIT_##sfs))	 \
+	      if (_FP_FRAC_SNANP(sfs, S))				 \
 		FP_SET_EXCEPTION(FP_EX_INVALID);			 \
 	      _FP_FRAC_SLL_##dwc(D, (_FP_FRACBITS_##dfs			 \
 				     - _FP_FRACBITS_##sfs));		 \
@@ -1284,7 +1330,7 @@ do {									     \
 	      /* Semi-raw NaN must have all workbits cleared.  */	     \
 	      _FP_FRAC_LOW_##dwc(D)					     \
 		&= ~(_FP_W_TYPE) ((1 << _FP_WORKBITS) - 1);		     \
-	      _FP_FRAC_HIGH_##dfs(D) |= _FP_QNANBIT_SH_##dfs;		     \
+	      _FP_SETQNAN_SEMIRAW(dfs, dwc, D);				     \
 	    }								     \
 	}								     \
     }									     \
diff --git a/libgcc/soft-fp/quad.h b/libgcc/soft-fp/quad.h
index b05bd2dba93a81635f4175dd38dea804afd0b3f4..f0aa07e74f1363c0fc420119c81bbee877ae36e2 100644
--- a/libgcc/soft-fp/quad.h
+++ b/libgcc/soft-fp/quad.h
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Definitions for IEEE Quad Precision.
-   Copyright (C) 1997,1998,1999,2006,2007,2012 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
 		  Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/single.h b/libgcc/soft-fp/single.h
index 119d0db3319929ae47bdf071e0a9b7b0065d2368..dec0031e9a925485d10dfbda967e5e9c27f70c53 100644
--- a/libgcc/soft-fp/single.h
+++ b/libgcc/soft-fp/single.h
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Definitions for IEEE Single Precision.
-   Copyright (C) 1997,1998,1999,2006,2012 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
 		  Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/soft-fp.h b/libgcc/soft-fp/soft-fp.h
index 49a87706cc5e62f0b26e0f93d2c7e0ee8eb8ff12..b1c6e619b5eed8f88355c27d29c64ba29b023313 100644
--- a/libgcc/soft-fp/soft-fp.h
+++ b/libgcc/soft-fp/soft-fp.h
@@ -1,6 +1,5 @@
 /* Software floating-point emulation.
-   Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006,2007,2012
-	Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
 		  Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/subdf3.c b/libgcc/soft-fp/subdf3.c
index 9352b0a6d320fbcb8afcbb243011fc30c65a1cf2..032ac0f291f181d7cd4c4c6b8fd1f0484a5b0d05 100644
--- a/libgcc/soft-fp/subdf3.c
+++ b/libgcc/soft-fp/subdf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a - b
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/subsf3.c b/libgcc/soft-fp/subsf3.c
index 1182612c60abb5daae47ce02b91e259e07cb8adf..c9f56c7176eac1fa0b5d24b438497ca8e44d4c1a 100644
--- a/libgcc/soft-fp/subsf3.c
+++ b/libgcc/soft-fp/subsf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a - b
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/subtf3.c b/libgcc/soft-fp/subtf3.c
index 0d73d4bc061140ab67ee1aced19cf8f8a0c7d0de..a111d571e1be47348c4f6833a1ec12730542451f 100644
--- a/libgcc/soft-fp/subtf3.c
+++ b/libgcc/soft-fp/subtf3.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a - b
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/truncdfsf2.c b/libgcc/soft-fp/truncdfsf2.c
index 54015c117be77c682ec94da7381453fca285eff1..e9a7223674fd6576f20ac1e6bc974ce3d47ddbb7 100644
--- a/libgcc/soft-fp/truncdfsf2.c
+++ b/libgcc/soft-fp/truncdfsf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Truncate IEEE double into IEEE single
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/trunctfdf2.c b/libgcc/soft-fp/trunctfdf2.c
index 16e817cd6b107f93e47a8664bf80636b31fe1d01..35c6496362f2423fce7aa40ac8b64aa746cf8eef 100644
--- a/libgcc/soft-fp/trunctfdf2.c
+++ b/libgcc/soft-fp/trunctfdf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Truncate IEEE quad into IEEE double
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/trunctfsf2.c b/libgcc/soft-fp/trunctfsf2.c
index 82ef2462223a63570f8207fabc1a7b0a84102250..751c7c8d76ea74f7353ea23ca7a42b3d7ff26d45 100644
--- a/libgcc/soft-fp/trunctfsf2.c
+++ b/libgcc/soft-fp/trunctfsf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Truncate IEEE quad into IEEE single
-   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/unorddf2.c b/libgcc/soft-fp/unorddf2.c
index 3036a2fb7c29d0c473caaeef097bfb4caf717bcd..2e77f2d8ff74b588ee6be65ac2a6becfb04515ba 100644
--- a/libgcc/soft-fp/unorddf2.c
+++ b/libgcc/soft-fp/unorddf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 1 iff a or b is a NaN, 0 otherwise.
-   Copyright (C) 2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 2006-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Joseph Myers (joseph@codesourcery.com).
 
diff --git a/libgcc/soft-fp/unordsf2.c b/libgcc/soft-fp/unordsf2.c
index c22578c8d810d5a6a49126fe499bbee002f9a936..b5b5322c16892bade976ec35113f208c2e505f30 100644
--- a/libgcc/soft-fp/unordsf2.c
+++ b/libgcc/soft-fp/unordsf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 1 iff a or b is a NaN, 0 otherwise.
-   Copyright (C) 2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 2006-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Joseph Myers (joseph@codesourcery.com).
 
diff --git a/libgcc/soft-fp/unordtf2.c b/libgcc/soft-fp/unordtf2.c
index 8f9b5c647ff1038a500b20e3e2613b063fd6e853..1a85c252c1ac99587174c26dbbfa84fd7c801789 100644
--- a/libgcc/soft-fp/unordtf2.c
+++ b/libgcc/soft-fp/unordtf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 1 iff a or b is a NaN, 0 otherwise.
-   Copyright (C) 2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 2006-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Joseph Myers (joseph@codesourcery.com).