On 31 May 2013 23:18, Richard Henderson <r...@twiddle.net> wrote: > On 05/30/2013 02:16 PM, Paolo Bonzini wrote: >> +static inline Int128 int128_rshift(Int128 a, int n) >> +{ >> + return (Int128) { (a.lo >> n) | (a.hi << (64 - n)), (a.hi >> n) }; >> +} > > Produces wrong results for n == 0, since (a.hi << 64) is undefined.
It produces wrong results for shifts by more than 64, for that matter. thanks -- PMM