All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Johansson via <qemu-devel@nongnu.org>
To: Taylor Simpson <tsimpson@quicinc.com>, qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org, philmd@linaro.org, ale@rev.ng,
	bcain@quicinc.com, quic_mathbern@quicinc.com
Subject: Re: [PATCH v5 12/14] Hexagon (target/hexagon) Remove gen_log_predicated_reg_write[_pair]
Date: Fri, 24 Feb 2023 14:05:41 +0100	[thread overview]
Message-ID: <60f644b7-bdd3-0161-2156-75ee9039316b@rev.ng> (raw)
In-Reply-To: <20230131225647.25274-13-tsimpson@quicinc.com>


On 1/31/23 23:56, Taylor Simpson wrote:
>   static void gen_log_reg_write_pair(int rnum, TCGv_i64 val)
>   {
>       const target_ulong reg_mask_low = reg_immut_masks[rnum];
> @@ -167,6 +120,7 @@ static void gen_log_reg_write_pair(int rnum, TCGv_i64 val)
>       }
>   
>       tcg_temp_free(val32);
> +    tcg_temp_free_i64(val);
>   }
>   
>   void gen_log_pred_write(DisasContext *ctx, int pnum, TCGv val)
> @@ -306,12 +260,14 @@ static inline void gen_write_ctrl_reg_pair(DisasContext *ctx, int reg_num,
>                                              TCGv_i64 val)
>   {
>       if (reg_num == HEX_REG_P3_0_ALIASED) {
> +        TCGv result = get_result_gpr(ctx, reg_num + 1);
>           TCGv val32 = tcg_temp_new();
>           tcg_gen_extrl_i64_i32(val32, val);
>           gen_write_p3_0(ctx, val32);
>           tcg_gen_extrh_i64_i32(val32, val);
> -        gen_log_reg_write(reg_num + 1, val32);
> +        tcg_gen_mov_tl(result, val32);
>           tcg_temp_free(val32);
> +        tcg_temp_free_i64(val);
>       } else {
>           gen_log_reg_write_pair(reg_num, val);
>           if (reg_num == HEX_REG_QEMU_PKT_CNT) {

Hiding the free of a TCGv argument scares me a bit, it's bound to cause 
annoying bugs down
the line, I feel.

Any reason we can't keep the frees in the same scope as allocation?

Otherwise, the patch looks good,

Reviewed-by: Anton Johansson <anjo@rev.ng>



  reply	other threads:[~2023-02-24 13:06 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 22:56 [PATCH v5 00/14] Hexagon: COF overrides, new generator, test/bug update Taylor Simpson
2023-01-31 22:56 ` [PATCH v5 01/14] Hexagon (target/hexagon) Add overrides for jumpr31 instructions Taylor Simpson
2023-02-01 12:05   ` Anton Johansson via
2023-01-31 22:56 ` [PATCH v5 02/14] Hexagon (target/hexagon) Add overrides for callr Taylor Simpson
2023-02-01 12:08   ` Anton Johansson via
2023-01-31 22:56 ` [PATCH v5 03/14] Hexagon (target/hexagon) Add overrides for endloop1/endloop01 Taylor Simpson
2023-02-01 12:29   ` Anton Johansson via
2023-02-01 18:43     ` Taylor Simpson
2023-01-31 22:56 ` [PATCH v5 04/14] Hexagon (target/hexagon) Add overrides for dealloc-return instructions Taylor Simpson
2023-02-01 13:04   ` Anton Johansson via
2023-01-31 22:56 ` [PATCH v5 05/14] Hexagon (target/hexagon) Analyze packet before generating TCG Taylor Simpson
2023-02-23 17:02   ` Anton Johansson via
2023-03-02  5:01     ` Taylor Simpson
2023-01-31 22:56 ` [PATCH v5 06/14] Hexagon (target/hexagon) Don't set pkt_has_store_s1 when not needed Taylor Simpson
2023-02-16 12:46   ` Anton Johansson via
2023-01-31 22:56 ` [PATCH v5 07/14] Hexagon (target/hexagon) Analyze packet for HVX Taylor Simpson
2023-02-16 13:09   ` Anton Johansson via
2023-01-31 22:56 ` [PATCH v5 08/14] Hexagon (tests/tcg/hexagon) Update preg_alias.c Taylor Simpson
2023-02-16 13:11   ` Anton Johansson via
2023-01-31 22:56 ` [PATCH v5 09/14] Hexagon (tests/tcg/hexagon) Remove __builtin from scatter_gather Taylor Simpson
2023-02-16 13:46   ` Anton Johansson via
2023-01-31 22:56 ` [PATCH v5 10/14] Hexagon (tests/tcg/hexagon) Enable HVX tests Taylor Simpson
2023-02-08 12:54   ` Anton Johansson via
2023-02-08 15:18     ` Taylor Simpson
2023-02-08 20:29       ` Taylor Simpson
2023-03-03 15:46         ` Anton Johansson via
2023-01-31 22:56 ` [PATCH v5 11/14] Hexagon (target/hexagon) Change subtract from zero to change sign Taylor Simpson
2023-02-16 13:45   ` Anton Johansson via
2023-01-31 22:56 ` [PATCH v5 12/14] Hexagon (target/hexagon) Remove gen_log_predicated_reg_write[_pair] Taylor Simpson
2023-02-24 13:05   ` Anton Johansson via [this message]
2023-02-27 23:40     ` Taylor Simpson
2023-01-31 22:56 ` [PATCH v5 13/14] Hexagon (target/hexagon) Reduce manipulation of slot_cancelled Taylor Simpson
2023-02-24 14:24   ` Anton Johansson via
2023-03-02  4:55     ` Taylor Simpson
2023-01-31 22:56 ` [PATCH v5 14/14] Hexagon (target/hexagon) Improve code gen for predicated HVX instructions Taylor Simpson
2023-02-24 14:30   ` Anton Johansson via

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=60f644b7-bdd3-0161-2156-75ee9039316b@rev.ng \
    --to=qemu-devel@nongnu.org \
    --cc=ale@rev.ng \
    --cc=anjo@rev.ng \
    --cc=bcain@quicinc.com \
    --cc=philmd@linaro.org \
    --cc=quic_mathbern@quicinc.com \
    --cc=richard.henderson@linaro.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 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.