[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
- [PATCH 00/10] VDIV/VMOD Implementation, Lucas Mateus Castro(alqotel), 2022/03/30
- [PATCH 01/10] qemu/int128: avoid undefined behavior in int128_lshift, Lucas Mateus Castro(alqotel), 2022/03/30
- Re: [PATCH 01/10] qemu/int128: avoid undefined behavior in int128_lshift,
Peter Maydell <=
- [PATCH 02/10] qemu/int128: add int128_urshift, Lucas Mateus Castro(alqotel), 2022/03/30
- [PATCH 03/10] target/ppc: Implemented vector divide instructions, Lucas Mateus Castro(alqotel), 2022/03/30
- [PATCH 04/10] target/ppc: Implemented vector divide quadword, Lucas Mateus Castro(alqotel), 2022/03/30
- [PATCH 05/10] target/ppc: Implemented vector divide extended word, Lucas Mateus Castro(alqotel), 2022/03/30
- [PATCH 06/10] Implemented unsigned 256-by-128 division, Lucas Mateus Castro(alqotel), 2022/03/30
- [PATCH 07/10] Implemented signed 256-by-128 division, Lucas Mateus Castro(alqotel), 2022/03/30