diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2016-10-30 08:44:55 +0530 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-11-15 10:05:50 +1100 |
commit | ecce0369b864e3c505b89942cd8cc23a62a4386f (patch) | |
tree | 6411d565cfb6ee0644412b94513e1b923c514dda /target-cris/cpu.c | |
parent | 682df581c65ed2c1b9e77093e332214ecaa1ee93 (diff) | |
download | qemu-ecce0369b864e3c505b89942cd8cc23a62a4386f.zip |
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 <rth@twiddle.net>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target-cris/cpu.c')
0 files changed, 0 insertions, 0 deletions