[Patch 8/17] Make _Float16 available if HFmode is available

gcc/

	* targhooks.c (default_floatn_mode): Enable _Float16 if a target
	provides HFmode.

From-SVN: r242778
This commit is contained in:
James Greenhalgh 2016-11-23 17:25:41 +00:00 committed by James Greenhalgh
parent 8f23c89a5f
commit 3479b7af5e
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
* targhooks.c (default_floatn_mode): Enable _Float16 if a target
provides HFmode.
2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
* config/s390/s390.h (TARGET_FLT_EVAL_METHOD): Delete.

View File

@ -514,10 +514,12 @@ default_floatn_mode (int n, bool extended)
switch (n)
{
case 16:
/* We do not use HFmode for _Float16 by default because the
required excess precision support is not present and the
interactions with promotion of the older __fp16 need to
be worked out. */
/* Always enable _Float16 if we have basic support for the mode.
Targets can control the range and precision of operations on
the _Float16 type using TARGET_C_EXCESS_PRECISION. */
#ifdef HAVE_HFmode
cand = HFmode;
#endif
break;
case 32: