On Fri, Jan 19, 2018 at 6:56 AM, David Chisnall <thera...@freebsd.org> wrote: > In C, a right-shift of a signed type propagates the sign bit. Right shifting > a negative 32-bit int by 16 and then again by 16 is not undefined behaviour > (though doing the shift as a single operation is) and will give you a value > of -1.
The left hand operand under discussion is unsigned. In LLVM/assembler terms, this is a logical right shift, not an arithmetic right shift. It is by definition zero filled from the left. _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"