This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fortran,patch] Support for IEEE underflow control on x86/x86_64
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 4 Jul 2014 09:48:38 +0200
- Subject: Re: [fortran,patch] Support for IEEE underflow control on x86/x86_64
- Authentication-results: sourceware.org; auth=none
- References: <184DE738-2E8A-4310-A1FB-8BF351C2F88A at gmail dot com> <AA558767-059A-414F-8374-DE8EDAA7284B at gmail dot com> <CAFULd4aDuscQ6Qx1o27_uLrbYd3SB7kt2h-yMSsxQgypZ05A0Q at mail dot gmail dot com>
On Thu, Jul 3, 2014 at 3:02 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Thu, Jul 3, 2014 at 2:43 PM, FX <fxcoudert@gmail.com> wrote:
>> Hereâs an updated patch, providing support for underflow control in the IEEE_ARITHMETIC module, for x86/x86_64 targets and alpha-glibc.
>>
>> Bootstrapped and regtested on x86_64-apple-darwin13, tested by Uros on alpha.
>
> The testcase still needs:
>
> ! { dg-do run }
> ! { dg-require-effective-target sse2_runtime { target { i?86-*-*
> x86_64-*-* } } }
> ! { dg-additional-options "-msse2 -mfpmath=sse" { target { i?86-*-*
> x86_64-*-* } } }
I think that:
+ x = x / 2000._kx
+ if (x <= 0) call abort
+ call ieee_get_underflow_mode(l)
+ if (.not. l) call abort
+
+ x = tiny(x)
+ call ieee_set_underflow_mode(.false.)
+ x = x / 2000._kx
+ if (x > 0) call abort
you want to test for == 0 above and != 0 below, and in the same way for DFmode.
The x86 part of the patch is OK.
Uros.