Re: test-bitrotate.c missing test cases

2020-03-31 Thread Jeffrey Walton
On Sun, Mar 29, 2020 at 11:40 AM Bruno Haible wrote: > > Jeffrey, > > > Forgive my ignorance... No'oping 0 leaks timing information > > There are only few algorithms where leaking timing information is an > issue. For most of the code we deal with, the developer wants to get > optimal

Re: test-bitrotate.c missing test cases

2020-03-29 Thread Bruno Haible
Jeffrey, > Forgive my ignorance... No'oping 0 leaks timing information There are only few algorithms where leaking timing information is an issue. For most of the code we deal with, the developer wants to get optimal performance. > I also don't think developers are going to write a rotate like:

Re: test-bitrotate.c missing test cases

2020-03-29 Thread Jeffrey Walton
On Sun, Mar 29, 2020 at 8:53 AM Bruno Haible wrote: > > Hi Jeffrey, > > > It looks like test-bitrotate.c is missing test cases. It is missing > > the 32-bit rotl and rotr of 0-bits. > > > > The 0-bit rotate should tickle undefined behavior. > > > > If you want to clear the undefined behavior,

Re: test-bitrotate.c missing test cases

2020-03-29 Thread Bruno Haible
Hi Jeffrey, > It looks like test-bitrotate.c is missing test cases. It is missing > the 32-bit rotl and rotr of 0-bits. > > The 0-bit rotate should tickle undefined behavior. > > If you want to clear the undefined behavior, then use this code. ... The functions are specified in bitrotate.h,

Re: test-bitrotate.c missing test cases

2020-03-29 Thread Jeffrey Walton
On Sun, Mar 29, 2020 at 5:00 AM Jeffrey Walton wrote: > > It looks like test-bitrotate.c is missing test cases. It is missing > the 32-bit rotl and rotr of 0-bits. > > The 0-bit rotate should tickle undefined behavior. > > If you want to clear the undefined behavior, then use this code. It is >

test-bitrotate.c missing test cases

2020-03-29 Thread Jeffrey Walton
Hi Everyone, It looks like test-bitrotate.c is missing test cases. It is missing the 32-bit rotl and rotr of 0-bits. The 0-bit rotate should tickle undefined behavior. If you want to clear the undefined behavior, then use this code. It is recognized by Clang, GCC, ICC. It will be compiled down