qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 01/10] qemu/int128: avoid undefined behavior in int128_lshift


From: Peter Maydell
Subject: Re: [PATCH 01/10] qemu/int128: avoid undefined behavior in int128_lshift
Date: Wed, 30 Mar 2022 22:21:42 +0100

On Wed, 30 Mar 2022 at 21:26, Lucas Mateus Castro(alqotel)
<lucas.araujo@eldorado.org.br> wrote:
>
> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
>
> Avoid the left shift of negative values in int128_lshift by casting
> a/a.hi to unsigned.

We compile with -fwrapv, so left shift of negative integers
should always be well-defined for us.

thanks
-- PMM



reply via email to

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