On Thu, Jul 3, 2014 at 9:14 AM, Uros Bizjak <ubiz...@gmail.com> wrote:
> On Wed, Jul 2, 2014 at 11:13 PM, FX <fxcoud...@gmail.com> wrote:
>> I’ve recently added IEEE support for the Fortran front-end and library. As 
>> part of that, the front-end should be able to determine which of the 
>> available floating-point types are IEEE-conforming [1]. Right now, I’ve 
>> taken a conservative approach and only considered the target’s 
>> float_type_node and double_type_node as IEEE modes, but I’d like to improve 
>> that (for example, to include long double and binary128 modes on x86).
>>
>> How can I determine, from a “struct real_format”, whether it is an IEEE 
>> format or not? I’ve looked through gcc/real.{h,c} but could find no clear 
>> solution. If there is none, would it be okay to add a new bool field to the 
>> structure, named “ieee” or “ieee_format”, to discriminate?
>
> The TARGET_FLOAT_FORMAT macro was removed here [1], and it is expected
> that HONOR_* macros are used instead.
>
> Perhaps the easiest way is to use
> TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P target hook. Maybe you
> need to extend it to pass a mode to this hook. This way, target will
> be able to signal if the mode is supported in the most flexible way.

Maybe a new hook should be introduced instead: TARGET_IEEE_FORMAT_P
(mode). For some targets, even soft-fp supports required rounding
modes and can generate exceptions.

Uros.

Reply via email to