This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Another 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:56:02 +0200
- Subject: 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