This is the mail archive of the gcc@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: Identify IEE


On Thu, Jul 3, 2014 at 9:14 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Wed, Jul 2, 2014 at 11:13 PM, FX <fxcoudert@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.


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