qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/tricore: Use unsigned types for bitops in helper_eq_b


From: Richard Henderson
Subject: Re: [PATCH] target/tricore: Use unsigned types for bitops in helper_eq_b()
Date: Wed, 24 Jul 2024 09:28:13 +1000
User-agent: Mozilla Thunderbird

On 7/24/24 01:10, Peter Maydell wrote:
Coverity points out that in helper_eq_b() we have an int32_t 'msk'
and we end up shifting into its sign bit. This is OK for QEMU because
we use -fwrapv to give this well defined semantics, but when you look
at what this function is doing it's doing bit operations, so we
should be using an unsigned variable anyway. This also matches the
return type of the function.

Make 'ret' and 'msk' uint32_t.

Resolves: Coverity CID 1547758
Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
---
  target/tricore/op_helper.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]