qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé via" <qemu-devel@nongnu.org>
To: Stefan Pejic <stefan.pejic@syrmia.com>, qemu-devel@nongnu.org
Cc: ot_stefan.pejic@mediatek.com, ot_dragan.mladjenovic@mediatek.com,
	Dragan Mladjenovic <dragan.mladjenovic@syrmia.com>
Subject: Re: [PATCH 2/7] target/mips: Fix emulation of nanoMips EXTRV_S.H instruction
Date: Mon, 9 May 2022 22:53:46 +0200	[thread overview]
Message-ID: <4169bb0f-03dc-e5ef-18a0-fa5b27f55cba@amsat.org> (raw)
In-Reply-To: <20220504110403.613168-3-stefan.pejic@syrmia.com>

On 4/5/22 13:03, Stefan Pejic wrote:
> From: Dragan Mladjenovic <dragan.mladjenovic@syrmia.com>
> 
> The field rs in the instruction EXTRV_S.H rt, ac, rs is specified in
> nanoMips documentation as opcode[20..16]. It is, however, erroneously
> considered as opcode[25..21] in the current QEMU implementation. In
> function gen_pool32axf_2_nanomips_insn(), the variable v0_t corresponds
> to rt/opcode[25..21], and v1_t corresponds to rs/opcode[20..16]), and
> v0_t is by mistake passed to the helper gen_helper_extr_s_h().
> 
> Use v1_t rather than v0_t in the invocation of gen_helper_extr_s_h()
> to fix this.
> 

Fixes: 8b3698b294 ("target/mips: Add emulation of DSP ASE for nanoMIPS")
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> Signed-off-by: Dragan Mladjenovic <dragan.mladjenovic@syrmia.com>
> Signed-off-by: Stefan Pejic <stefan.pejic@syrmia.com>
> ---
>   target/mips/tcg/nanomips_translate.c.inc | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/mips/tcg/nanomips_translate.c.inc b/target/mips/tcg/nanomips_translate.c.inc
> index 58ae35a156..9ee4df2135 100644
> --- a/target/mips/tcg/nanomips_translate.c.inc
> +++ b/target/mips/tcg/nanomips_translate.c.inc
> @@ -2036,7 +2036,7 @@ static void gen_pool32axf_2_nanomips_insn(DisasContext *ctx, uint32_t opc,
>           case NM_EXTRV_S_H:
>               check_dsp(ctx);
>               tcg_gen_movi_tl(t0, rd >> 3);
> -            gen_helper_extr_s_h(t0, t0, v0_t, cpu_env);
> +            gen_helper_extr_s_h(t0, t0, v1_t, cpu_env);
>               gen_store_gpr(t0, ret);
>               break;
>           }



  reply	other threads:[~2022-05-09 20:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 11:03 [PATCH 0/7] Undeprecate nanoMIPS and fix multiple bugs Stefan Pejic
2022-05-04 11:03 ` [PATCH 1/7] target/mips: Fix emulation of nanoMips MTHLIP instruction Stefan Pejic
2022-05-09 20:47   ` Philippe Mathieu-Daudé via
2022-05-04 11:03 ` [PATCH 2/7] target/mips: Fix emulation of nanoMips EXTRV_S.H instruction Stefan Pejic
2022-05-09 20:53   ` Philippe Mathieu-Daudé via [this message]
2022-05-04 11:03 ` [PATCH 3/7] target/mips: Fix emulation of nanoMips BPOSGE32C instruction Stefan Pejic
2022-05-09 12:24   ` Philippe Mathieu-Daudé via
2022-05-04 11:04 ` [PATCH 4/7] target/mips: Fix emulation of nanoMips BNEC[32] instruction Stefan Pejic
2022-05-09 20:34   ` Philippe Mathieu-Daudé via
2022-05-04 11:04 ` [PATCH 5/7] target/mips: Fix handling of unaligned memory access for nanoMips ISA Stefan Pejic
2022-06-10 14:13   ` Philippe Mathieu-Daudé via
2022-05-04 11:04 ` [PATCH 6/7] target/mips: Add missing default cases for some nanoMips pools Stefan Pejic
2022-05-09 12:25   ` Philippe Mathieu-Daudé via
2022-05-04 11:04 ` [PATCH 7/7] target/mips: Undeprecate nanoMips ISA support in QEMU Stefan Pejic
2022-05-31 13:14   ` Philippe Mathieu-Daudé via
2022-06-10 14:09     ` Philippe Mathieu-Daudé via
2022-06-10 14:40       ` Philippe Mathieu-Daudé via
2022-06-10 14:41 ` [PATCH 0/7] Undeprecate nanoMIPS and fix multiple bugs Philippe Mathieu-Daudé via

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=4169bb0f-03dc-e5ef-18a0-fa5b27f55cba@amsat.org \
    --to=qemu-devel@nongnu.org \
    --cc=dragan.mladjenovic@syrmia.com \
    --cc=f4bug@amsat.org \
    --cc=ot_dragan.mladjenovic@mediatek.com \
    --cc=ot_stefan.pejic@mediatek.com \
    --cc=stefan.pejic@syrmia.com \
    /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).