Il 08/06/2012 20:13, Dinar Temirbulatov ha scritto:
> that I have to add convert_to_mode () to DImode after
> emit_store_flag_force (), since emit_store_flag_force () returns
> "carry" in SImode and without convert_to_mode () call compiler fails
> with this error:

Yes, that makes sense.  The new patch looks ok to me.  Just one
question, do you have proof that this:

> +      /* u00, u01, u10, u11 form a three-word value with the result
> +          in the top word, so we want to return this:
> +
> +            ((u11 << 2*BITS_PER_WORD) +
> +                     (u01 + u10 << BITS_PER_WORD) +
> +                            u00) >> 3 * BITS_PER_WORD
> +
> +          We then rewrite it this way:
> +
> +            (u11 + ((u01 + u10 + (u00 >> BITS_PER_WORD))
> +               >> BITS_PER_WORD) >> BITS_PER_WORD

is safe?  That is, that the underflows cannot produce a wrong result?

Paolo

Reply via email to