qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: <ltaylorsimpson@gmail.com>
To: "'Matheus Tavares Bernardino'" <quic_mathbern@quicinc.com>
Cc: <qemu-devel@nongnu.org>, <bcain@quicinc.com>,
	<sidneym@quicinc.com>, <quic_mliebel@quicinc.com>,
	<richard.henderson@linaro.org>, <philmd@linaro.org>, <ale@rev.ng>,
	<anjo@rev.ng>
Subject: RE: [PATCH 2/9] Hexagon (target/hexagon) Mark new_read_idx in trans functions
Date: Tue, 27 Feb 2024 09:50:54 -0600	[thread overview]
Message-ID: <022501da6994$bf6ba4b0$3e42ee10$@gmail.com> (raw)
In-Reply-To: <20240227141938.63106-1-quic_mathbern@quicinc.com>



> -----Original Message-----
> From: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
> Sent: Tuesday, February 27, 2024 8:20 AM
> To: Taylor Simpson <ltaylorsimpson@gmail.com>
> Cc: qemu-devel@nongnu.org; bcain@quicinc.com;
> quic_mathbern@quicinc.com; sidneym@quicinc.com;
> quic_mliebel@quicinc.com; richard.henderson@linaro.org;
> philmd@linaro.org; ale@rev.ng; anjo@rev.ng
> Subject: Re: [PATCH 2/9] Hexagon (target/hexagon) Mark new_read_idx in
> trans functions
> 
> On Mon, 26 Feb 2024 13:17:15 -0700 Taylor Simpson
> <ltaylorsimpson@gmail.com> wrote:
> >
> > diff --git a/target/hexagon/gen_trans_funcs.py
> > b/target/hexagon/gen_trans_funcs.py
> > index 53e844a44b..79475b2946 100755
> > --- a/target/hexagon/gen_trans_funcs.py
> > +++ b/target/hexagon/gen_trans_funcs.py
> > @@ -84,14 +84,15 @@ def gen_trans_funcs(f):
> >                  insn->opcode = {tag};
> >          """))
> >
> > -        regno = 0
> > -        for reg in regs:
> > -            reg_type = reg[0]
> > -            reg_id = reg[1]
> > +        new_read_idx = -1
> > +        for regno, regstruct in enumerate(regs):
> > +            reg_type, reg_id, _, _ = regstruct
> > +            reg = hex_common.get_register(tag, reg_type, reg_id)
> 
> Nit: since we don't care about the remaining elements of regstruct, we
could
> simplify (and future-proof) this even further to:
> 
>     reg_type, reg_id, *_ = regstruct
> 
> Or perhaps even eliminate the variable entirely:
> 
>     for regno, (reg_type, reg_id, *_) in enumerate(regs):
>         ...

Let's go with the second option.  I'll make the change.

Thanks,
Taylor




  reply	other threads:[~2024-02-27 15:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 20:17 [PATCH 0/9] Hexagon (target/hexagon) Clean up .new decode and scripts Taylor Simpson
2024-02-26 20:17 ` [PATCH 1/9] Hexagon (target/hexagon) Add is_old/is_new to Register class Taylor Simpson
2024-02-29 11:04   ` Philippe Mathieu-Daudé
2024-02-26 20:17 ` [PATCH 2/9] Hexagon (target/hexagon) Mark new_read_idx in trans functions Taylor Simpson
2024-02-27 14:19   ` Matheus Tavares Bernardino
2024-02-27 15:50     ` ltaylorsimpson [this message]
2024-02-26 20:17 ` [PATCH 3/9] Hexagon (target/hexagon) Mark dest_idx " Taylor Simpson
2024-02-27 14:20   ` Matheus Tavares Bernardino
2024-02-26 20:17 ` [PATCH 4/9] Hexagon (target/hexagon) Mark has_pred_dest " Taylor Simpson
2024-02-27 14:21   ` Matheus Tavares Bernardino
2024-02-27 15:50     ` ltaylorsimpson
2024-02-26 20:17 ` [PATCH 5/9] Hexagon (tests/tcg/hexagon) Test HVX .new read from high half of pair Taylor Simpson
2024-02-26 20:17 ` [PATCH 6/9] Hexagon (target/hexagon) Remove uses of op_regs_generated.h.inc Taylor Simpson
2024-02-26 20:17 ` [PATCH 7/9] Hexagon (target/hexagon) Remove gen_op_regs.py Taylor Simpson
2024-02-26 20:17 ` [PATCH 8/9] Hexagon (target/hexagon) Remove gen_shortcode.py Taylor Simpson
2024-02-26 20:17 ` [PATCH 9/9] Hexagon (target/hexagon) Remove hex_common.read_attribs_file 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='022501da6994$bf6ba4b0$3e42ee10$@gmail.com' \
    --to=ltaylorsimpson@gmail.com \
    --cc=ale@rev.ng \
    --cc=anjo@rev.ng \
    --cc=bcain@quicinc.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quic_mathbern@quicinc.com \
    --cc=quic_mliebel@quicinc.com \
    --cc=richard.henderson@linaro.org \
    --cc=sidneym@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).