[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v2 2/6] bitops: fix rol/ror when shift is zero
From: |
Richard Henderson |
Subject: |
Re: [Qemu-ppc] [PATCH v2 2/6] bitops: fix rol/ror when shift is zero |
Date: |
Wed, 26 Oct 2016 08:20:10 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
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.
>
> Suggested-by: Richard Henderson <address@hidden>
> Signed-off-by: Nikunj A Dadhania <address@hidden>
> ---
> include/qemu/bitops.h | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~
[Qemu-ppc] [PATCH v2 4/6] target-ppc: add vrldnm and vrlwnm instructions, Nikunj A Dadhania, 2016/10/26
[Qemu-ppc] [PATCH v2 5/6] target-ppc: add vprtyb[w/d/q] instructions, Nikunj A Dadhania, 2016/10/26