This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch installed for warning regression fp-bit.h prototype
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 03 Mar 2003 01:22:33 -0300
- Subject: Re: Patch installed for warning regression fp-bit.h prototype
- Organization: GCC Team, Red Hat
- References: <200303021315.IAA07229@caip.rutgers.edu>
On Mar 2, 2003, "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu> wrote:
> This patch fixes a warning regression introduced a few weeks ago.
>> tp-bit.c:1394: warning: no previous prototype for `__fixunstfsi'
>> tp-bit.c:1394: warning: no previous prototype for `__fixunstfsi'
> Tested on mips-sgi-irix6.5 and installed as obvious on trunk and 3.3.
When you told me in private you'd tested the patches without
regressions, did you test the patch below as well? Is this ok to
install?
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva at redhat dot com>
* config/fp-bit.c (unpack_d): Handle pair of doubles with
different signs correctly.
Index: gcc/config/fp-bit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/fp-bit.c,v
retrieving revision 1.39
diff -u -p -r1.39 fp-bit.c
--- gcc/config/fp-bit.c 26 Jan 2003 10:06:57 -0000 1.39
+++ gcc/config/fp-bit.c 3 Mar 2003 04:20:27 -0000
@@ -455,6 +455,7 @@ unpack_d (FLO_union_type * src, fp_numbe
if (exp != EXPMAX && exp != 0 && low != 0)
{
int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
+ int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
int shift;
fractype xlow;
@@ -468,7 +469,10 @@ unpack_d (FLO_union_type * src, fp_numbe
xlow <<= shift;
else if (shift < 0)
xlow >>= -shift;
- fraction += xlow;
+ if (sign == lowsign)
+ fraction += xlow;
+ else
+ fraction -= xlow;
}
}
# else
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist Professional serial bug killer