Re: [Qemu-devel] [PATCH v2 2/6] bitops: fix rol/ror when shift is zero

2016-10-29 Thread Nikunj A Dadhania
David Gibson writes: > [ Unknown signature status ] > On Wed, Oct 26, 2016 at 08:20:10AM -0700, Richard Henderson wrote: >> On 10/25/2016 11:26 PM, Nikunj A Dadhania wrote: >> > All the variants for rol/ror have a bug in case where the shift == 0. >> > For example rol32, would generate: >> > >>

Re: [Qemu-devel] [PATCH v2 2/6] bitops: fix rol/ror when shift is zero

2016-10-26 Thread David Gibson
On Wed, Oct 26, 2016 at 08:20:10AM -0700, Richard Henderson wrote: > On 10/25/2016 11:26 PM, Nikunj A Dadhania wrote: > > All the variants for rol/ror have a bug in case where the shift == 0. > > For example rol32, would generate: > > > > return (word << 0) | (word >> 32); > > > > Which thoug

Re: [Qemu-devel] [PATCH v2 2/6] bitops: fix rol/ror when shift is zero

2016-10-26 Thread Richard Henderson
On 10/25/2016 11:26 PM, Nikunj A Dadhania wrote: > All the variants for rol/ror have a bug in case where the shift == 0. > For example rol32, would generate: > > return (word << 0) | (word >> 32); > > Which though works, would be flagged as a runtime error on clang's > sanitizer. > > Suggest

[Qemu-devel] [PATCH v2 2/6] bitops: fix rol/ror when shift is zero

2016-10-25 Thread Nikunj A Dadhania
All the variants for rol/ror have a bug in case where the shift == 0. For example rol32, would generate: return (word << 0) | (word >> 32); Which though works, would be flagged as a runtime error on clang's sanitizer. Suggested-by: Richard Henderson Signed-off-by: Nikunj A Dadhania --- in