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]

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)

There's a bug in the float comparison routines.
The patch below fixes this problem.

Hartmut

*** gieee/ieeelib.c Thu Mar 27 10:21:35 2003
--- ieeelib.c Mon Jun 30 12:41:16 2003
***************
*** 116,122 ****
    do {         \
      union real_extract_1 di;      \
      di.d = (dbl);       \
!     (exp) = ((di.u >> (MANTISSA_BITS - 1)) & EXP_MASK) ^ (di.u >>
SIGN_POS); \
      (m) = (di.u & (((COMPUTE_TYPE) 1 << (MANTISSA_BITS - 1)) - 1)) <<
EXP_BITS; \
    } while (0)

--- 131,137 ----
    do {         \
      union real_extract_1 di;      \
      di.d = (dbl);       \
!     (exp) = ((di.u >> (MANTISSA_BITS - 1)) & EXP_MASK) ^
((COMPUTE_STYPE)di.u >> SIGN_POS); \
      (m) = (di.u & (((COMPUTE_TYPE) 1 << (MANTISSA_BITS - 1)) - 1)) <<
EXP_BITS; \
    } while (0)





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