diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sparc64/fpu/fpu_implode.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/libc/sparc64/fpu/fpu_implode.c b/lib/libc/sparc64/fpu/fpu_implode.c index 2c3475e..a5b3817 100644 --- a/lib/libc/sparc64/fpu/fpu_implode.c +++ b/lib/libc/sparc64/fpu/fpu_implode.c @@ -259,14 +259,15 @@ __fpu_ftox(fe, fp, res) case FPC_NUM: /* - * If exp >= 2^64, overflow. Otherwise shift value right - * into last mantissa word (this will not exceed 0xffffffffffffffff), - * shifting any guard and round bits out into the sticky - * bit. Then ``round'' towards zero, i.e., just set an - * inexact exception if sticky is set (see round()). - * If the result is > 0x8000000000000000, or is positive and equals - * 0x8000000000000000, overflow; otherwise the last fraction word - * is the result. + * If exp >= 2^64, overflow. Otherwise shift value + * right into last mantissa word (this will not exceed + * 0xffffffffffffffff), shifting any guard and round + * bits out into the sticky bit. Then ``round'' towards + * zero, i.e., just set an inexact exception if sticky + * is set (see round()). + * If the result is > 0x8000000000000000, or is positive + * and equals 0x8000000000000000, overflow; otherwise + * the last fraction word is the result. */ if ((exp = fp->fp_exp) >= 64) break; @@ -277,7 +278,7 @@ __fpu_ftox(fe, fp, res) if (i >= ((u_int64_t)0x8000000000000000LL + sign)) break; if (sign) - i = -1; + i = -i; res[1] = (int)i; return (i >> 32); |