FIXED_VALUE_TYPE fixed_from_double_int (double_int payload, machine_mode mode) { FIXED_VALUE_TYPE value; gcc_assert (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_DOUBLE_INT); if (SIGNED_SCALAR_FIXED_POINT_MODE_P (mode)) value.data = payload.sext (1 + GET_MODE_IBIT (mode) + GET_MODE_FBIT (mode)); else if (UNSIGNED_SCALAR_FIXED_POINT_MODE_P (mode)) value.data = payload.zext (GET_MODE_IBIT (mode) + GET_MODE_FBIT (mode)); else gcc_unreachable (); value.mode = mode; return value; }
double_int double_int_ext_for_comb (double_int cst, aff_tree *comb) { return cst.sext (TYPE_PRECISION (comb->type)); }