This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Another patch for Granlund's soft-fp lib


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]