> -----Original Message-----
> From: ltaylorsimp...@gmail.com <ltaylorsimp...@gmail.com>
> Sent: Wednesday, April 16, 2025 8:45 AM
> To: 'Philippe Mathieu-Daudé' <phi...@linaro.org>; qemu-
> de...@nongnu.org
> Cc: brian.c...@oss.qualcomm.com; quic_mathb...@quicinc.com;
> sidn...@quicinc.com; quic_mlie...@quicinc.com;
> richard.hender...@linaro.org; a...@rev.ng; a...@rev.ng
> Subject: RE: [PATCH] Hexagon (target/hexagon) Remove
> gen_tcg_func_table.py
> 
> 
> 
> > -----Original Message-----
> > From: Philippe Mathieu-Daudé <phi...@linaro.org>
> > Sent: Wednesday, April 16, 2025 12:18 AM
> > To: Taylor Simpson <ltaylorsimp...@gmail.com>; qemu-
> de...@nongnu.org
> > Cc: brian.c...@oss.qualcomm.com; quic_mathb...@quicinc.com;
> > sidn...@quicinc.com; quic_mlie...@quicinc.com;
> > richard.hender...@linaro.org; a...@rev.ng; a...@rev.ng
> > Subject: Re: [PATCH] Hexagon (target/hexagon) Remove
> > gen_tcg_func_table.py
> >
> > Hi Taylor,
> >
> > On 16/4/25 01:55, Taylor Simpson wrote:
> > > This can easily be done in C with opcodes_def_generated.h.inc
> > >
> > > Signed-off-by: Taylor Simpson <ltaylorsimp...@gmail.com>
> > > ---
> > >   target/hexagon/genptr.c              |  6 ++-
> > >   target/hexagon/README                |  1 -
> > >   target/hexagon/gen_tcg_func_table.py | 66 ----------------------------
> > >   target/hexagon/meson.build           | 10 -----
> > >   4 files changed, 5 insertions(+), 78 deletions(-)
> > >   delete mode 100755 target/hexagon/gen_tcg_func_table.py
> > >
> > > diff --git a/target/hexagon/gen_tcg_func_table.py
> > > b/target/hexagon/gen_tcg_func_table.py
> > > deleted file mode 100755
> > > index 299a39b1aa..0000000000
> > > --- a/target/hexagon/gen_tcg_func_table.py
> > > -        f.write("const SemanticInsn opcode_genptr[XX_LAST_OPCODE] =
> > {\n")
> > > -        for tag in hex_common.tags:
> > > -            ## Skip the priv instructions
> > > -            if "A_PRIV" in hex_common.attribdict[tag]:
> > > -                continue
> > > -            ## Skip the guest instructions
> > > -            if "A_GUEST" in hex_common.attribdict[tag]:
> > > -                continue
> > > -            ## Skip the diag instructions
> > > -            if tag == "Y6_diag":
> > > -                continue
> > > -            if tag == "Y6_diag0":
> > > -                continue
> > > -            if tag == "Y6_diag1":
> > > -                continue
> >
> > What about all these skipped tags? IIUC gen_opcodes_def.py doesn't
> > skip them. If it isn't necessary to skip, please mention it in the
> > commit description for clarity.
> >
> > Regards,
> >
> > Phil.

I looked into this.  There aren't any instructions currently in the code that 
would be skipped by this logic.  Perhaps this logic was needed at one point in 
time but is no longer needed because those instructions were removed at some 
point.

I recall that Brian consolidated the logic to decide which instructions to skip 
into a single function in hex_common.py as part of the system mode patch 
series.  So, I'll go ahead and add a comment to the commit description as you 
suggest.

Thanks,
Taylor



Reply via email to