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 /soft-fp/op-1.h | |
parent | 378b1353df56387b0706bc42cb661ff2227c8eb9 (diff) |
Updated to fedora-glibc-20060301T0647
Diffstat (limited to 'soft-fp/op-1.h')
-rw-r--r-- | soft-fp/op-1.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/soft-fp/op-1.h b/soft-fp/op-1.h index 367ff2274b..9f58ba6a08 100644 --- a/soft-fp/op-1.h +++ b/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 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), @@ -40,8 +40,16 @@ #define _FP_FRAC_SRL_1(X,N) (X##_f >>= N) /* Right shift with sticky-lsb. */ +#define _FP_FRAC_SRST_1(X,S,N,sz) __FP_FRAC_SRST_1(X##_f, S, N, sz) #define _FP_FRAC_SRS_1(X,N,sz) __FP_FRAC_SRS_1(X##_f, N, sz) +#define __FP_FRAC_SRST_1(X,S,N,sz) \ +do { \ + S = (__builtin_constant_p(N) && (N) == 1 \ + ? X & 1 : (X << (_FP_W_TYPE_SIZE - (N))) != 0); \ + X = X >> (N); \ +} while (0) + #define __FP_FRAC_SRS_1(X,N,sz) \ (X = (X >> (N) | (__builtin_constant_p(N) && (N) == 1 \ ? X & 1 : (X << (_FP_W_TYPE_SIZE - (N))) != 0))) @@ -282,17 +290,4 @@ * Convert FP values between word sizes */ -#define _FP_FRAC_CONV_1_1(dfs, sfs, D, S) \ - do { \ - D##_f = S##_f; \ - if (_FP_WFRACBITS_##sfs > _FP_WFRACBITS_##dfs) \ - { \ - if (S##_c != FP_CLS_NAN) \ - _FP_FRAC_SRS_1(D, (_FP_WFRACBITS_##sfs-_FP_WFRACBITS_##dfs), \ - _FP_WFRACBITS_##sfs); \ - else \ - _FP_FRAC_SRL_1(D, (_FP_WFRACBITS_##sfs-_FP_WFRACBITS_##dfs)); \ - } \ - else \ - D##_f <<= _FP_WFRACBITS_##dfs - _FP_WFRACBITS_##sfs; \ - } while (0) +#define _FP_FRAC_COPY_1_1(D, S) (D##_f = S##_f) |