This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ARM half-precision floating point, 3/8 (target hooks)


> The convert_to_type hook implements the peculiarity of the ARM C binding 
> that conversions from double to __fp16 go via float, and so is needed to 
> ensure that the same double rounding applies whether or not a conversion 
> is folded at compile time.

For the record, I checked what the OpenCL standard says about
half-precision floating-points and the double rounding applies there
too, as does the forbidding of arguments and return types.

The default conversion does not apply, because it is not even legal to
dereference a pointer to half-precision floating-point values.

This is not implying any judgement on the opportunity to implement the
target hooks or not; OpenCL defines a different dialect of C altogether,
 so I'm now convinced that target hooks should stay until more targets
implement the half-precision floats.

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]