]> Git Repo - qemu.git/commit
bitops: fix rol/ror when shift is zero
authorNikunj A Dadhania <[email protected]>
Sun, 30 Oct 2016 03:14:55 +0000 (08:44 +0530)
committerDavid Gibson <[email protected]>
Mon, 14 Nov 2016 23:05:50 +0000 (10:05 +1100)
commitecce0369b864e3c505b89942cd8cc23a62a4386f
tree6411d565cfb6ee0644412b94513e1b923c514dda
parent682df581c65ed2c1b9e77093e332214ecaa1ee93
bitops: fix rol/ror when shift is zero

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 <[email protected]>
Signed-off-by: Nikunj A Dadhania <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: David Gibson <[email protected]>
include/qemu/bitops.h
This page took 0.024877 seconds and 4 git commands to generate.