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: Peter Maydell
Subject: Re: [PATCH] target/tricore: Use unsigned types for bitops in helper_eq_b()
Date: Mon, 29 Jul 2024 16:57:49 +0100

On Tue, 23 Jul 2024 at 16:10, Peter Maydell <peter.maydell@linaro.org> 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>
> ---

I'll take this via my target-arm queue since I'm doing a
pullreq anyway.

thanks
-- PMM



reply via email to

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