qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Lucas Mateus Castro(alqotel)" <lucas.araujo@eldorado.org.br>
Cc: danielhb413@gmail.com, richard.henderson@linaro.org,
	qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-ppc@nongnu.org, clg@kaod.org,
	"Frédéric Pétrot" <frederic.petrot@univ-grenoble-alpes.fr>,
	"Matheus Ferst" <matheus.ferst@eldorado.org.br>
Subject: Re: [PATCH 01/10] qemu/int128: avoid undefined behavior in int128_lshift
Date: Wed, 30 Mar 2022 22:21:42 +0100	[thread overview]
Message-ID: <CAFEAcA8sAprd9JsyCS-SbhMffNqX45WWsg8U_h8DST2xUMvJZA@mail.gmail.com> (raw)
In-Reply-To: <20220330202515.66554-2-lucas.araujo@eldorado.org.br>

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	other threads:[~2022-03-30 21:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30 20:25 [PATCH 00/10] VDIV/VMOD Implementation Lucas Mateus Castro(alqotel)
2022-03-30 20:25 ` [PATCH 01/10] qemu/int128: avoid undefined behavior in int128_lshift Lucas Mateus Castro(alqotel)
2022-03-30 21:21   ` Peter Maydell [this message]
2022-03-30 20:25 ` [PATCH 02/10] qemu/int128: add int128_urshift Lucas Mateus Castro(alqotel)
2022-03-30 20:25 ` [PATCH 03/10] target/ppc: Implemented vector divide instructions Lucas Mateus Castro(alqotel)
2022-03-30 21:06   ` Richard Henderson
2022-03-31 18:28     ` Lucas Mateus Martins Araujo e Castro
2022-03-30 20:25 ` [PATCH 04/10] target/ppc: Implemented vector divide quadword Lucas Mateus Castro(alqotel)
2022-03-30 20:25 ` [PATCH 05/10] target/ppc: Implemented vector divide extended word Lucas Mateus Castro(alqotel)
2022-03-30 21:24   ` Richard Henderson
2022-03-30 20:25 ` [PATCH 06/10] Implemented unsigned 256-by-128 division Lucas Mateus Castro(alqotel)
2022-03-30 20:25 ` [PATCH 07/10] Implemented signed " Lucas Mateus Castro(alqotel)
2022-03-30 21:45   ` Richard Henderson
2022-03-30 20:25 ` [PATCH 08/10] target/ppc: Implemented remaining vector divide extended Lucas Mateus Castro(alqotel)
2022-03-30 20:25 ` [PATCH 09/10] target/ppc: Implemented vector module word/doubleword Lucas Mateus Castro(alqotel)
2022-03-30 20:25 ` [PATCH 10/10] target/ppc: Implemented vector module quadword Lucas Mateus Castro(alqotel)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA8sAprd9JsyCS-SbhMffNqX45WWsg8U_h8DST2xUMvJZA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=f4bug@amsat.org \
    --cc=frederic.petrot@univ-grenoble-alpes.fr \
    --cc=lucas.araujo@eldorado.org.br \
    --cc=matheus.ferst@eldorado.org.br \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).