On Thu, Apr 29, 2021 at 05:50:03PM -0500, Segher Boessenkool wrote:
> Hi!
> 
> On Thu, Apr 29, 2021 at 05:48:53PM -0400, Michael Meissner wrote:
> > This patch defines the constants needed for libgcc for the PowerPC
> > specific IEEE 128-bit floating point types (KFmode).
> 
> It doesn't do that though?

Yes it does.  With this patch and if you use -fbuilding-libgcc, it defines:

__LIBGCC_KF_MAX__
__LIBGCC_KF_MIn__
__LIBGCC_KF_EPSILON__

That the new version of _divkc3.c uses.

> > The 4/28 changes to libgcc need these constants defined.
> 
> I wondered what that means...  Please write "April 28", or just use the
> (shortened) commit hash?

Ok.

> > We only define the KFmode constants if IEEE 128-bit floating point is
> > supported, but long double does not use the IEEE 128-bit format.  If long
> > double uses the IEEE 128-bit format, it will use TFmode and not KFmode.
> > 
> > With this patch, we don't have to modify _divkc3.c to use the FLT128
> > constants.  Instead, the -fbuilting-libgcc option will build the appropriate
> > __LIBGCC_KF_* macros.
> 
> That sounds good.
> 
> > gcc/
> > 2021-04-29  Michael Meissner  <meiss...@linux.ibm.com>
> > 
> >     PR bootstrap/100327
> >     * config/rs6000/rs6000.c
> >     (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define.
> 
> I don't see this used anywhere on trunk?  Did you forget some file(s) in
> the patch?

TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P is the name of the macro that defines
the targetm.libgcc_floating_mode_supported_p hook:

DEFHOOK
(libgcc_floating_mode_supported_p,
 "Define this to return nonzero if libgcc provides support for the \n\
floating-point mode @var{mode}, which is known to pass \n\
@code{TARGET_SCALAR_MODE_SUPPORTED_P}.  The default version of this \n\
hook returns true for all of @code{SFmode}, @code{DFmode}, \n\
@code{XFmode} and @code{TFmode}, if such modes exist.",
 bool, (scalar_float_mode mode),
 default_libgcc_floating_mode_supported_p)

It is used in:
gcc/c-family/c-cppbuiltin.c
gcc/fortran/trans-types.c


> Please lose the "_P", there is a verb in the name already.
> 
> The name isn't good (supported for _what_?  It is only for complex
> multiplication, right?)

I'm not sure what you are asking.  I'm defining a standard hook.  I don't have
a choice of the name to use.

> >     (rs6000_iibgcc_floating_mode_supported_p): New target hook.
> 
> Typo ("iib").
> 
> > +rs6000_libgccc_floating_mode_supported_p (scalar_float_mode mode)
> 
> Typo ("gccc").

Ok.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797

Reply via email to