From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: Marek Vasut <marex@denx.de>, Chris Wulff <crwulff@gmail.com>,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [PATCH 3/3] target/nios2: Use tcg_constant_*
Date: Sun, 3 Oct 2021 01:36:00 +0200 [thread overview]
Message-ID: <69aa1b04-b30a-e12e-f82c-1b777d29e1b3@amsat.org> (raw)
In-Reply-To: <20211002233054.3575646-4-f4bug@amsat.org>
On 10/3/21 01:30, Philippe Mathieu-Daudé wrote:
> Replace uses of tcg_const_* with the allocate and free close together.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> target/nios2/translate.c | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)
> @@ -448,9 +445,8 @@ static void rdctl(DisasContext *dc, uint32_t code, uint32_t flags)
> if (likely(instr.c != R_ZERO)) {
> tcg_gen_mov_tl(cpu_R[instr.c], cpu_R[instr.imm5 + CR_BASE]);
> #ifdef DEBUG_MMU
> - TCGv_i32 tmp = tcg_const_i32(instr.imm5 + CR_BASE);
> - gen_helper_mmu_read_debug(cpu_R[instr.c], cpu_env, tmp);
> - tcg_temp_free_i32(tmp);
> + gen_helper_mmu_read_debug(cpu_R[instr.c], cpu_env,
> + tcg_constant_i32(instr.imm5 + CR_BASE));
> #endif
> }
I missed mmu_write() is also read-only, thus can use tcg_constant_*().
next prev parent reply other threads:[~2021-10-02 23:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-02 23:30 [PATCH 0/3] target/nios2: Use tcg_constant_* Philippe Mathieu-Daudé
2021-10-02 23:30 ` [PATCH 1/3] target/nios2: Replace load_zero() by zero constant in DisasContext Philippe Mathieu-Daudé
2021-10-03 13:49 ` Richard Henderson
2021-10-02 23:30 ` [PATCH 2/3] target/nios2: Use DisasContext::zero constant instead of temporary Philippe Mathieu-Daudé
2021-10-03 13:50 ` Richard Henderson
2021-10-02 23:30 ` [PATCH 3/3] target/nios2: Use tcg_constant_* Philippe Mathieu-Daudé
2021-10-02 23:36 ` Philippe Mathieu-Daudé [this message]
2021-10-03 13:52 ` 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=69aa1b04-b30a-e12e-f82c-1b777d29e1b3@amsat.org \
--to=f4bug@amsat.org \
--cc=crwulff@gmail.com \
--cc=marex@denx.de \
--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).