From 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 12 Jul 2007 18:26:36 +0000 Subject: 2.5-18.1 --- soft-fp/Makefile | 13 +- soft-fp/adddf3.c | 25 +- soft-fp/addsf3.c | 25 +- soft-fp/addtf3.c | 25 +- soft-fp/divdf3.c | 19 +- soft-fp/divsf3.c | 19 +- soft-fp/divtf3.c | 19 +- soft-fp/double.h | 77 +++- soft-fp/eqdf2.c | 17 +- soft-fp/eqsf2.c | 17 +- soft-fp/eqtf2.c | 17 +- soft-fp/extenddftf2.c | 27 +- soft-fp/extended.h | 77 +++- soft-fp/extendsfdf2.c | 27 +- soft-fp/extendsftf2.c | 27 +- soft-fp/fixdfdi.c | 23 +- soft-fp/fixdfsi.c | 23 +- soft-fp/fixsfdi.c | 23 +- soft-fp/fixsfsi.c | 23 +- soft-fp/fixtfdi.c | 23 +- soft-fp/fixtfsi.c | 23 +- soft-fp/fixunsdfdi.c | 21 +- soft-fp/fixunsdfsi.c | 21 +- soft-fp/fixunssfdi.c | 21 +- soft-fp/fixunssfsi.c | 21 +- soft-fp/fixunstfdi.c | 21 +- soft-fp/fixunstfsi.c | 21 +- soft-fp/floatdidf.c | 23 +- soft-fp/floatdisf.c | 23 +- soft-fp/floatditf.c | 23 +- soft-fp/floatsidf.c | 23 +- soft-fp/floatsisf.c | 23 +- soft-fp/floatsitf.c | 23 +- soft-fp/floatundidf.c | 47 +++ soft-fp/floatundisf.c | 47 +++ soft-fp/floatunditf.c | 47 +++ soft-fp/floatunsidf.c | 47 +++ soft-fp/floatunsisf.c | 47 +++ soft-fp/floatunsitf.c | 47 +++ soft-fp/gedf2.c | 17 +- soft-fp/gesf2.c | 17 +- soft-fp/getf2.c | 17 +- soft-fp/ledf2.c | 17 +- soft-fp/lesf2.c | 17 +- soft-fp/letf2.c | 17 +- soft-fp/muldf3.c | 19 +- soft-fp/mulsf3.c | 19 +- soft-fp/multf3.c | 19 +- soft-fp/negdf2.c | 19 +- soft-fp/negsf2.c | 19 +- soft-fp/negtf2.c | 19 +- soft-fp/op-1.h | 38 +- soft-fp/op-2.h | 169 ++++---- soft-fp/op-4.h | 136 +++--- soft-fp/op-8.h | 18 +- soft-fp/op-common.h | 1111 ++++++++++++++++++++++++++++++++++++------------- soft-fp/quad.h | 77 +++- soft-fp/single.h | 53 ++- soft-fp/soft-fp.h | 37 +- soft-fp/sqrtdf2.c | 19 +- soft-fp/sqrtsf2.c | 19 +- soft-fp/sqrttf2.c | 19 +- soft-fp/subdf3.c | 25 +- soft-fp/subsf3.c | 25 +- soft-fp/subtf3.c | 25 +- soft-fp/truncdfsf2.c | 27 +- soft-fp/trunctfdf2.c | 27 +- soft-fp/trunctfsf2.c | 27 +- soft-fp/unorddf2.c | 45 ++ soft-fp/unordsf2.c | 46 ++ soft-fp/unordtf2.c | 46 ++ 71 files changed, 2503 insertions(+), 817 deletions(-) create mode 100644 soft-fp/floatundidf.c create mode 100644 soft-fp/floatundisf.c create mode 100644 soft-fp/floatunditf.c create mode 100644 soft-fp/floatunsidf.c create mode 100644 soft-fp/floatunsisf.c create mode 100644 soft-fp/floatunsitf.c create mode 100644 soft-fp/unorddf2.c create mode 100644 soft-fp/unordsf2.c create mode 100644 soft-fp/unordtf2.c (limited to 'soft-fp') diff --git a/soft-fp/Makefile b/soft-fp/Makefile index e0a3cfb0df..8eb89c5e51 100644 --- a/soft-fp/Makefile +++ b/soft-fp/Makefile @@ -23,17 +23,18 @@ subdir := soft-fp gcc-single-routines := negsf2 addsf3 subsf3 mulsf3 divsf3 eqsf2 \ - lesf2 gesf2 fixsfsi fixunssfsi floatsisf fixsfdi \ - fixunssfdi floatdisf sqrtsf2 + lesf2 gesf2 unordsf2 fixsfsi fixunssfsi floatsisf fixsfdi \ + fixunssfdi floatdisf sqrtsf2 floatunsisf floatundisf gcc-double-routines := negdf2 adddf3 subdf3 muldf3 divdf3 eqdf2 \ - ledf2 gedf2 fixdfsi fixunsdfsi floatsidf fixdfdi \ - fixunsdfdi floatdidf extendsfdf2 truncdfsf2 sqrtdf2 + ledf2 gedf2 unorddf2 fixdfsi fixunsdfsi floatsidf fixdfdi \ + fixunsdfdi floatdidf extendsfdf2 truncdfsf2 sqrtdf2 floatunsidf \ + floatundidf gcc-quad-routines := negtf2 addtf3 subtf3 multf3 divtf3 eqtf2 \ - letf2 getf2 fixtfsi fixunstfsi floatsitf fixtfdi \ + letf2 getf2 unordtf2 fixtfsi fixunstfsi floatsitf fixtfdi \ fixunstfdi floatditf extendsftf2 trunctfsf2 extenddftf2 \ - trunctfdf2 sqrttf2 + trunctfdf2 sqrttf2 floatunsitf floatunditf distribute := double.h op-1.h op-2.h op-4.h op-common.h quad.h \ single.h soft-fp.h extended.h Banner op-8.h testit.c \ diff --git a/soft-fp/adddf3.c b/soft-fp/adddf3.c index 6802d13e37..24c03db0a6 100644 --- a/soft-fp/adddf3.c +++ b/soft-fp/adddf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a + b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999, 2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,23 +26,23 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" -double __adddf3(double a, double b) +DFtype __adddf3(DFtype a, DFtype b) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_D(B); FP_DECL_D(R); - double r; + DFtype r; FP_INIT_ROUNDMODE; - FP_UNPACK_D(A, a); - FP_UNPACK_D(B, b); + FP_UNPACK_SEMIRAW_D(A, a); + FP_UNPACK_SEMIRAW_D(B, b); FP_ADD_D(R, A, B); - FP_PACK_D(r, R); + FP_PACK_SEMIRAW_D(r, R); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/addsf3.c b/soft-fp/addsf3.c index a1e7f0c10c..b86991ee56 100644 --- a/soft-fp/addsf3.c +++ b/soft-fp/addsf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a + b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,23 +26,23 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" -float __addsf3(float a, float b) +SFtype __addsf3(SFtype a, SFtype b) { FP_DECL_EX; FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R); - float r; + SFtype r; FP_INIT_ROUNDMODE; - FP_UNPACK_S(A, a); - FP_UNPACK_S(B, b); + FP_UNPACK_SEMIRAW_S(A, a); + FP_UNPACK_SEMIRAW_S(B, b); FP_ADD_S(R, A, B); - FP_PACK_S(r, R); + FP_PACK_SEMIRAW_S(r, R); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/addtf3.c b/soft-fp/addtf3.c index b7348f5acc..49b67f0ba9 100644 --- a/soft-fp/addtf3.c +++ b/soft-fp/addtf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a + b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,23 +26,23 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" -long double __addtf3(long double a, long double b) +TFtype __addtf3(TFtype a, TFtype b) { FP_DECL_EX; FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(R); - long double r; + TFtype r; FP_INIT_ROUNDMODE; - FP_UNPACK_Q(A, a); - FP_UNPACK_Q(B, b); + FP_UNPACK_SEMIRAW_Q(A, a); + FP_UNPACK_SEMIRAW_Q(B, b); FP_ADD_Q(R, A, B); - FP_PACK_Q(r, R); + FP_PACK_SEMIRAW_Q(r, R); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/divdf3.c b/soft-fp/divdf3.c index f8a479dce7..c3bb0d247c 100644 --- a/soft-fp/divdf3.c +++ b/soft-fp/divdf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a / b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,17 +26,17 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" -double __divdf3(double a, double b) +DFtype __divdf3(DFtype a, DFtype b) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_D(B); FP_DECL_D(R); - double r; + DFtype r; FP_INIT_ROUNDMODE; FP_UNPACK_D(A, a); diff --git a/soft-fp/divsf3.c b/soft-fp/divsf3.c index 9e9234fddf..176bb3c2cb 100644 --- a/soft-fp/divsf3.c +++ b/soft-fp/divsf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a / b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,17 +26,17 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" -float __divsf3(float a, float b) +SFtype __divsf3(SFtype a, SFtype b) { FP_DECL_EX; FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R); - float r; + SFtype r; FP_INIT_ROUNDMODE; FP_UNPACK_S(A, a); diff --git a/soft-fp/divtf3.c b/soft-fp/divtf3.c index 264af97cb0..916fbfe974 100644 --- a/soft-fp/divtf3.c +++ b/soft-fp/divtf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a / b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,17 +26,17 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" -long double __divtf3(long double a, long double b) +TFtype __divtf3(TFtype a, TFtype b) { FP_DECL_EX; FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(R); - long double r; + TFtype r; FP_INIT_ROUNDMODE; FP_UNPACK_Q(A, a); diff --git a/soft-fp/double.h b/soft-fp/double.h index c659adec62..c8f4420af8 100644 --- a/soft-fp/double.h +++ b/soft-fp/double.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Double Precision - Copyright (C) 1997,1998,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2006 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), @@ -12,6 +12,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -19,8 +28,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #if _FP_W_TYPE_SIZE < 32 #error "Here's a nickel kid. Go buy yourself a real computer." @@ -42,16 +51,22 @@ #define _FP_QNANBIT_D \ ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-2) % _FP_W_TYPE_SIZE) +#define _FP_QNANBIT_SH_D \ + ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-2+_FP_WORKBITS) % _FP_W_TYPE_SIZE) #define _FP_IMPLBIT_D \ ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-1) % _FP_W_TYPE_SIZE) +#define _FP_IMPLBIT_SH_D \ + ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-1+_FP_WORKBITS) % _FP_W_TYPE_SIZE) #define _FP_OVERFLOW_D \ ((_FP_W_TYPE)1 << _FP_WFRACBITS_D % _FP_W_TYPE_SIZE) +typedef float DFtype __attribute__((mode(DF))); + #if _FP_W_TYPE_SIZE < 64 union _FP_UNION_D { - double flt; + DFtype flt; struct { #if __BYTE_ORDER == __BIG_ENDIAN unsigned sign : 1; @@ -89,6 +104,18 @@ union _FP_UNION_D _FP_UNPACK_CANONICAL(D,2,X); \ } while (0) +#define FP_UNPACK_SEMIRAW_D(X,val) \ + do { \ + _FP_UNPACK_RAW_2(D,X,val); \ + _FP_UNPACK_SEMIRAW(D,2,X); \ + } while (0) + +#define FP_UNPACK_SEMIRAW_DP(X,val) \ + do { \ + _FP_UNPACK_RAW_2_P(D,X,val); \ + _FP_UNPACK_SEMIRAW(D,2,X); \ + } while (0) + #define FP_PACK_D(val,X) \ do { \ _FP_PACK_CANONICAL(D,2,X); \ @@ -102,6 +129,19 @@ union _FP_UNION_D _FP_PACK_RAW_2_P(D,val,X); \ } while (0) +#define FP_PACK_SEMIRAW_D(val,X) \ + do { \ + _FP_PACK_SEMIRAW(D,2,X); \ + _FP_PACK_RAW_2(D,val,X); \ + } while (0) + +#define FP_PACK_SEMIRAW_DP(val,X) \ + do { \ + _FP_PACK_SEMIRAW(D,2,X); \ + if (!FP_INHIBIT_RESULTS) \ + _FP_PACK_RAW_2_P(D,val,X); \ + } while (0) + #define FP_ISSIGNAN_D(X) _FP_ISSIGNAN(D,2,X) #define FP_NEG_D(R,X) _FP_NEG(D,2,R,X) #define FP_ADD_D(R,X,Y) _FP_ADD(D,2,R,X,Y) @@ -113,6 +153,7 @@ union _FP_UNION_D #define FP_CMP_D(r,X,Y,un) _FP_CMP(D,2,r,X,Y,un) #define FP_CMP_EQ_D(r,X,Y) _FP_CMP_EQ(D,2,r,X,Y) +#define FP_CMP_UNORD_D(r,X,Y) _FP_CMP_UNORD(D,2,r,X,Y) #define FP_TO_INT_D(r,X,rsz,rsg) _FP_TO_INT(D,2,r,X,rsz,rsg) #define FP_FROM_INT_D(X,r,rs,rt) _FP_FROM_INT(D,2,X,r,rs,rt) @@ -124,7 +165,7 @@ union _FP_UNION_D union _FP_UNION_D { - double flt; + DFtype flt; struct { #if __BYTE_ORDER == __BIG_ENDIAN unsigned sign : 1; @@ -160,6 +201,18 @@ union _FP_UNION_D _FP_UNPACK_CANONICAL(D,1,X); \ } while (0) +#define FP_UNPACK_SEMIRAW_D(X,val) \ + do { \ + _FP_UNPACK_RAW_2(1,X,val); \ + _FP_UNPACK_SEMIRAW(D,1,X); \ + } while (0) + +#define FP_UNPACK_SEMIRAW_DP(X,val) \ + do { \ + _FP_UNPACK_RAW_2_P(1,X,val); \ + _FP_UNPACK_SEMIRAW(D,1,X); \ + } while (0) + #define FP_PACK_D(val,X) \ do { \ _FP_PACK_CANONICAL(D,1,X); \ @@ -173,6 +226,19 @@ union _FP_UNION_D _FP_PACK_RAW_1_P(D,val,X); \ } while (0) +#define FP_PACK_SEMIRAW_D(val,X) \ + do { \ + _FP_PACK_SEMIRAW(D,1,X); \ + _FP_PACK_RAW_1(D,val,X); \ + } while (0) + +#define FP_PACK_SEMIRAW_DP(val,X) \ + do { \ + _FP_PACK_SEMIRAW(D,1,X); \ + if (!FP_INHIBIT_RESULTS) \ + _FP_PACK_RAW_1_P(D,val,X); \ + } while (0) + #define FP_ISSIGNAN_D(X) _FP_ISSIGNAN(D,1,X) #define FP_NEG_D(R,X) _FP_NEG(D,1,R,X) #define FP_ADD_D(R,X,Y) _FP_ADD(D,1,R,X,Y) @@ -187,6 +253,7 @@ union _FP_UNION_D #define FP_CMP_D(r,X,Y,un) _FP_CMP(D,1,r,X,Y,un) #define FP_CMP_EQ_D(r,X,Y) _FP_CMP_EQ(D,1,r,X,Y) +#define FP_CMP_UNORD_D(r,X,Y) _FP_CMP_UNORD(D,1,r,X,Y) #define FP_TO_INT_D(r,X,rsz,rsg) _FP_TO_INT(D,1,r,X,rsz,rsg) #define FP_FROM_INT_D(X,r,rs,rt) _FP_FROM_INT(D,1,X,r,rs,rt) diff --git a/soft-fp/eqdf2.c b/soft-fp/eqdf2.c index b2586bdb9c..efa769e986 100644 --- a/soft-fp/eqdf2.c +++ b/soft-fp/eqdf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 otherwise - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,13 +26,13 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" -int __eqdf2(double a, double b) +int __eqdf2(DFtype a, DFtype b) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_D(B); diff --git a/soft-fp/eqsf2.c b/soft-fp/eqsf2.c index d838b52396..7e01c01d2f 100644 --- a/soft-fp/eqsf2.c +++ b/soft-fp/eqsf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 otherwise - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,13 +26,13 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" -int __eqsf2(float a, float b) +int __eqsf2(SFtype a, SFtype b) { FP_DECL_EX; FP_DECL_S(A); FP_DECL_S(B); diff --git a/soft-fp/eqtf2.c b/soft-fp/eqtf2.c index adb1663edb..fd6ffd1ebe 100644 --- a/soft-fp/eqtf2.c +++ b/soft-fp/eqtf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 otherwise - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,13 +26,13 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" -int __eqtf2(long double a, long double b) +int __eqtf2(TFtype a, TFtype b) { FP_DECL_EX; FP_DECL_Q(A); FP_DECL_Q(B); diff --git a/soft-fp/extenddftf2.c b/soft-fp/extenddftf2.c index 53ac72cfca..4101639a94 100644 --- a/soft-fp/extenddftf2.c +++ b/soft-fp/extenddftf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a converted to IEEE quad - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,28 +26,28 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" #include "quad.h" -long double __extenddftf2(double a) +TFtype __extenddftf2(DFtype a) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_Q(R); - long double r; + TFtype r; FP_INIT_ROUNDMODE; - FP_UNPACK_D(A, a); + FP_UNPACK_RAW_D(A, a); #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q - FP_CONV(Q,D,4,2,R,A); + FP_EXTEND(Q,D,4,2,R,A); #else - FP_CONV(Q,D,2,1,R,A); + FP_EXTEND(Q,D,2,1,R,A); #endif - FP_PACK_Q(r, R); + FP_PACK_RAW_Q(r, R); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/extended.h b/soft-fp/extended.h index 2edcbd05f0..bbf39429e7 100644 --- a/soft-fp/extended.h +++ b/soft-fp/extended.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Extended Precision. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek (jj@ultra.linux.cz). @@ -9,6 +9,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -16,8 +25,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #if _FP_W_TYPE_SIZE < 32 #error "Here's a nickel, kid. Go buy yourself a real computer." @@ -39,16 +48,22 @@ #define _FP_QNANBIT_E \ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-2) % _FP_W_TYPE_SIZE) +#define _FP_QNANBIT_SH_E \ + ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-2+_FP_WORKBITS) % _FP_W_TYPE_SIZE) #define _FP_IMPLBIT_E \ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-1) % _FP_W_TYPE_SIZE) +#define _FP_IMPLBIT_SH_E \ + ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-1+_FP_WORKBITS) % _FP_W_TYPE_SIZE) #define _FP_OVERFLOW_E \ ((_FP_W_TYPE)1 << (_FP_WFRACBITS_E % _FP_W_TYPE_SIZE)) +typedef float XFtype __attribute__((mode(XF))); + #if _FP_W_TYPE_SIZE < 64 union _FP_UNION_E { - long double flt; + XFtype flt; struct { #if __BYTE_ORDER == __BIG_ENDIAN @@ -143,10 +158,22 @@ union _FP_UNION_E #define FP_UNPACK_EP(X,val) \ do { \ - FP_UNPACK_RAW_2_P(X,val); \ + FP_UNPACK_RAW_EP(X,val); \ _FP_UNPACK_CANONICAL(E,4,X); \ } while (0) +#define FP_UNPACK_SEMIRAW_E(X,val) \ + do { \ + _FP_UNPACK_RAW_E(X,val); \ + _FP_UNPACK_SEMIRAW(E,4,X); \ + } while (0) + +#define FP_UNPACK_SEMIRAW_EP(X,val) \ + do { \ + _FP_UNPACK_RAW_EP(X,val); \ + _FP_UNPACK_SEMIRAW(E,4,X); \ + } while (0) + #define FP_PACK_E(val,X) \ do { \ _FP_PACK_CANONICAL(E,4,X); \ @@ -159,6 +186,18 @@ union _FP_UNION_E FP_PACK_RAW_EP(val,X); \ } while (0) +#define FP_PACK_SEMIRAW_E(val,X) \ + do { \ + _FP_PACK_SEMIRAW(E,4,X); \ + _FP_PACK_RAW_E(val,X); \ + } while (0) + +#define FP_PACK_SEMIRAW_EP(val,X) \ + do { \ + _FP_PACK_SEMIRAW(E,4,X); \ + _FP_PACK_RAW_EP(val,X); \ + } while (0) + #define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,4,X) #define FP_NEG_E(R,X) _FP_NEG(E,4,R,X) #define FP_ADD_E(R,X,Y) _FP_ADD(E,4,R,X,Y) @@ -224,6 +263,7 @@ union _FP_UNION_E #define FP_CMP_E(r,X,Y,un) _FP_CMP(E,4,r,X,Y,un) #define FP_CMP_EQ_E(r,X,Y) _FP_CMP_EQ(E,4,r,X,Y) +#define FP_CMP_UNORD_E(r,X,Y) _FP_CMP_UNORD(E,4,r,X,Y) #define FP_TO_INT_E(r,X,rsz,rsg) _FP_TO_INT(E,4,r,X,rsz,rsg) #define FP_FROM_INT_E(X,r,rs,rt) _FP_FROM_INT(E,4,X,r,rs,rt) @@ -234,7 +274,7 @@ union _FP_UNION_E #else /* not _FP_W_TYPE_SIZE < 64 */ union _FP_UNION_E { - long double flt /* __attribute__((mode(TF))) */ ; + XFtype flt; struct { #if __BYTE_ORDER == __BIG_ENDIAN unsigned long pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E); @@ -323,6 +363,18 @@ union _FP_UNION_E _FP_UNPACK_CANONICAL(E,2,X); \ } while (0) +#define FP_UNPACK_SEMIRAW_E(X,val) \ + do { \ + _FP_UNPACK_RAW_E(X,val); \ + _FP_UNPACK_SEMIRAW(E,2,X); \ + } while (0) + +#define FP_UNPACK_SEMIRAW_EP(X,val) \ + do { \ + _FP_UNPACK_RAW_EP(X,val); \ + _FP_UNPACK_SEMIRAW(E,2,X); \ + } while (0) + #define FP_PACK_E(val,X) \ do { \ _FP_PACK_CANONICAL(E,2,X); \ @@ -335,6 +387,18 @@ union _FP_UNION_E FP_PACK_RAW_EP(val,X); \ } while (0) +#define FP_PACK_SEMIRAW_E(val,X) \ + do { \ + _FP_PACK_SEMIRAW(E,2,X); \ + _FP_PACK_RAW_E(val,X); \ + } while (0) + +#define FP_PACK_SEMIRAW_EP(val,X) \ + do { \ + _FP_PACK_SEMIRAW(E,2,X); \ + _FP_PACK_RAW_EP(val,X); \ + } while (0) + #define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,2,X) #define FP_NEG_E(R,X) _FP_NEG(E,2,R,X) #define FP_ADD_E(R,X,Y) _FP_ADD(E,2,R,X,Y) @@ -378,6 +442,7 @@ union _FP_UNION_E #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) #define FP_TO_INT_E(r,X,rsz,rsg) _FP_TO_INT(E,2,r,X,rsz,rsg) #define FP_FROM_INT_E(X,r,rs,rt) _FP_FROM_INT(E,2,X,r,rs,rt) diff --git a/soft-fp/extendsfdf2.c b/soft-fp/extendsfdf2.c index a418f1967e..fba22d5a19 100644 --- a/soft-fp/extendsfdf2.c +++ b/soft-fp/extendsfdf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a converted to IEEE double - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,28 +26,28 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" #include "double.h" -double __extendsfdf2(float a) +DFtype __extendsfdf2(SFtype a) { FP_DECL_EX; FP_DECL_S(A); FP_DECL_D(R); - double r; + DFtype r; FP_INIT_ROUNDMODE; - FP_UNPACK_S(A, a); + FP_UNPACK_RAW_S(A, a); #if _FP_W_TYPE_SIZE < _FP_FRACBITS_D - FP_CONV(D,S,2,1,R,A); + FP_EXTEND(D,S,2,1,R,A); #else - FP_CONV(D,S,1,1,R,A); + FP_EXTEND(D,S,1,1,R,A); #endif - FP_PACK_D(r, R); + FP_PACK_RAW_D(r, R); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/extendsftf2.c b/soft-fp/extendsftf2.c index d2735ba1a5..c43cf1edee 100644 --- a/soft-fp/extendsftf2.c +++ b/soft-fp/extendsftf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a converted to IEEE quad - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,28 +26,28 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" #include "quad.h" -long double __extendsftf2(float a) +TFtype __extendsftf2(SFtype a) { FP_DECL_EX; FP_DECL_S(A); FP_DECL_Q(R); - long double r; + TFtype r; FP_INIT_ROUNDMODE; - FP_UNPACK_S(A, a); + FP_UNPACK_RAW_S(A, a); #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q - FP_CONV(Q,S,4,1,R,A); + FP_EXTEND(Q,S,4,1,R,A); #else - FP_CONV(Q,S,2,1,R,A); + FP_EXTEND(Q,S,2,1,R,A); #endif - FP_PACK_Q(r, R); + FP_PACK_RAW_Q(r, R); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixdfdi.c b/soft-fp/fixdfdi.c index 201014581f..fdfe35af51 100644 --- a/soft-fp/fixdfdi.c +++ b/soft-fp/fixdfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit signed integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" -DItype __fixdfdi(double a) +DItype __fixdfdi(DFtype a) { FP_DECL_EX; FP_DECL_D(A); - DItype r; + UDItype r; - FP_UNPACK_D(A, a); - FP_TO_INT_D(r, A, 64, 1); + FP_UNPACK_RAW_D(A, a); + FP_TO_INT_D(r, A, DI_BITS, 1); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixdfsi.c b/soft-fp/fixdfsi.c index 9961d3d560..a05f3e39a5 100644 --- a/soft-fp/fixdfsi.c +++ b/soft-fp/fixdfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit signed integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" -SItype __fixdfsi(double a) +SItype __fixdfsi(DFtype a) { FP_DECL_EX; FP_DECL_D(A); - SItype r; + USItype r; - FP_UNPACK_D(A, a); - FP_TO_INT_D(r, A, 32, 1); + FP_UNPACK_RAW_D(A, a); + FP_TO_INT_D(r, A, SI_BITS, 1); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixsfdi.c b/soft-fp/fixsfdi.c index f3fd2e77a1..384d9bdd53 100644 --- a/soft-fp/fixsfdi.c +++ b/soft-fp/fixsfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit signed integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" -DItype __fixsfdi(float a) +DItype __fixsfdi(SFtype a) { FP_DECL_EX; FP_DECL_S(A); - DItype r; + UDItype r; - FP_UNPACK_S(A, a); - FP_TO_INT_S(r, A, 64, 1); + FP_UNPACK_RAW_S(A, a); + FP_TO_INT_S(r, A, DI_BITS, 1); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixsfsi.c b/soft-fp/fixsfsi.c index e8251d18b6..1d40ed05df 100644 --- a/soft-fp/fixsfsi.c +++ b/soft-fp/fixsfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit signed integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" -SItype __fixsfsi(float a) +SItype __fixsfsi(SFtype a) { FP_DECL_EX; FP_DECL_S(A); - SItype r; + USItype r; - FP_UNPACK_S(A, a); - FP_TO_INT_S(r, A, 32, 1); + FP_UNPACK_RAW_S(A, a); + FP_TO_INT_S(r, A, SI_BITS, 1); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixtfdi.c b/soft-fp/fixtfdi.c index fda412261d..ea10ce2dd3 100644 --- a/soft-fp/fixtfdi.c +++ b/soft-fp/fixtfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit signed integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" -DItype __fixtfdi(long double a) +DItype __fixtfdi(TFtype a) { FP_DECL_EX; FP_DECL_Q(A); - DItype r; + UDItype r; - FP_UNPACK_Q(A, a); - FP_TO_INT_Q(r, A, 64, 1); + FP_UNPACK_RAW_Q(A, a); + FP_TO_INT_Q(r, A, DI_BITS, 1); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixtfsi.c b/soft-fp/fixtfsi.c index da51cf951b..eb71038bc3 100644 --- a/soft-fp/fixtfsi.c +++ b/soft-fp/fixtfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit signed integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" -SItype __fixtfsi(long double a) +SItype __fixtfsi(TFtype a) { FP_DECL_EX; FP_DECL_Q(A); - SItype r; + USItype r; - FP_UNPACK_Q(A, a); - FP_TO_INT_Q(r, A, 32, 1); + FP_UNPACK_RAW_Q(A, a); + FP_TO_INT_Q(r, A, SI_BITS, 1); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixunsdfdi.c b/soft-fp/fixunsdfdi.c index 18bc61ca30..d85198f185 100644 --- a/soft-fp/fixunsdfdi.c +++ b/soft-fp/fixunsdfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit unsigned integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" -UDItype __fixunsdfdi(double a) +UDItype __fixunsdfdi(DFtype a) { FP_DECL_EX; FP_DECL_D(A); UDItype r; - FP_UNPACK_D(A, a); - FP_TO_INT_D(r, A, 64, 0); + FP_UNPACK_RAW_D(A, a); + FP_TO_INT_D(r, A, DI_BITS, 0); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixunsdfsi.c b/soft-fp/fixunsdfsi.c index 4060b5119a..492ffdea68 100644 --- a/soft-fp/fixunsdfsi.c +++ b/soft-fp/fixunsdfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit unsigned integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" -USItype __fixunsdfsi(double a) +USItype __fixunsdfsi(DFtype a) { FP_DECL_EX; FP_DECL_D(A); USItype r; - FP_UNPACK_D(A, a); - FP_TO_INT_D(r, A, 32, 0); + FP_UNPACK_RAW_D(A, a); + FP_TO_INT_D(r, A, SI_BITS, 0); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixunssfdi.c b/soft-fp/fixunssfdi.c index 6e4f5beb30..5484153837 100644 --- a/soft-fp/fixunssfdi.c +++ b/soft-fp/fixunssfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit unsigned integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" -UDItype __fixunssfdi(float a) +UDItype __fixunssfdi(SFtype a) { FP_DECL_EX; FP_DECL_S(A); UDItype r; - FP_UNPACK_S(A, a); - FP_TO_INT_S(r, A, 64, 0); + FP_UNPACK_RAW_S(A, a); + FP_TO_INT_S(r, A, DI_BITS, 0); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixunssfsi.c b/soft-fp/fixunssfsi.c index 5c3e99305e..ac9d4b9654 100644 --- a/soft-fp/fixunssfsi.c +++ b/soft-fp/fixunssfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit unsigned integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" -USItype __fixunssfsi(float a) +USItype __fixunssfsi(SFtype a) { FP_DECL_EX; FP_DECL_S(A); USItype r; - FP_UNPACK_S(A, a); - FP_TO_INT_S(r, A, 32, 0); + FP_UNPACK_RAW_S(A, a); + FP_TO_INT_S(r, A, SI_BITS, 0); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixunstfdi.c b/soft-fp/fixunstfdi.c index a8ac454ce4..86f1fc8562 100644 --- a/soft-fp/fixunstfdi.c +++ b/soft-fp/fixunstfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit unsigned integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" -UDItype __fixunstfdi(long double a) +UDItype __fixunstfdi(TFtype a) { FP_DECL_EX; FP_DECL_Q(A); UDItype r; - FP_UNPACK_Q(A, a); - FP_TO_INT_Q(r, A, 64, 0); + FP_UNPACK_RAW_Q(A, a); + FP_TO_INT_Q(r, A, DI_BITS, 0); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/fixunstfsi.c b/soft-fp/fixunstfsi.c index 812fb8ef26..e0335da479 100644 --- a/soft-fp/fixunstfsi.c +++ b/soft-fp/fixunstfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit unsigned integer - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,20 +26,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" -USItype __fixunstfsi(long double a) +USItype __fixunstfsi(TFtype a) { FP_DECL_EX; FP_DECL_Q(A); USItype r; - FP_UNPACK_Q(A, a); - FP_TO_INT_Q(r, A, 32, 0); + FP_UNPACK_RAW_Q(A, a); + FP_TO_INT_Q(r, A, SI_BITS, 0); FP_HANDLE_EXCEPTIONS; return r; diff --git a/soft-fp/floatdidf.c b/soft-fp/floatdidf.c index 38303f292f..21e9fb1899 100644 --- a/soft-fp/floatdidf.c +++ b/soft-fp/floatdidf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 64bit signed integer to IEEE double - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2006 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). @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at yo