mirror of git://gcc.gnu.org/git/gcc.git
fpu-*.h (get_fpu_rounding_mode, [...]): Clean up, mark unreachable code as such.
* config/fpu-*.h (get_fpu_rounding_mode, set_fpu_rounding_mode, support_fpu_rounding_mode): Clean up, mark unreachable code as such. From-SVN: r212423
This commit is contained in:
parent
64d57736e1
commit
56710419ba
|
|
@ -1,3 +1,8 @@
|
||||||
|
2014-07-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||||
|
|
||||||
|
* config/fpu-*.h (get_fpu_rounding_mode, set_fpu_rounding_mode,
|
||||||
|
support_fpu_rounding_mode): Clean up, mark unreachable code as such.
|
||||||
|
|
||||||
2014-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
2014-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||||
|
|
||||||
* libgfortran.h (support_fpu_underflow_control,
|
* libgfortran.h (support_fpu_underflow_control,
|
||||||
|
|
|
||||||
|
|
@ -421,7 +421,7 @@ get_fpu_rounding_mode (void)
|
||||||
case _FPU_RC_ZERO:
|
case _FPU_RC_ZERO:
|
||||||
return GFC_FPE_TOWARDZERO;
|
return GFC_FPE_TOWARDZERO;
|
||||||
default:
|
default:
|
||||||
return GFC_FPE_INVALID; /* Should be unreachable. */
|
return 0; /* Should be unreachable. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -291,8 +291,6 @@ support_fpu_flag (int flag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
get_fpu_rounding_mode (void)
|
get_fpu_rounding_mode (void)
|
||||||
{
|
{
|
||||||
|
|
@ -321,8 +319,9 @@ get_fpu_rounding_mode (void)
|
||||||
case FE_TOWARDZERO:
|
case FE_TOWARDZERO:
|
||||||
return GFC_FPE_TOWARDZERO;
|
return GFC_FPE_TOWARDZERO;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return GFC_FPE_INVALID;
|
return 0; /* Should be unreachable. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -357,8 +356,9 @@ set_fpu_rounding_mode (int mode)
|
||||||
rnd_mode = FE_TOWARDZERO;
|
rnd_mode = FE_TOWARDZERO;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return; /* Should be unreachable. */
|
||||||
}
|
}
|
||||||
|
|
||||||
fesetround (rnd_mode);
|
fesetround (rnd_mode);
|
||||||
|
|
@ -399,7 +399,7 @@ support_fpu_rounding_mode (int mode)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0; /* Should be unreachable. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -333,8 +333,9 @@ get_fpu_rounding_mode (void)
|
||||||
case FE_TOWARDZERO:
|
case FE_TOWARDZERO:
|
||||||
return GFC_FPE_TOWARDZERO;
|
return GFC_FPE_TOWARDZERO;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return GFC_FPE_INVALID;
|
return 0; /* Should be unreachable. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -369,8 +370,9 @@ set_fpu_rounding_mode (int mode)
|
||||||
rnd_mode = FE_TOWARDZERO;
|
rnd_mode = FE_TOWARDZERO;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return; /* Should be unreachable. */
|
||||||
}
|
}
|
||||||
|
|
||||||
fesetround (rnd_mode);
|
fesetround (rnd_mode);
|
||||||
|
|
@ -411,7 +413,7 @@ support_fpu_rounding_mode (int mode)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0; /* Should be unreachable. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,7 @@ get_fpu_rounding_mode (void)
|
||||||
case FP_RZ:
|
case FP_RZ:
|
||||||
return GFC_FPE_TOWARDZERO;
|
return GFC_FPE_TOWARDZERO;
|
||||||
default:
|
default:
|
||||||
return GFC_FPE_INVALID;
|
return 0; /* Should be unreachable. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -367,28 +367,16 @@ set_fpu_rounding_mode (int mode)
|
||||||
rnd_mode = FP_RZ;
|
rnd_mode = FP_RZ;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return; /* Should be unreachable. */
|
||||||
}
|
}
|
||||||
fpsetround (rnd_mode);
|
fpsetround (rnd_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
support_fpu_rounding_mode (int mode)
|
support_fpu_rounding_mode (int mode __attribute__((unused)))
|
||||||
{
|
{
|
||||||
switch (mode)
|
return 1;
|
||||||
{
|
|
||||||
case GFC_FPE_TONEAREST:
|
|
||||||
return 1;
|
|
||||||
case GFC_FPE_UPWARD:
|
|
||||||
return 1;
|
|
||||||
case GFC_FPE_DOWNWARD:
|
|
||||||
return 1;
|
|
||||||
case GFC_FPE_TOWARDZERO:
|
|
||||||
return 1;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue