qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Huacai Chen" <zltjiangshi@gmail.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"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 V9 3/6] target/mips: Add loongson-ext lswc2 group of instructions (Part 1)
Date: Wed, 16 Sep 2020 08:15:29 -0700	[thread overview]
Message-ID: <1c19dd56-7d76-3dc8-c881-f0631e5e5352@linaro.org> (raw)
In-Reply-To: <1600222344-16808-4-git-send-email-chenhc@lemote.com>

On 9/15/20 7:12 PM, Huacai Chen wrote:
> +    case OPC_GSLQ:
> +        gen_base_offset_addr(ctx, t0, rs, lsq_offset);
> +        tcg_gen_qemu_ld_tl(t0, t0, ctx->mem_idx, MO_TEQ |
> +                            ctx->default_tcg_memop_mask);
> +        gen_store_gpr(t0, rt);
> +        gen_base_offset_addr(ctx, t0, rs, lsq_offset + 8);
> +        tcg_gen_qemu_ld_tl(t0, t0, ctx->mem_idx, MO_TEQ |
> +                            ctx->default_tcg_memop_mask);
> +        gen_store_gpr(t0, lsq_rt1);

If rs == rt, this will compute the wrong address for the second load.

Either avoid storing t0 back to rt until both loads are complete, or retain the
address temporary and simply add 8 between the two loads.


r~


  parent reply	other threads:[~2020-09-16 15:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16  2:12 [PATCH V9 0/6] mips: Add Loongson-3 machine support Huacai Chen
2020-09-16  2:12 ` [PATCH V9 1/6] linux-headers: Update MIPS KVM type defintition Huacai Chen
2020-09-16  2:12 ` [PATCH V9 2/6] target/mips: Fix PageMask with variable page size Huacai Chen
2020-09-16  2:12 ` [PATCH V9 3/6] target/mips: Add loongson-ext lswc2 group of instructions (Part 1) Huacai Chen
2020-09-16  7:46   ` Philippe Mathieu-Daudé
2020-09-16  7:58     ` Huacai Chen
2020-09-16 15:15   ` Richard Henderson [this message]
2020-09-19  0:44     ` Huacai Chen
2020-09-16  2:12 ` [PATCH V9 4/6] target/mips: Add loongson-ext lswc2 group of instructions (Part 2) Huacai Chen
2020-09-16  2:12 ` [PATCH V9 5/6] target/mips: Add loongson-ext lsdc2 group of instructions Huacai Chen
2020-09-16  2:12 ` [PATCH V9 6/6] hw/mips: Add Loongson-3 machine support Huacai Chen
2020-09-16  7:56   ` Philippe Mathieu-Daudé
2020-09-16  8:08     ` Philippe Mathieu-Daudé
2020-09-16  9:49     ` Huacai Chen
2020-09-16 10:47       ` Philippe Mathieu-Daudé
2020-09-17  7:53         ` Philippe Mathieu-Daudé
2020-09-19  1:00           ` Huacai Chen
2020-09-19 13:59             ` Philippe Mathieu-Daudé
2020-09-21  2:12               ` chen huacai
2020-09-17  8:09       ` Philippe Mathieu-Daudé
2020-09-24 15:40       ` Philippe Mathieu-Daudé
2020-09-25  4:28         ` Huacai Chen
2020-09-17  7:56 ` [PATCH V9 0/6] mips: " Philippe Mathieu-Daudé
2020-09-21  2:25   ` chen huacai
2020-09-17  8:22 ` Aleksandar Markovic
2020-09-21  2:19   ` chen huacai

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=1c19dd56-7d76-3dc8-c881-f0631e5e5352@linaro.org \
    --to=richard.henderson@linaro.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=f4bug@amsat.org \
    --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 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).