This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] ARM half-precision floating point, 5/8 (detect constant overflow)
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Thu, 16 Apr 2009 10:18:35 +0200
- Subject: Re: [PATCH] ARM half-precision floating point, 5/8 (detect constant overflow)
- References: <49E65E6F.4040303@codesourcery.com>
On Thu, Apr 16, 2009 at 12:23 AM, Sandra Loosemore
<sandra@codesourcery.com> wrote:
> This patch adds some logic to detect overflow on compile-time
> constant conversions between floating-point formats. ?There's nothing
> specific to half-precision here, but the main thing it's intended to
> catch is overflows in conversions to formats that can't represent
> infinities -- specifically, the ARM alternative half-precision
> representation.
Can you test this on another architecture which lacks support
for NaNs or Infs? I seem to remember that the Cell SPU at
least lacks them for floats(?).
How does the C frontend react to TREE_OVERFLOW set on
constant initializers (which we are allowed to accept?).
If Joseph thinks this is ok the patch is ok if it passes
bootstrap / testing on another target with lacking NaN/Inf support.
Thanks,
Richard.
> -Sandra
>
>
> 2009-04-15 ?Sandra Loosemore ?<sandra@codesourcery.com>
>
> ? ? ? ?gcc/
> ? ? ? ?* fold-const.c (fold_convert_const_real_from_real): Check for
> ? ? ? ?overflow.
>
>