From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: "Stefan Sandström" <stefans@axis.com>
Cc: "open list:All patches CC here" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v3] Correct CRIS TCG register lifetime management
Date: Fri, 19 Feb 2021 12:19:25 +0100 [thread overview]
Message-ID: <20210219111925.GQ477672@toto> (raw)
In-Reply-To: <20210219105349.11582-1-stefans@axis.com>
On Fri, Feb 19, 2021 at 11:53:48AM +0100, Stefan Sandström wrote:
> From: Stefan Sandstrom <stefans@axis.com>
>
> Add and fix deallocation of temporary TCG registers in CRIS code
> generation.
Thanks Stefan,
There's still a couple of minor stylistic issues.
The Subject/Summary should be prefixed with the code area you're
changing. I'd suggest changing it
from:
Correct CRIS TCG register lifetime management
to:
target/cris: Plug leakage of TCG temporaries
We also try to avoid unrelated whitespace changes.
I've commented on the 2 I found inline.
Would be good if you could remove those in the next version.
Other than that, the patch looks good to me.
So, with those issues fixed, feel free to add the following tags:
Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Best regards,
Edgar
>
> Change-Id: I17fce5d95bdc4418337ba885d53ba97afb1bafcc
> Signed-off-by: Stefan Sandström <stefans@axis.com>
> ---
> target/cris/translate.c | 127 +++++++++++++++++++++++---------
> target/cris/translate_v10.c.inc | 70 ++++++++++++------
> 2 files changed, 138 insertions(+), 59 deletions(-)
>
> diff --git a/target/cris/translate.c b/target/cris/translate.c
> index c893f877ab..2b35d818dd 100644
> --- a/target/cris/translate.c
> +++ b/target/cris/translate.c
> @@ -172,14 +172,21 @@ static int preg_sizes[] = {
> tcg_gen_ld_tl(tn, cpu_env, offsetof(CPUCRISState, member))
> #define t_gen_mov_env_TN(member, tn) \
> tcg_gen_st_tl(tn, cpu_env, offsetof(CPUCRISState, member))
> +#define t_gen_movi_env_TN(member, c) \
> + do { \
> + TCGv tc = tcg_const_tl(c); \
> + t_gen_mov_env_TN(member, tc); \
> + tcg_temp_free(tc); \
> + } while (0)
> +
Remove this extra blank line.
>
> static inline void t_gen_mov_TN_preg(TCGv tn, int r)
> {
> assert(r >= 0 && r <= 15);
> if (r == PR_BZ || r == PR_WZ || r == PR_DZ) {
> - tcg_gen_mov_tl(tn, tcg_const_tl(0));
> + tcg_gen_movi_tl(tn, 0);
> } else if (r == PR_VR) {
> - tcg_gen_mov_tl(tn, tcg_const_tl(32));
> + tcg_gen_movi_tl(tn, 32);
> } else {
> tcg_gen_mov_tl(tn, cpu_PR[r]);
> }
> @@ -204,6 +211,8 @@ static inline void t_gen_mov_preg_TN(DisasContext *dc, int r, TCGv tn)
> }
> }
>
> +
> +
Remove this unrelated blank lines.
Cheers,
Edgar
next prev parent reply other threads:[~2021-02-19 11:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 10:53 [PATCH v3] Correct CRIS TCG register lifetime management Stefan Sandström
2021-02-19 11:19 ` Edgar E. Iglesias [this message]
2021-02-19 13:17 ` Stefan Sandström
-- strict thread matches above, loose matches on Subject: below --
2021-02-19 10:45 Stefan Sandström
2021-02-19 10:51 ` no-reply
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=20210219111925.GQ477672@toto \
--to=edgar.iglesias@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=stefans@axis.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.