OSDN Git Service

2003-09-09 Jeff Johnston <jjohnstn@redhat.com>
authorjjohnstn <jjohnstn>
Tue, 9 Sep 2003 22:53:26 +0000 (22:53 +0000)
committerjjohnstn <jjohnstn>
Tue, 9 Sep 2003 22:53:26 +0000 (22:53 +0000)
        * libc/machine/powerpc/fix64.h: Fix typo for _simdldcheck
        prototype.
        * libc/machine/powerpc/simdldtoa.c: Remove prototype for
        _simdldcheck().  Also add unsigned cast for index variable in
        for loop using sizeof operators.
        * libc/machine/powerpc/strtoufix32.c: Remove unused variable.
        * libc/machine/powerpc/strtosfix64.c: Fix call to _simdldcheck.
        * libc/machine/powerpc/strtoufix64.c (_strtoufix64_r): Ditto
        plus fix shift calculation for determining if there is a
        carry from word2.

newlib/ChangeLog
newlib/libc/machine/powerpc/fix64.h
newlib/libc/machine/powerpc/simdldtoa.c
newlib/libc/machine/powerpc/strtosfix64.c
newlib/libc/machine/powerpc/strtoufix32.c
newlib/libc/machine/powerpc/strtoufix64.c

index d36f4ad..abd439d 100644 (file)
@@ -1,3 +1,16 @@
+2003-09-09  Jeff Johnston  <jjohnstn@redhat.com>
+
+        * libc/machine/powerpc/fix64.h: Fix typo for _simdldcheck
+        prototype.
+        * libc/machine/powerpc/simdldtoa.c: Remove prototype for
+        _simdldcheck().  Also add unsigned cast for index variable in
+        for loop using sizeof operators.
+        * libc/machine/powerpc/strtoufix32.c: Remove unused variable.
+        * libc/machine/powerpc/strtosfix64.c: Fix call to _simdldcheck.
+        * libc/machine/powerpc/strtoufix64.c (_strtoufix64_r): Ditto
+        plus fix shift calculation for determining if there is a
+        carry from word2.
+
 2003-09-09  Corinna Vinschen  <corinna@vinschen.de>
 
        * libc/include/grp.h: Don't define setgrfile, group_from_gid and
index 3423d3d..ce94820 100644 (file)
@@ -33,7 +33,7 @@ union long_double_union
 typedef union long_double_union LONG_DOUBLE_UNION;
 
 extern void _simdstrtold (char *, char **, LONG_DOUBLE_UNION *);
-extern int  _simdldchk (LONG_DOUBLE_UNION *);
+extern int  _simdldcheck (LONG_DOUBLE_UNION *);
 
 #define SIMD_LDBL_MANT_DIG 113
 
index 71ff121..9a90e64 100644 (file)
@@ -16,7 +16,6 @@
 /* linux name:  long double _IO_strtold (char *, char **); */
 void _simdstrtold (char *, char **, LONG_DOUBLE_UNION *);
 char * _simdldtoa_r (struct _reent *, LONG_DOUBLE_UNION *, int, int, int *, int *, char **);
-int    _simdldcheck (LONG_DOUBLE_UNION *);
 
  /* Number of 16 bit words in external x type format */
  #define NE 10
@@ -2752,7 +2751,7 @@ if( mode == 0 )
 /* we want to have enough space to hold the formatted result */
 i = ndigits + (mode == 3 ? (MAX_EXP_DIGITS + 1) : 1);
 j = sizeof (__ULong);
-for (_REENT_MP_RESULT_K(ptr) = 0; sizeof (_Bigint) - sizeof (__ULong) + j <= i; j <<= 1)
+for (_REENT_MP_RESULT_K(ptr) = 0; sizeof (_Bigint) - sizeof (__ULong) + j <= (unsigned)i; j <<= 1)
   _REENT_MP_RESULT_K(ptr)++;
 _REENT_MP_RESULT(ptr) = Balloc (ptr, _REENT_MP_RESULT_K(ptr));
 outstr = (char *)_REENT_MP_RESULT(ptr);
index 09999c1..3006632 100644 (file)
@@ -28,7 +28,7 @@ _DEFUN (_strtosfix64_r, (rptr, nptr, endptr),
   _simdstrtold ((char *)nptr, endptr, &ldbl);
 
   /* treat NAN as domain error, +/- infinity as saturation */
-  ld_type = _simdldcheck (&ldbl.ld);
+  ld_type = _simdldcheck (&ldbl);
   if (ld_type != 0)
     {
       if (ld_type == 1)
index 25e9d14..6a8e081 100644 (file)
@@ -19,7 +19,7 @@ _DEFUN (_strtoufix32_r, (rptr, nptr, endptr),
        char **endptr)
 {
   union double_union dbl;
-  int exp, negexp, sign;
+  int exp, negexp;
   __uint32_t tmp, tmp2, result = 0;
 
   dbl.d = _strtod_r (rptr, nptr, endptr);
index 47a7984..539f953 100644 (file)
@@ -27,7 +27,7 @@ _DEFUN (_strtoufix64_r, (rptr, nptr, endptr),
   _simdstrtold ((char *)nptr, endptr, &ldbl);
 
   /* treat NAN as domain error, +/- infinity as saturation */
-  ld_type = _simdldcheck (&ldbl.ld);
+  ld_type = _simdldcheck (&ldbl);
   if (ld_type != 0)
     {
       if (ld_type == 1)
@@ -86,7 +86,7 @@ _DEFUN (_strtoufix64_r, (rptr, nptr, endptr),
     {
       if (Ebits < 32)
        {
-         result = tmp + ((word2(ldbl) & (1 << (64 - Ebits - 1))) != 0);
+         result = tmp + ((word2(ldbl) & (1 << (32 - Ebits - 1))) != 0);
          /* if rounding causes carry, then saturation has occurred */
          if (result < tmp)
            {