This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Identify IEE
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>, Fortran List <fortran at gcc dot gnu dot org>
- Date: Thu, 3 Jul 2014 09:20:27 +0200
- Subject: Re: Identify IEE
- Authentication-results: sourceware.org; auth=none
- References: <4ACBAD61-A346-46EE-9387-266D5B378A56 at gmail dot com> <CAFULd4Y-eHeiZ4UhO5=Eh_2CUj=NtZy54EJut1wnEwOhG7hxsA at mail dot gmail dot com>
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.