qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: David Brenken <david.brenken@efs-auto.org>, qemu-devel@nongnu.org
Cc: kbastian@mail.uni-paderborn.de,
	David Brenken <david.brenken@efs-auto.de>,
	Georg Hofstetter <georg.hofstetter@efs-auto.de>,
	Andreas Konopik <andreas.konopik@efs-auto.de>
Subject: Re: [PATCH v2 1/1] tricore: fixed faulty conditions for extr and imask
Date: Thu, 11 Feb 2021 13:10:27 +0100	[thread overview]
Message-ID: <fdd6bbdb-a943-3e38-3b83-9c4af95ff6fd@amsat.org> (raw)
In-Reply-To: <20210211115329.8984-2-david.brenken@efs-auto.org>

Hi David and Andreas,

On 2/11/21 12:53 PM, David Brenken wrote:
> From: Andreas Konopik <andreas.konopik@efs-auto.de>

Here is a good place to explain why you need this change,
how did you noticed it (example of opcode and conditions
reaching this issue) - eventually provide a reproducer
(asm dump could be enough) - and also eventually a reference
to the manual (chapter, table) justifying your change.

See also:
https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
https://chris.beams.io/posts/git-commit/#why-not-how

> 
> Signed-off-by: Andreas Konopik <andreas.konopik@efs-auto.de>
> Signed-off-by: Georg Hofstetter <georg.hofstetter@efs-auto.de>
> Signed-off-by: David Brenken <david.brenken@efs-auto.de>
> ---
>  target/tricore/translate.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/target/tricore/translate.c b/target/tricore/translate.c
> index 7752630ac1..ebeddf8f4a 100644
> --- a/target/tricore/translate.c
> +++ b/target/tricore/translate.c
> @@ -5777,8 +5777,8 @@ static void decode_rcpw_insert(DisasContext *ctx)
>      switch (op2) {
>      case OPC2_32_RCPW_IMASK:
>          CHECK_REG_PAIR(r2);
> -        /* if pos + width > 31 undefined result */
> -        if (pos + width <= 31) {
> +        /* if pos + width > 32 undefined result */
> +        if (pos + width <= 32) {
>              tcg_gen_movi_tl(cpu_gpr_d[r2+1], ((1u << width) - 1) << pos);
>              tcg_gen_movi_tl(cpu_gpr_d[r2], (const4 << pos));
>          }
> @@ -6999,7 +6999,7 @@ static void decode_rrpw_extract_insert(DisasContext *ctx)
>  
>      switch (op2) {
>      case OPC2_32_RRPW_EXTR:
> -        if (pos + width <= 31) {
> +        if (pos + width <= 32) {
>              /* optimize special cases */
>              if ((pos == 0) && (width == 8)) {
>                  tcg_gen_ext8s_tl(cpu_gpr_d[r3], cpu_gpr_d[r1]);
> @@ -7021,7 +7021,7 @@ static void decode_rrpw_extract_insert(DisasContext *ctx)
>          break;
>      case OPC2_32_RRPW_IMASK:
>          CHECK_REG_PAIR(r3);
> -        if (pos + width <= 31) {
> +        if (pos + width <= 32) {
>              tcg_gen_movi_tl(cpu_gpr_d[r3+1], ((1u << width) - 1) << pos);
>              tcg_gen_shli_tl(cpu_gpr_d[r3], cpu_gpr_d[r2], pos);
>          }
> 



  reply	other threads:[~2021-02-11 12:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 11:53 [PATCH v2 0/1] tricore: fixed faulty conditions for extr and imask David Brenken
2021-02-11 11:53 ` [PATCH v2 1/1] " David Brenken
2021-02-11 12:10   ` Philippe Mathieu-Daudé [this message]
2021-02-11 13:49     ` Konopik, Andreas (EFS-GH2)
2021-03-05 12:43       ` Bastian Koppelmann
2021-03-05 11:50   ` Bastian Koppelmann

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=fdd6bbdb-a943-3e38-3b83-9c4af95ff6fd@amsat.org \
    --to=f4bug@amsat.org \
    --cc=andreas.konopik@efs-auto.de \
    --cc=david.brenken@efs-auto.de \
    --cc=david.brenken@efs-auto.org \
    --cc=georg.hofstetter@efs-auto.de \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=qemu-devel@nongnu.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).