This is the mail archive of the gcc-patches@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: [fortran,patch] Support for IEEE underflow control on x86/x86_64


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.


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