diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2013-06-15 17:37:04 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2013-06-15 17:37:04 +0000 |
commit | 3625809e03b7287e244a6a2563d5217426e88d5c (patch) | |
tree | fecf84cbf45a9412ad727953f17ad0e5ef804e9f /libc/soft-fp | |
parent | 8548b3be8c48bf62bd4e20fb0ee958338b01bc6c (diff) | |
download | eglibc2-3625809e03b7287e244a6a2563d5217426e88d5c.tar.gz |
Merge changes between r23217 and r23296 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@23297 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/soft-fp')
-rw-r--r-- | libc/soft-fp/extended.h | 4 | ||||
-rw-r--r-- | libc/soft-fp/op-1.h | 10 | ||||
-rw-r--r-- | libc/soft-fp/op-2.h | 16 | ||||
-rw-r--r-- | libc/soft-fp/op-4.h | 14 | ||||
-rw-r--r-- | libc/soft-fp/op-8.h | 2 | ||||
-rw-r--r-- | libc/soft-fp/op-common.h | 28 | ||||
-rw-r--r-- | libc/soft-fp/testit.c | 10 |
7 files changed, 42 insertions, 42 deletions
diff --git a/libc/soft-fp/extended.h b/libc/soft-fp/extended.h index a4bd7e86e..74927550e 100644 --- a/libc/soft-fp/extended.h +++ b/libc/soft-fp/extended.h @@ -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/libc/soft-fp/op-1.h b/libc/soft-fp/op-1.h index 30e60638c..8e05e2fab 100644 --- a/libc/soft-fp/op-1.h +++ b/libc/soft-fp/op-1.h @@ -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/libc/soft-fp/op-2.h b/libc/soft-fp/op-2.h index 1b63c8cca..48e01d26d 100644 --- a/libc/soft-fp/op-2.h +++ b/libc/soft-fp/op-2.h @@ -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/libc/soft-fp/op-4.h b/libc/soft-fp/op-4.h index a9d421a3b..007b01f36 100644 --- a/libc/soft-fp/op-4.h +++ b/libc/soft-fp/op-4.h @@ -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/libc/soft-fp/op-8.h b/libc/soft-fp/op-8.h index 9bb92320e..8890d0220 100644 --- a/libc/soft-fp/op-8.h +++ b/libc/soft-fp/op-8.h @@ -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/libc/soft-fp/op-common.h b/libc/soft-fp/op-common.h index 8b73b58c5..ce472e0d5 100644 --- a/libc/soft-fp/op-common.h +++ b/libc/soft-fp/op-common.h @@ -992,28 +992,28 @@ 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; /* NAN */ \ @@ -1022,7 +1022,7 @@ do { \ 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; \ diff --git a/libc/soft-fp/testit.c b/libc/soft-fp/testit.c index f1e9b5475..1aaf8b45c 100644 --- a/libc/soft-fp/testit.c +++ b/libc/soft-fp/testit.c @@ -244,7 +244,7 @@ float build_float(const char *s, const char *e, const char *f) return u.flt; } - + double build_double(const char *s, const char *e, const char *f) { union _FP_UNION_D u; @@ -264,10 +264,10 @@ double build_double(const char *s, const char *e, const char *f) #else u.bits.frac = strtoul(f, 0, 16); #endif - + return u.flt; } - + /*======================================================================*/ fpu_control_t fcw0, fcw1; @@ -303,7 +303,7 @@ void test_double_arith(double (*tf)(double, double), _FPU_GETCW(fcw0); fcw1 = ((fcw0 & ~_FPU_EXTENDED) | _FPU_DOUBLE); _FPU_SETCW(fcw1); -#endif +#endif rr = (*rf)(x, y); #ifdef __i386__ _FPU_SETCW(fcw0); @@ -386,7 +386,7 @@ void test_float_int_conv(float x) printf("\n\ttrue = %d\n\tfalse = %d\n", rr, tr); } } - + void test_double_int_conv(double x) { int tr, rr; |