> -----Original Message----- > From: Brian Cain <[email protected]> > Sent: Friday, February 28, 2025 11:29 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 33/39] target/hexagon: initialize sys/guest reg TCGvs > > From: Brian Cain <[email protected]> > > Signed-off-by: Brian Cain <[email protected]> > --- > target/hexagon/translate.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index > ff881d1060..248ed60f29 100644 > --- a/target/hexagon/translate.c > +++ b/target/hexagon/translate.c > @@ -1295,6 +1295,26 @@ void hexagon_translate_init(void) > > opcode_init(); > > +#ifndef CONFIG_USER_ONLY > + for (i = 0; i < NUM_GREGS; i++) { > + hex_greg[i] = tcg_global_mem_new(tcg_env, > + offsetof(CPUHexagonState, greg[i]), > + hexagon_gregnames[i]); > + } > + hex_g_sreg_ptr = tcg_global_mem_new_ptr(tcg_env, > + offsetof(CPUHexagonState, g_sreg), "hex_g_sreg_ptr"); > + for (i = 0; i < NUM_SREGS; i++) { > + if (i < HEX_SREG_GLB_START) { > + hex_t_sreg[i] = tcg_global_mem_new(tcg_env, > + offsetof(CPUHexagonState, t_sreg[i]), > + hexagon_sregnames[i]); > + } else { > + hex_g_sreg[i] = tcg_global_mem_new(hex_g_sreg_ptr, > + i * sizeof(target_ulong), > + hexagon_sregnames[i]); I assume this will be changed with the redo of global resource handling > + } > + } > +#endif > for (i = 0; i < TOTAL_PER_THREAD_REGS; i++) { > hex_gpr[i] = tcg_global_mem_new(tcg_env, > offsetof(CPUHexagonState, gpr[i]), > -- > 2.34.1
