Another patch for Granlund's soft-fp lib

Hartmut Schirmer hartmut.schirmer@arcor.de
Mon Jun 30 16:04:00 GMT 2003


Hi,

Torbjorn Granlund  published a soft-fp lib for GCC in 1999
(see http://gcc.gnu.org/ml/gcc/1999-07n/msg00553.html)

Doing df -> sf conversions with df!=0.0 and sf == 0.0 
the sign bit is lost.

The patch below fixes this problem.

Hartmut

*** gieee/ieeecvt.c Tue Nov 24 20:11:22 1998
--- ieeecvt.c Thu Mar 27 16:13:01 2003
***************
*** 227,234 ****
     int d = -(e + S_EXP_BIAS) + 1;
     if (d >= INTEGER_TYPE_BITS)
       {
!        /* Generate 0.  */
!        ue = 0;
         umh = 0;
       }
     else
--- 227,234 ----
     int d = -(e + S_EXP_BIAS) + 1;
     if (d >= INTEGER_TYPE_BITS)
       {
!        /* Generate +-0.0  */
!        ue = (ue & ~B_EXP_MASK) >> (B_EXP_BITS - S_EXP_BITS);
         umh = 0;
       }
     else




More information about the Gcc mailing list