This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH], PowerPC IEEE 128-bit fp, #11-rev2 (enable libgcc conversions)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, <dje dot gcc at gmail dot com>, Steven Munroe <munroesj at linux dot vnet dot ibm dot com>, Tulio Magno Quites Machado Filho <tulioqm at br dot ibm dot com>
- Date: Thu, 7 Jan 2016 21:54:49 +0000
- Subject: Re: [PATCH], PowerPC IEEE 128-bit fp, #11-rev2 (enable libgcc conversions)
- Authentication-results: sourceware.org; auth=none
- References: <20151229163800 dot GA29976 at ibm-tiger dot the-meissners dot org> <20160106224754 dot GA1627 at ibm-tiger dot the-meissners dot org>
On Wed, 6 Jan 2016, Michael Meissner wrote:
> 5) I put the exception handling code under #ifndef _SOFT_FLOAT control so
> that the 32-bit PowerPC machines that don't have hardware floating
> point will not use this code (the exception handling uses hardware
> instructions to cause a particular fault).
I think this needs to be __NO_FPRS__ instead of _SOFT_FLOAT (since soft-fp
is also built for e500).
Other than that my only comments on this version are some formatting /
coding style comments:
> Index: libgcc/config/rs6000/sfp-exceptions.c
> ===================================================================
> --- libgcc/config/rs6000/sfp-exceptions.c (.../svn+ssh://meissner@gcc.gnu.org/svn/gcc/trunk/libgcc) (revision 0)
> +++ libgcc/config/rs6000/sfp-exceptions.c (.../libgcc) (revision 232096)
> @@ -0,0 +1,74 @@
> +/*
> + * Copyright (C) 2016 Free Software Foundation, Inc.
> + *
Normally we don't use the '*' at the start of each comment line.
> +TFtype
> +__floatsikf_hw (SItype_ppc a)
> +{
> + return (TFtype)a;
Casts should have a space, "(TFtype) a". Many more cases in this file.
> +/* __unordkf2 returns 1 if Nan or 0 otherwise. */
NaN.
> + __low = (double) (__value - (__float128)__high); \
Again, space in cast.
> + /* now renormalized move the high/low into canonical IBM long \
> + double form. */ \
Comments start with a capital letter.
> + /* Handle the special cases of NAN and inifinity. */ \
"infinity".
> + RESULT = ((__float128)__high) + ((__float128)__low); \
Spaces in casts.
--
Joseph S. Myers
joseph@codesourcery.com