[wide-int] Fix some division cases

2014-05-02 Thread Richard Sandiford
divmod_internal didn't handle unsigned division in which the inputs have implicit all-one upper bits. There were two problems: - wi_unpack should extend implicit 1s to index blocks_needed - 1 (possibly with a zext_hwi on the last block for small_prec) regardless of signedness - when

Re: [wide-int] Fix some division cases

2014-05-02 Thread Kenneth Zadeck
this is fine. On 05/02/2014 03:22 PM, Richard Sandiford wrote: divmod_internal didn't handle unsigned division in which the inputs have implicit all-one upper bits. There were two problems: - wi_unpack should extend implicit 1s to index blocks_needed - 1 (possibly with a zext_hwi on the