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] IEEE intrinsic modules (ping)


Hello!

>> The only thing I can see is that libgfortran/config/fpu-sysv.h assumes that
>> FP_RM and others are macros, checking them with "#ifdef FP_RMâ. Is that the
>> reason?
>
> It is.
>
>> If so, we might just want to use them unconditionallyâ unless it creates a
>> mess on some other SysV target!
>
> FWIW, those FP_* values are also enum values in IRIX 6.5 <ieeefp.h>, the
> only other SysV target I have around.  Seems this file is common between
> all of them, so the risk should be manageable.

@@ -401,33 +381,13 @@ support_fpu_rounding_mode (int mode)
   switch (mode)
     {
       case GFC_FPE_TONEAREST:
-#ifdef FP_RN
  return 1;
-#else
- return 0;
-#endif
-
       case GFC_FPE_UPWARD:
-#ifdef FP_RP
  return 1;
-#else
- return 0;
-#endif
-
       case GFC_FPE_DOWNWARD:
-#ifdef FP_RM
  return 1;
-#else
- return 0;
-#endif
-
       case GFC_FPE_TOWARDZERO:
-#ifdef FP_RZ
  return 1;
-#else
- return 0;
-#endif
-
       default:
  return 0;

Since all modes are supported, you can unconditionally return 1 in the
code above, as is the case with fpu-387.h.

Uros.


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