diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2014-07-08 09:08:49 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2014-07-08 09:08:49 +0000 |
commit | 7f7563747e2b4f42f73c879d2783db16b534fcff (patch) | |
tree | fa9a5d0a882551a5e25d985b532b92126a9f09b3 | |
parent | e8e938e0b0e92d28978d513e380be54640fdf94e (diff) | |
download | gcc-7f7563747e2b4f42f73c879d2783db16b534fcff.zip gcc-7f7563747e2b4f42f73c879d2783db16b534fcff.tar.gz gcc-7f7563747e2b4f42f73c879d2783db16b534fcff.tar.bz2 |
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
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/config/fpu-sysv.h | 42 |
2 files changed, 6 insertions, 42 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 773778a..e57f34e 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2014-07-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * 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 <fxcoudert@gcc.gnu.org> * libgfortran.h: Assume __GNUC__. diff --git a/libgfortran/config/fpu-sysv.h b/libgfortran/config/fpu-sysv.h index 97eed28..559e3f3 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; } |