From: Joseph Myers <joseph@codesourcery.com>
To: Michael Meissner <meissner@linux.vnet.ibm.com>
Cc: <gcc-patches@gcc.gnu.org>, <fortran@gcc.gnu.org>,
<jason@redhat.com>, <richard.earnshaw@arm.com>,
<nickc@redhat.com>, <ramana.radhakrishnan@arm.com>,
<marcus.shawcroft@arm.com>, <dje.gcc@gmail.com>,
<segher@kernel.crashing.org>, <murphyp@linux.vnet.ibm.com>,
<bje@gnu.org>
Subject: Re: Implement C _FloatN, _FloatNx types
Date: Fri, 05 Aug 2016 00:35:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.20.1608050014220.17258@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20160805000934.GA21406@ibm-tiger.the-meissners.org>
On Thu, 4 Aug 2016, Michael Meissner wrote:
> It brings up a general complaint that I had when I started the whole PowerPC
> __float128 adventure is that we have multiple places in the compiler it goes
> through a list of floating point types, and only for the blessed types does it
> do something. If a port happens to have a non-standard type, there really
> should be target hooks for doing each of the actions.
Note that not all the types / modes are necessarily suitable for all those
places. Consider IA64 RFmode (__fpreg), for example. And some things
such as <float.h> macros aren't defined for nonstandard types.
> But rather than having lots of different hooks, it may be better to have a hash
> lookup given a type node (and/or mode) that registers all of the handling in a
> central place, rather than continually having:
In various places you need to get the right ordering of types, and to
distinguish types for the same mode (e.g. usual arithmetic conversions
have a specified ordering); it's not just a lookup table.
This patch is explicitly not trying to improve anything for types that are
*not* _FloatN / _FloatNx (such as __fp16, or __fpreg). For the _FloatN
and _FloatNx types it tries to use the various macros for looping over
those types as far as possible, not hardcoding a list of them in too many
places.
It is also explicitly aiming to get support for _FloatN / _FloatNx to a
minimal functional state (conforming to the TS semantics, to the extent
that the underlying arithmetic for the relevant machine modes does, and
apart from the corner case of treating _FloatN as a keyword for arbitrary
N >= 128 and a multiple of 32) that can be incrementally improved, rather
than to make it fully equivalent to that for float, double and long double
(which runs into issues with adding hundreds of new built-in functions,
among other things) - that is, to be the smallest version of support for
these types that would be appropriate for GCC, not the maximal version, in
accordance with the principle of submitting minimal indivisible patches.
The list of things not done in the notes for this patch is intended to be
exhaustive as a list of potential future improvements for bringing these
types to full parity with float, double and long double.
--
Joseph S. Myers
joseph@codesourcery.com
prev parent reply other threads:[~2016-08-05 0:35 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 12:07 Joseph Myers
2016-06-21 15:17 ` FX
2016-06-21 15:38 ` Joseph Myers
2016-06-21 15:21 ` Bill Schmidt
2016-06-21 15:43 ` Joseph Myers
2016-06-21 17:42 ` Implement C _FloatN, _FloatNx types [version 2] Joseph Myers
2016-06-21 20:53 ` Michael Meissner
2016-06-21 21:18 ` Joseph Myers
2016-06-22 20:43 ` Joseph Myers
2016-06-22 21:45 ` FX
2016-06-23 14:20 ` Implement C _FloatN, _FloatNx types [version 3] Joseph Myers
2016-06-27 17:22 ` Ping " Joseph Myers
2016-06-27 21:01 ` Bill Schmidt
2016-06-27 21:23 ` Joseph Myers
2016-06-27 21:35 ` Segher Boessenkool
2016-07-19 13:54 ` Implement C _FloatN, _FloatNx types [version 4] Joseph Myers
2016-07-22 21:59 ` Implement C _FloatN, _FloatNx types [version 5] Joseph Myers
2016-07-29 17:37 ` Ping " Joseph Myers
2016-07-29 22:09 ` Michael Meissner
2016-08-04 23:54 ` Michael Meissner
2016-08-05 0:12 ` Joseph Myers
2016-08-10 11:33 ` Ping^2 " Joseph Myers
2016-08-10 17:14 ` Paul Richard Thomas
2016-08-11 7:05 ` FX
2016-08-15 22:21 ` Ping^3 " Joseph Myers
2016-08-17 15:43 ` James Greenhalgh
2016-08-17 16:44 ` Joseph Myers
2016-08-17 20:17 ` Implement C _FloatN, _FloatNx types [version 6] Joseph Myers
[not found] ` <CAFiYyc3xqcqJ1rK2X0rC+wwpx3akHbULVG1G47PRmtk4wTk=7A@mail.gmail.com>
2016-08-19 11:06 ` Joseph Myers
2016-08-19 11:11 ` Richard Biener
2016-08-19 14:40 ` Joseph Myers
2016-08-19 15:52 ` David Malcolm
2016-08-19 16:51 ` Joseph Myers
2016-08-19 17:21 ` David Malcolm
2016-08-19 15:28 ` Szabolcs Nagy
2016-08-19 16:24 ` Joseph Myers
2016-08-31 16:58 ` James Greenhalgh
2016-08-31 17:26 ` Joseph Myers
2016-09-01 10:52 ` Szabolcs Nagy
2016-09-01 15:40 ` Joseph Myers
2016-08-21 9:50 ` Andreas Schwab
2016-08-22 10:46 ` Joseph Myers
2016-08-22 8:09 ` [BUILDROBOT] x86_64: Segmentation fault during -fself-test (was: " Jan-Benedict Glaw
2016-08-22 11:23 ` Joseph Myers
2016-08-22 10:48 ` Matthew Wahab
2016-08-22 11:48 ` Joseph Myers
2016-09-03 16:34 ` Andreas Schwab
2016-08-05 0:09 ` Implement C _FloatN, _FloatNx types Michael Meissner
2016-08-05 0:35 ` Joseph Myers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1608050014220.17258@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=bje@gnu.org \
--cc=dje.gcc@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=marcus.shawcroft@arm.com \
--cc=meissner@linux.vnet.ibm.com \
--cc=murphyp@linux.vnet.ibm.com \
--cc=nickc@redhat.com \
--cc=ramana.radhakrishnan@arm.com \
--cc=richard.earnshaw@arm.com \
--cc=segher@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).