This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Patch for Granlund's soft-fp lib
- From: "Hartmut Schirmer" <hartmut dot schirmer at arcor dot de>
- To: <gcc at gcc dot gnu dot org>
- Date: Mon, 30 Jun 2003 16:57:53 +0200
- Subject: 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)