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:14:22 +0200
- Subject: Re: Identify IEE
- Authentication-results: sourceware.org; auth=none
- References: <4ACBAD61-A346-46EE-9387-266D5B378A56 at gmail dot com>
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.
[1] https://gcc.gnu.org/ml/gcc-patches/2008-08/msg00645.html
Uros.