From: Richard Henderson <richard.henderson@linaro.org>
To: Taylor Simpson <tsimpson@quicinc.com>, qemu-devel@nongnu.org
Cc: philmd@redhat.com
Subject: Re: [PATCH] Hexagon (target/hexagon) TCG generation cleanup
Date: Mon, 15 Mar 2021 07:40:10 -0600 [thread overview]
Message-ID: <f607fe6e-ed0e-e3a8-4b5e-378328f57557@linaro.org> (raw)
In-Reply-To: <1615784088-26384-1-git-send-email-tsimpson@quicinc.com>
On 3/14/21 10:54 PM, Taylor Simpson wrote:
> Simplify TCG generation of hex_reg_written
>
> Address feedback from Richard Henderson <<richard.henderson@linaro.org>
>
> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
> ---
> target/hexagon/genptr.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c
> index 7481f4c..0ad63fe 100644
> --- a/target/hexagon/genptr.c
> +++ b/target/hexagon/genptr.c
> @@ -43,9 +43,15 @@ static inline void gen_log_predicated_reg_write(int rnum, TCGv val, int slot)
> tcg_gen_movcond_tl(TCG_COND_EQ, hex_new_value[rnum], slot_mask, zero,
> val, hex_new_value[rnum]);
> #if HEX_DEBUG
> - /* Do this so HELPER(debug_commit_end) will know */
> - tcg_gen_movcond_tl(TCG_COND_EQ, hex_reg_written[rnum], slot_mask, zero,
> - one, hex_reg_written[rnum]);
> + /*
> + * Do this so HELPER(debug_commit_end) will know
> + *
> + * Note that slot_mask indicates the value is not written
> + * (i.e., slot was cancelled), so we negate the value before
> + * or'ing with hex_reg_written[rnum].
> + */
> + tcg_gen_xori_tl(slot_mask, slot_mask, 1 << slot);
> + tcg_gen_or_tl(hex_reg_written[rnum], hex_reg_written[rnum], slot_mask);
reg_written appears to be a boolean, not a mask of any kind.
I think you want
tcg_gen_setcond_i32(TCG_COND_EQ, slot_mask, slot_mask, zero);
and not the xor.
r~
next prev parent reply other threads:[~2021-03-15 13:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 4:54 [PATCH] Hexagon (target/hexagon) TCG generation cleanup Taylor Simpson
2021-03-15 13:40 ` Richard Henderson [this message]
2021-03-15 21:45 ` Taylor Simpson
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=f607fe6e-ed0e-e3a8-4b5e-378328f57557@linaro.org \
--to=richard.henderson@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=tsimpson@quicinc.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).