> +/* Get the frm mode with given CONST_INT rtx, the default mode is
> +   FRM_DYN.  */
> +enum floating_point_rounding_mode
> +get_frm_mode (rtx operand)
> +{
> +  gcc_assert (CONST_INT_P (operand));
> +
> +  switch (INTVAL (operand))
> +    {
> +    case FRM_RNE:
> +      return FRM_RNE;
> +    case FRM_RTZ:
> +      return FRM_RTZ;
> +    case FRM_RDN:
> +      return FRM_RDN;
> +    case FRM_RUP:
> +      return FRM_RUP;
> +    case FRM_RMM:
> +      return FRM_RMM;
> +    case FRM_DYN:
> +      return FRM_DYN;
> +    default:
> +      return FRM_DYN;

Should we put a gcc_unreachable or gcc_assert here? I am not sure if
another value is valid when it appeared for this operand?

> +    }
> +
> +  gcc_unreachable ();
> +}

Reply via email to