From: Joseph Myers <joseph@codesourcery.com>
To: Szabolcs Nagy <szabolcs.nagy@arm.com>
Cc: James Greenhalgh <james.greenhalgh@arm.com>, <nd@arm.com>,
<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>, <meissner@linux.vnet.ibm.com>,
<murphyp@linux.vnet.ibm.com>
Subject: Re: Implement C _FloatN, _FloatNx types [version 6]
Date: Fri, 19 Aug 2016 16:24:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.20.1608191617480.6408@digraph.polyomino.org.uk> (raw)
In-Reply-To: <57B72592.5060509@arm.com>
On Fri, 19 Aug 2016, Szabolcs Nagy wrote:
> On 17/08/16 21:17, Joseph Myers wrote:
> > Although there is HFmode support for ARM and AArch64, use of that for
> > _Float16 is not enabled. Supporting _Float16 would require additional
> > work on the excess precision aspects of TS 18661-3: there are new
> > values of FLT_EVAL_METHOD, which are not currently supported in GCC,
> > and FLT_EVAL_METHOD == 0 now means that operations and constants on
> > types narrower than float are evaluated to the range and precision of
> > float. Implementing that, so that _Float16 gets evaluated with excess
> > range and precision, would involve changes to the excess precision
> > infrastructure so that the _Float16 case is enabled by default, unlike
> > the x87 case which is only enabled for -fexcess-precision=standard.
> > Other differences between _Float16 and __fp16 would also need to be
> > disentangled.
>
> i wonder how gcc can support _Float16 without excess
> precision.
>
> using FLT_EVAL_METHOD==16 can break conforming c99/c11
> code which only expects 0,1,2 values to appear (and does
> not use _Float16 at all), but it seems to be the better
> fit for hardware with half precision instructions.
Maybe this indicates that -fexcess-precision=standard, whether explicit or
implies by a -std option, must cause FLT_EVAL_METHOD=0 for such hardware,
and some new -fexcess-precision= option is needed to select
FLT_EVAL_METHOD=16 (say -fexcess-precision=16, with no expectation that
most numeric -fexcess-precision= arguments are supported except where a
target hook says they are or where they are the default FLT_EVAL_METHOD
value). Then -std=c2x, if C2X integrates TS 18661-3, might not imply the
value 0 for such hardware, because the value 16 would also be OK as a
standard value in that case. This can be part of the design issues to
address alongside those I mentioned in
<https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01899.html>.
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2016-08-19 16:24 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 12:07 Implement C _FloatN, _FloatNx types 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 [this message]
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
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.1608191617480.6408@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=dje.gcc@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=james.greenhalgh@arm.com \
--cc=jason@redhat.com \
--cc=marcus.shawcroft@arm.com \
--cc=meissner@linux.vnet.ibm.com \
--cc=murphyp@linux.vnet.ibm.com \
--cc=nd@arm.com \
--cc=nickc@redhat.com \
--cc=ramana.radhakrishnan@arm.com \
--cc=richard.earnshaw@arm.com \
--cc=segher@kernel.crashing.org \
--cc=szabolcs.nagy@arm.com \
/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).