Implement C _FloatN, _FloatNx types [version 6]

Szabolcs Nagy szabolcs.nagy@arm.com
Fri Aug 19 15:28:00 GMT 2016


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.



More information about the Gcc-patches mailing list