From: Rainer Orth Date: Tue, 8 Jul 2014 09:08:49 +0000 (+0000) Subject: Use FP_RN etc. unconditionally X-Git-Tag: releases/gcc-5.1.0~6460 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f7563747e2b4f42f73c879d2783db16b534fcff;p=thirdparty%2Fgcc.git Use FP_RN etc. unconditionally * config/fpu-sysv.h (get_fpu_rounding_mode): Use FP_RN, FP_RP, FP_RM, FP_RZ unconditionally. (set_fpu_rounding_mode): Likewise. From-SVN: r212350 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 773778ab2569..e57f34e711da 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2014-07-08 Rainer Orth + + * config/fpu-sysv.h (get_fpu_rounding_mode): Use FP_RN, FP_RP, + FP_RM, FP_RZ unconditionally. + (set_fpu_rounding_mode): Likewise. + 2014-07-07 Francois-Xavier Coudert * libgfortran.h: Assume __GNUC__. diff --git a/libgfortran/config/fpu-sysv.h b/libgfortran/config/fpu-sysv.h index 97eed2833c68..559e3f343481 100644 --- a/libgfortran/config/fpu-sysv.h +++ b/libgfortran/config/fpu-sysv.h @@ -333,25 +333,14 @@ get_fpu_rounding_mode (void) { switch (fpgetround ()) { -#ifdef FP_RN case FP_RN: return GFC_FPE_TONEAREST; -#endif - -#ifdef FP_RP case FP_RP: return GFC_FPE_UPWARD; -#endif - -#ifdef FP_RM case FP_RM: return GFC_FPE_DOWNWARD; -#endif - -#ifdef FP_RZ case FP_RZ: return GFC_FPE_TOWARDZERO; -#endif default: return GFC_FPE_INVALID; } @@ -365,29 +354,18 @@ set_fpu_rounding_mode (int mode) switch (mode) { -#ifdef FP_RN case GFC_FPE_TONEAREST: rnd_mode = FP_RN; break; -#endif - -#ifdef FP_RP case GFC_FPE_UPWARD: rnd_mode = FP_RP; break; -#endif - -#ifdef FP_RM case GFC_FPE_DOWNWARD: rnd_mode = FP_RM; break; -#endif - -#ifdef FP_RZ case GFC_FPE_TOWARDZERO: rnd_mode = FP_RZ; break; -#endif default: return; } @@ -401,33 +379,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; }