All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Huacai Chen <zltjiangshi@gmail.com>,
	Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>,
	Huacai Chen <chenhuacai@gmail.com>,
	qemu-devel@nongnu.org, Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Huacai Chen <chenhc@lemote.com>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [PATCH V16 2/6] target/mips: Add unaligned access support for MIPS64R6 and Loongson-3
Date: Tue, 3 Nov 2020 13:47:23 +0100	[thread overview]
Message-ID: <9c1b9a5a-7214-b724-f565-9069cc8823ab@amsat.org> (raw)
In-Reply-To: <1604053541-27822-3-git-send-email-chenhc@lemote.com>

On 10/30/20 11:25 AM, Huacai Chen wrote:
> MIPSR6 (not only MIPS32R6) processors support unaligned access in
> hardware, so set MO_UNALN in their default_tcg_memop_mask. Btw, new
> Loongson-3 (such as Loongson-3A4000) also support unaligned access,
> since both old and new Loongson-3 use the same binaries, we can simply
> set MO_UNALN for all Loongson-3 processors.
> 
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Huacai Chen <chenhc@lemote.com>
> ---
>  target/mips/translate.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/mips/translate.c b/target/mips/translate.c
> index f449758..470f59c 100644
> --- a/target/mips/translate.c
> +++ b/target/mips/translate.c
> @@ -31442,8 +31442,8 @@ static void mips_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
>  #else
>          ctx->mem_idx = hflags_mmu_index(ctx->hflags);
>  #endif
> -    ctx->default_tcg_memop_mask = (ctx->insn_flags & ISA_MIPS32R6) ?
> -                                  MO_UNALN : MO_ALIGN;
> +    ctx->default_tcg_memop_mask = (ctx->insn_flags & (ISA_MIPS32R6 | ISA_MIPS64R6 |
> +                                  INSN_LOONGSON3A)) ? MO_UNALN : MO_ALIGN;
>  
>      LOG_DISAS("\ntb %p idx %d hflags %04x\n", ctx->base.tb, ctx->mem_idx,
>                ctx->hflags);
> 

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

And queued to mips-next.


  reply	other threads:[~2020-11-03 12:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30 10:25 [PATCH V16 0/6] mips: Add Loongson-3 machine support Huacai Chen
2020-10-30 10:25 ` [PATCH V16 1/6] target/mips: Fix PageMask with variable page size Huacai Chen
2020-11-03 14:53   ` Philippe Mathieu-Daudé
2020-11-04  3:34     ` Huacai Chen
2020-10-30 10:25 ` [PATCH V16 2/6] target/mips: Add unaligned access support for MIPS64R6 and Loongson-3 Huacai Chen
2020-11-03 12:47   ` Philippe Mathieu-Daudé [this message]
2020-10-30 10:25 ` [PATCH V16 3/6] hw/mips: Implement fw_cfg_arch_key_name() Huacai Chen
2020-10-30 10:25 ` [PATCH V16 4/6] hw/mips: Add Loongson-3 boot parameter helpers Huacai Chen
2020-10-30 10:25 ` [PATCH V16 5/6] hw/mips: Add Loongson-3 machine support Huacai Chen
2020-11-03 20:23   ` Philippe Mathieu-Daudé
2020-11-04  3:33     ` Huacai Chen
2020-10-30 10:25 ` [PATCH V16 6/6] docs/system: Update MIPS machine documentation Huacai Chen
2020-11-03 14:57 ` [PATCH V16 0/6] mips: Add Loongson-3 machine support 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=9c1b9a5a-7214-b724-f565-9069cc8823ab@amsat.org \
    --to=f4bug@amsat.org \
    --cc=aleksandar.qemu.devel@gmail.com \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=aurelien@aurel32.net \
    --cc=chenhc@lemote.com \
    --cc=chenhuacai@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zltjiangshi@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.