diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-21 19:08:01 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-21 19:08:01 +0000 |
commit | 2511e9f1e8549ef8fc461b8c35440c27d0b8a63f (patch) | |
tree | 17eab9f43bce6053b9ed78bb7b5fc9e4bc9f28cc /libgcc/soft-fp | |
parent | 9ed2ca7c4b10dbd9d1d149e17fec6be9c524f92a (diff) | |
download | gcc-2511e9f1e8549ef8fc461b8c35440c27d0b8a63f.tar.gz |
PR other/53317
gcc/testsuite:
* gcc.dg/torture/fp-int-convert-float128-timode-2.c: New test.
libgcc:
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200318 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/soft-fp')
67 files changed, 164 insertions, 120 deletions
diff --git a/libgcc/soft-fp/adddf3.c b/libgcc/soft-fp/adddf3.c index 5e66461e555..55df554b050 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 7f61d167b1e..8a31449e379 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 f5da0199898..7a2732513a9 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 105beab8d70..c3dcf8085e4 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 41e32c03680..063462f8a16 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 b932351bf3f..03d017ddb6e 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 5bad49c14d8..759c2eb661a 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 b5749b43a3c..c93c118f4e5 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 8bf3603dc1d..e5b2a5f36aa 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 e40f31aa420..47b5d5cb618 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 f7082ef708a..ff76a8cc2ff 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 af9c6e65a8b..74927550eb2 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 ac843754e68..7fc4046f8ae 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 a0d62708347..8271a88466b 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 d1060bc6211..71ce1d4d71c 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 63887197e51..f0c9960644b 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 9dc04b6de4c..5f69d6a2885 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 c17514a2424..6fffdd73782 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 3731580c94f..ac67bfbd3c0 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 9ceed12c73c..8f27ff66f0e 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 4a5a7df61d1..82fe1c75380 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 82b54ad4f74..43287b00732 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 d99f6faa817..c0691c663cf 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 b226b1fca2a..3d00ce8d56c 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 97c4ec94757..d6038fa8914 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 df4ca9a7466..c8481f1caf0 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 c1e0084c23a..f6f594a84f6 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 76a9245380f..72252e4a999 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 d6d881869fd..68da6c60b0d 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 3409ecd90d0..ec578fba791 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 002aa177bb1..c9ff205d7fd 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 9cc6e6593aa..6e24b9ea634 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 ab1152c698c..1babcec8e0b 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 ff544f9c6aa..1c645c023d3 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 0723c40b145..fff73fdb67c 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 4a955daaa19..548dc7c0c46 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 7d588c6d1e7..2c0cc897636 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 e9a88f8467f..1099c2ee849 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 55298e5e0e8..0ef9f5de2c8 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 ea7c2266630..f0a83773104 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 dd19a9d0045..705d48b9053 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 7642ced5d33..7b8f403bb80 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 594b11401e2..41f823b5fc2 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 ae3060eab32..59342ca4cb9 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 8aaebc0cc5b..8c08281b46f 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 18c49a59f95..f0341a56c5f 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 9fd10d8e237..35badf2fc8d 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 08494aa5ba3..3cc6f5f400b 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 1eb9a500828..d8d59106036 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 fe9f05e4ba8..1c08441487b 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 2cffb7fb3ca..8e05e2fab7e 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 7c7a9583689..48e01d26dc4 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 a81e7ab7c6b..007b01f36c8 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 9643793f136..8890d02201c 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 12fb16e5efe..c4acb991613 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 b05bd2dba93..f0aa07e74f1 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 119d0db3319..dec0031e9a9 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 49a87706cc5..b1c6e619b5e 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 9352b0a6d32..032ac0f291f 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 1182612c60a..c9f56c7176e 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 0d73d4bc061..a111d571e1b 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 54015c117be..e9a7223674f 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 16e817cd6b1..35c6496362f 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 82ef2462223..751c7c8d76e 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 3036a2fb7c2..2e77f2d8ff7 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 c22578c8d81..b5b5322c168 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 8f9b5c647ff..1a85c252c1a 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). |