> -----Original Message----- > From: Brian Cain <[email protected]> > Sent: Friday, February 28, 2025 11:26 PM > To: [email protected] > Cc: [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; Brian Cain <[email protected]> > Subject: [PATCH 15/38] target/hexagon: Add handlers for guest/sysreg r/w > > From: Brian Cain <[email protected]> > > This commit provides handlers to generate TCG for guest and system register > reads and writes. They will be leveraged by a future commit. > > Signed-off-by: Brian Cain <[email protected]> > --- > target/hexagon/genptr.c | 159 > ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 159 insertions(+) > > diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index > 2c5e15cfcf..488d0b4b97 100644 > --- a/target/hexagon/genptr.c > +++ b/target/hexagon/genptr.c > +G_GNUC_UNUSED > +static void gen_read_greg(TCGv dst, int reg_num) { > + gen_helper_greg_read(dst, tcg_env, tcg_constant_tl(reg_num)); } > + > +G_GNUC_UNUSED > +static void gen_read_greg_pair(TCGv_i64 dst, int reg_num) { > + gen_helper_greg_read_pair(dst, tcg_env, tcg_constant_tl(reg_num)); > +} #endif > + > + This will work, but G'regs 0:3 could be read more efficiently by reading from TCGv hex_greg rather than calling the helper. Otherwise Reviewed-by: Taylor Simpson <[email protected]>
