qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Marcin Nowakowski <marcin.nowakowski@fungible.com>,
	qemu-devel@nongnu.org,
	Richard Henderson <richard.henderson@linaro.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
Subject: Re: [PATCH 2/3] target/mips: fix SWM32 handling for micromips
Date: Wed, 15 Feb 2023 11:51:04 +0100	[thread overview]
Message-ID: <63199a0a-2a37-e84b-dbe7-effd44fd3a1a@linaro.org> (raw)
In-Reply-To: <20230215084754.3816747-3-marcin.nowakowski@fungible.com>

On 15/2/23 09:47, Marcin Nowakowski wrote:
> SWM32 should store a sequence of 32-bit words from the GPRs, but it was
> incorrectly coded to store 16-bit words only. As a result, an LWM32 that
> usually follows would restore invalid register values.
> 

Fixes: 7dd547e5ab ("target/mips: Use cpu_*_mmuidx_ra instead of 
MMU_MODE*_SUFFIX")

(I suppose a typo S[W] -> ST[W], since LW correctly converted to LDL)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> Signed-off-by: Marcin Nowakowski <marcin.nowakowski@fungible.com>
> ---
>   target/mips/tcg/ldst_helper.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/mips/tcg/ldst_helper.c b/target/mips/tcg/ldst_helper.c
> index d0bd0267b2..c1a8380e34 100644
> --- a/target/mips/tcg/ldst_helper.c
> +++ b/target/mips/tcg/ldst_helper.c
> @@ -248,14 +248,14 @@ void helper_swm(CPUMIPSState *env, target_ulong addr, target_ulong reglist,
>           target_ulong i;
>   
>           for (i = 0; i < base_reglist; i++) {
> -            cpu_stw_mmuidx_ra(env, addr, env->active_tc.gpr[multiple_regs[i]],
> +            cpu_stl_mmuidx_ra(env, addr, env->active_tc.gpr[multiple_regs[i]],
>                                 mem_idx, GETPC());
>               addr += 4;
>           }
>       }
>   
>       if (do_r31) {
> -        cpu_stw_mmuidx_ra(env, addr, env->active_tc.gpr[31], mem_idx, GETPC());
> +        cpu_stl_mmuidx_ra(env, addr, env->active_tc.gpr[31], mem_idx, GETPC());
>       }
>   }
>   



  reply	other threads:[~2023-02-15 10:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15  8:47 [PATCH 0/3] target/mips: misc microMIPS fixes Marcin Nowakowski
2023-02-15  8:47 ` [PATCH 1/3] target/mips: fix JALS32/J32 instruction handling for microMIPS Marcin Nowakowski
2023-02-15 20:21   ` Richard Henderson
2023-02-15 20:50     ` Philippe Mathieu-Daudé
2023-02-16  1:31       ` Jiaxun Yang
2023-02-15  8:47 ` [PATCH 2/3] target/mips: fix SWM32 handling for micromips Marcin Nowakowski
2023-02-15 10:51   ` Philippe Mathieu-Daudé [this message]
2023-02-15  8:47 ` [PATCH 3/3] target/mips: implement CP0.Config7.WII bit support Marcin Nowakowski
2023-02-15 18:33   ` Philippe Mathieu-Daudé
2023-02-15 19:19     ` Marcin Nowakowski
2023-02-15 19:39       ` Philippe Mathieu-Daudé

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=63199a0a-2a37-e84b-dbe7-effd44fd3a1a@linaro.org \
    --to=philmd@linaro.org \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=aurelien@aurel32.net \
    --cc=jiaxun.yang@flygoat.com \
    --cc=marcin.nowakowski@fungible.com \
    --cc=qemu-devel@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).