qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [PATCH] target/mips: Use gen_load_gpr[_hi]() when possible
Date: Tue, 9 Mar 2021 06:11:40 -0800	[thread overview]
Message-ID: <b8a3d08e-7fb1-55fc-402b-cf1f313d0eb3@linaro.org> (raw)
In-Reply-To: <20210308131604.460693-1-f4bug@amsat.org>

On 3/8/21 5:16 AM, Philippe Mathieu-Daudé wrote:
> Use gen_load_gpr[_hi]() instead of open coding it.
> 
> Patch generated using the following spatch script:
> 
>    @gen_load_gpr@
>    identifier reg_idx;
>    expression tcg_reg;
>    @@
>    -if (reg_idx == 0) {
>    -    tcg_gen_movi_tl(tcg_reg, 0);
>    -} else {
>    -    tcg_gen_mov_tl(tcg_reg, cpu_gpr[reg_idx]);
>    -}
>    +gen_load_gpr(tcg_reg, reg_idx);
> 
>    @gen_load_gpr_hi@
>    identifier reg_idx;
>    expression tcg_reg;
>    @@
>    -if (reg_idx == 0) {
>    -    tcg_gen_movi_i64(tcg_reg, 0);
>    -} else {
>    -    tcg_gen_mov_i64(tcg_reg, cpu_gpr_hi[reg_idx]);
>    -}
>    +gen_load_gpr_hi(tcg_reg, reg_idx);
> 
> Suggested-by: Richard Henderson<richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2021-03-09 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 13:16 [PATCH] target/mips: Use gen_load_gpr[_hi]() when possible Philippe Mathieu-Daudé
2021-03-09 14:11 ` Richard Henderson [this message]
2021-03-09 14:49 ` 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=b8a3d08e-7fb1-55fc-402b-cf1f313d0eb3@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=aurelien@aurel32.net \
    --cc=f4bug@amsat.org \
    --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).