On Fri, Feb 27, 2026 at 1:36 PM Brian Cain <[email protected]> wrote:
> From: Brian Cain <[email protected]> > > Signed-off-by: Brian Cain <[email protected]> > --- > target/hexagon/gen_analyze_funcs.py | 21 +++- > target/hexagon/hex_common.py | 161 ++++++++++++++++++++++++++++ > 2 files changed, 179 insertions(+), 3 deletions(-) > > diff --git a/target/hexagon/gen_analyze_funcs.py > b/target/hexagon/gen_analyze_funcs.py > index fdefd5b4b36..985386c1309 100755 > --- a/target/hexagon/gen_analyze_funcs.py > +++ b/target/hexagon/gen_analyze_funcs.py > @@ -22,6 +22,8 @@ > import string > import hex_common > > +def has_analyze_func(reg, mode): > + return callable(getattr(reg, f"analyze_{mode}", None)) > Is this check needed? Why not make sure every reg has the needed analyze function? > > > diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py > index 63f83a8de2a..b5ab2efa5a5 100755 > --- a/target/hexagon/hex_common.py > +++ b/target/hexagon/hex_common.py > +class GuestRegister(Register): > + def gen_check_impl(self, f, regno): > + if self.is_written(): > + f.write(code_fmt(f"""\ > + if (!greg_writable(insn->regno[{regno}], > + {str(self.is_pair()).lower()})) {{ > + return; > + }} > + """)) > + else: > + f.write(code_fmt(f"""\ > + check_greg_impl(insn->regno[{regno}], > + {str(self.is_pair()).lower()}); > + """)) > What is gen_check_impl used for? Otherwise Reviewed-by: Taylor Simpson <[email protected]>
