qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Cc: "open list:RISC-V TCG CPUs" <qemu-riscv@nongnu.org>,
	Sagar Karandikar <sagark@eecs.berkeley.edu>,
	Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>,
	Alistair Francis <Alistair.Francis@wdc.com>,
	Palmer Dabbelt <palmer@dabbelt.com>
Subject: Re: [PATCH v2 2/2] target/riscv: Call check_access() before tcg_temp_new()
Date: Tue, 23 Feb 2021 16:31:13 -0800	[thread overview]
Message-ID: <7725686f-fec7-5787-22e1-fe5be84c24a4@linaro.org> (raw)
In-Reply-To: <20210222184940.43169-2-Alexander.Richardson@cl.cam.ac.uk>

On 2/22/21 10:49 AM, Alex Richardson wrote:
> ---
>  target/riscv/insn_trans/trans_rvh.c.inc | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)

Any particular reason?

At first I thought this was a macro with a hidden return, but it isn't.  I
would understand a cleanup like

    if (check_access(ctx)) {
       TCGv t0 = tcg_temp_new();
       TCGv t1 = tcg_temp_new();
       ...

where we do not generate the rest of the code if we raised an exception.
Alternately, if the nesting seems ugly,

    if (!check_access(ctx)) {
        return true;
    }
    ...
    return true;


r~


  reply	other threads:[~2021-02-24  0:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 18:49 [PATCH v2 1/2] target/riscv: Reduce duplicated code in trans_rvh.c.inc Alex Richardson
2021-02-22 18:49 ` [PATCH v2 2/2] target/riscv: Call check_access() before tcg_temp_new() Alex Richardson
2021-02-24  0:31   ` Richard Henderson [this message]
2021-02-24  0:24 ` [PATCH v2 1/2] target/riscv: Reduce duplicated code in trans_rvh.c.inc Richard Henderson

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=7725686f-fec7-5787-22e1-fe5be84c24a4@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=Alexander.Richardson@cl.cam.ac.uk \
    --cc=Alistair.Francis@wdc.com \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=palmer@dabbelt.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=sagark@eecs.berkeley.edu \
    /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).