diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-03-01 06:55:57 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-03-01 06:55:57 +0000 |
commit | 6a8c1091fdc978b0e369f4ca3f58a07c2f8b9d33 (patch) | |
tree | 754e2649fcc68e83b3ad749cb5a1a1f7549ffafb /sysdeps/alpha | |
parent | 378b1353df56387b0706bc42cb661ff2227c8eb9 (diff) |
Updated to fedora-glibc-20060301T0647
Diffstat (limited to 'sysdeps/alpha')
-rw-r--r-- | sysdeps/alpha/soft-fp/Makefile | 4 | ||||
-rw-r--r-- | sysdeps/alpha/soft-fp/e_sqrtl.c | 5 | ||||
-rw-r--r-- | sysdeps/alpha/soft-fp/ots_add.c | 8 | ||||
-rw-r--r-- | sysdeps/alpha/soft-fp/ots_cvtqux.c | 6 | ||||
-rw-r--r-- | sysdeps/alpha/soft-fp/ots_cvtqx.c | 6 | ||||
-rw-r--r-- | sysdeps/alpha/soft-fp/ots_cvttx.c | 10 | ||||
-rw-r--r-- | sysdeps/alpha/soft-fp/ots_cvtxq.c | 7 | ||||
-rw-r--r-- | sysdeps/alpha/soft-fp/ots_cvtxt.c | 10 | ||||
-rw-r--r-- | sysdeps/alpha/soft-fp/ots_nintxq.c | 12 | ||||
-rw-r--r-- | sysdeps/alpha/soft-fp/ots_sub.c | 8 |
10 files changed, 43 insertions, 33 deletions
diff --git a/sysdeps/alpha/soft-fp/Makefile b/sysdeps/alpha/soft-fp/Makefile index d7e7e2684a..5410a78984 100644 --- a/sysdeps/alpha/soft-fp/Makefile +++ b/sysdeps/alpha/soft-fp/Makefile @@ -4,3 +4,7 @@ ifeq ($(subdir),soft-fp) sysdep_routines += ots_add ots_sub ots_mul ots_div ots_cmp ots_cmpe \ ots_cvtxq ots_cvtqx ots_cvtqux ots_cvttx ots_cvtxt ots_nintxq endif + +ifeq ($(subdir),math) +CPPFLAGS += -I../soft-fp +endif diff --git a/sysdeps/alpha/soft-fp/e_sqrtl.c b/sysdeps/alpha/soft-fp/e_sqrtl.c index a1d09725b7..717d170127 100644 --- a/sysdeps/alpha/soft-fp/e_sqrtl.c +++ b/sysdeps/alpha/soft-fp/e_sqrtl.c @@ -19,7 +19,9 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include "local-soft-fp.h" +#include <stdlib.h> +#include <soft-fp.h> +#include <quad.h> long double __ieee754_sqrtl (const long double a) @@ -27,6 +29,7 @@ __ieee754_sqrtl (const long double a) FP_DECL_EX; FP_DECL_Q(A); FP_DECL_Q(C); long double c; + long _round = 4; /* dynamic rounding */ FP_INIT_ROUNDMODE; FP_UNPACK_Q(A, a); diff --git a/sysdeps/alpha/soft-fp/ots_add.c b/sysdeps/alpha/soft-fp/ots_add.c index b4f6c28f3d..acf66f316b 100644 --- a/sysdeps/alpha/soft-fp/ots_add.c +++ b/sysdeps/alpha/soft-fp/ots_add.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: addition. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,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). @@ -29,10 +29,10 @@ _OtsAddX(long al, long ah, long bl, long bh, long _round) FP_DECL_RETURN(c); 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(C, A, B); - FP_PACK_Q(c, C); + FP_PACK_SEMIRAW_Q(c, C); FP_HANDLE_EXCEPTIONS; FP_RETURN(c); diff --git a/sysdeps/alpha/soft-fp/ots_cvtqux.c b/sysdeps/alpha/soft-fp/ots_cvtqux.c index d7ab5bae43..82c50806c4 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtqux.c +++ b/sysdeps/alpha/soft-fp/ots_cvtqux.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: unsigned integer to float conversion. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,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). @@ -33,8 +33,8 @@ _OtsCvtQUX (unsigned long a) FP_DECL_Q(C); FP_DECL_RETURN(c); - FP_FROM_INT_Q(C, a, 64, long); - FP_PACK_Q(c, C); + FP_FROM_INT_Q(C, a, 64, unsigned long); + FP_PACK_RAW_Q(c, C); FP_RETURN(c); } diff --git a/sysdeps/alpha/soft-fp/ots_cvtqx.c b/sysdeps/alpha/soft-fp/ots_cvtqx.c index 0e1c6bdc41..dc80291506 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtqx.c +++ b/sysdeps/alpha/soft-fp/ots_cvtqx.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: signed integer to float conversion. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,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). @@ -33,7 +33,7 @@ _OtsCvtQX (long a) FP_DECL_Q(C); FP_DECL_RETURN(c); - FP_FROM_INT_Q(C, a, 64, long); - FP_PACK_Q(c, C); + FP_FROM_INT_Q(C, a, 64, unsigned long); + FP_PACK_RAW_Q(c, C); FP_RETURN(c); } diff --git a/sysdeps/alpha/soft-fp/ots_cvttx.c b/sysdeps/alpha/soft-fp/ots_cvttx.c index ee5ac324cd..2d0bc9bca9 100644 --- a/sysdeps/alpha/soft-fp/ots_cvttx.c +++ b/sysdeps/alpha/soft-fp/ots_cvttx.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: floating point extension. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,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). @@ -35,13 +35,13 @@ _OtsConvertFloatTX(double a) FP_DECL_Q(C); FP_DECL_RETURN(c); - 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,C,A); + FP_EXTEND(Q,D,4,2,C,A); #else - FP_CONV(Q,D,2,1,C,A); + FP_EXTEND(Q,D,2,1,C,A); #endif - FP_PACK_Q(c, C); + FP_PACK_RAW_Q(c, C); FP_HANDLE_EXCEPTIONS; FP_RETURN(c); diff --git a/sysdeps/alpha/soft-fp/ots_cvtxq.c b/sysdeps/alpha/soft-fp/ots_cvtxq.c index 1fd47da4f7..2c9df529d5 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtxq.c +++ b/sysdeps/alpha/soft-fp/ots_cvtxq.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: float to integer conversion. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,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). @@ -26,14 +26,15 @@ _OtsCvtXQ (long al, long ah, long _round) { FP_DECL_EX; FP_DECL_Q(A); - long r, s; + unsigned long r; + long s; /* If bit 3 is set, then integer overflow detection is requested. */ s = _round & 8 ? 1 : -1; _round = _round & 3; FP_INIT_ROUNDMODE; - FP_UNPACK_Q(A, a); + FP_UNPACK_RAW_Q(A, a); FP_TO_INT_Q(r, A, 64, s); if (s > 0 && (_fex &= FP_EX_INVALID)) diff --git a/sysdeps/alpha/soft-fp/ots_cvtxt.c b/sysdeps/alpha/soft-fp/ots_cvtxt.c index 2629dd9e40..6221a2365c 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtxt.c +++ b/sysdeps/alpha/soft-fp/ots_cvtxt.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: floating point truncation. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,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). @@ -31,13 +31,13 @@ _OtsConvertFloatXT (long al, long ah, long _round) double r; FP_INIT_ROUNDMODE; - FP_UNPACK_Q(A, a); + FP_UNPACK_SEMIRAW_Q(A, a); #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q - FP_CONV(D,Q,2,4,R,A); + FP_TRUNC(D,Q,2,4,R,A); #else - FP_CONV(D,Q,1,2,R,A); + FP_TRUNC(D,Q,1,2,R,A); #endif - FP_PACK_D(r, R); + FP_PACK_SEMIRAW_D(r, R); FP_HANDLE_EXCEPTIONS; return r; diff --git a/sysdeps/alpha/soft-fp/ots_nintxq.c b/sysdeps/alpha/soft-fp/ots_nintxq.c index 2cb1ca4c2a..a718372af7 100644 --- a/sysdeps/alpha/soft-fp/ots_nintxq.c +++ b/sysdeps/alpha/soft-fp/ots_nintxq.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: convert to fortran nearest. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,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). @@ -26,22 +26,24 @@ _OtsNintXQ (long al, long ah, long _round) { FP_DECL_EX; FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); - long r, s; + unsigned long r; + long s; /* If bit 3 is set, then integer overflow detection is requested. */ s = _round & 8 ? 1 : -1; _round = _round & 3; FP_INIT_ROUNDMODE; - FP_UNPACK_Q(A, a); + FP_UNPACK_SEMIRAW_Q(A, a); /* Build 0.5 * sign(A) */ B_e = _FP_EXPBIAS_Q; - __FP_FRAC_SET_2 (B, _FP_IMPLBIT_Q, 0); + __FP_FRAC_SET_2 (B, 0, 0); B_s = A_s; - _FP_UNPACK_CANONICAL(Q,2,B); FP_ADD_Q(C, A, B); + _FP_FRAC_SRL_2(C, _FP_WORKBITS); + _FP_FRAC_HIGH_RAW_Q(C) &= ~(_FP_W_TYPE)_FP_IMPLBIT_Q; FP_TO_INT_Q(r, C, 64, s); if (s > 0 && (_fex &= FP_EX_INVALID)) FP_HANDLE_EXCEPTIONS; diff --git a/sysdeps/alpha/soft-fp/ots_sub.c b/sysdeps/alpha/soft-fp/ots_sub.c index c10043f071..5147266a04 100644 --- a/sysdeps/alpha/soft-fp/ots_sub.c +++ b/sysdeps/alpha/soft-fp/ots_sub.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: subtraction. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,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). @@ -29,10 +29,10 @@ _OtsSubX(long al, long ah, long bl, long bh, long _round) FP_DECL_RETURN(c); 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_SUB_Q(C, A, B); - FP_PACK_Q(c, C); + FP_PACK_SEMIRAW_Q(c, C); FP_HANDLE_EXCEPTIONS; FP_RETURN(c); |