@samitouri / QOSamiQemu / commits / 60e435ddde

target/hexagon: Define system, guest reg names

Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>

Brian Cain committed Jun 22, 2026 at 15:28 UTC 60e435ddde3088e40cea080ba1591cd6c89cb9ec
2 files changed +33
target/hexagon/cpu.c
+29
@@ -86,6 +86,35 @@ const char * const hexagon_regnames[TOTAL_PER_THREAD_REGS] = {
86 "c24", "c25", "c26", "c27", "c28", "c29", "c30", "c31",
87 };
88
89 +#ifndef CONFIG_USER_ONLY
90 +const char * const hexagon_sregnames[] = {
91 + "sgp0", "sgp1", "stid", "elr", "badva0",
92 + "badva1", "ssr", "ccr", "htid", "badva",
93 + "imask", "gevb", "vwctrl", "s13", "s14",
94 + "s15", "evb", "modectl", "syscfg", "segment",
95 + "ipendad", "vid", "vid1", "bestwait", "s24",
96 + "schedcfg", "s26", "cfgbase", "diag", "rev",
97 + "pcyclelo", "pcyclehi", "isdbst", "isdbcfg0", "isdbcfg1",
98 + "livelock", "brkptpc0", "brkptcfg0", "brkptpc1", "brkptcfg1",
99 + "isdbmbxin", "isdbmbxout", "isdben", "isdbgpr", "pmucnt4",
100 + "pmucnt5", "pmucnt6", "pmucnt7", "pmucnt0", "pmucnt1",
101 + "pmucnt2", "pmucnt3", "pmuevtcfg", "pmustid0", "pmuevtcfg1",
102 + "pmustid1", "timerlo", "timerhi", "pmucfg", "s59",
103 + "s60", "s61", "s62", "s63",
104 +};
105 +
106 +G_STATIC_ASSERT(NUM_SREGS == ARRAY_SIZE(hexagon_sregnames));
107 +
108 +const char * const hexagon_gregnames[] = {
109 + "gelr", "gsr", "gosp", "gbadva", "gcommit1t",
110 + "gcommit2t", "gcommit3t", "gcommit4t", "gcommit5t", "gcommit6t",
111 + "gpcycle1t", "gpcycle2t", "gpcycle3t", "gpcycle4t", "gpcycle5t",
112 + "gpcycle6t", "gpmucnt4", "gpmucnt5", "gpmucnt6", "gpmucnt7",
113 + "gcommit7t", "gcommit8t", "gpcycle7t", "gpcycle8t", "gpcyclelo",
114 + "gpcyclehi", "gpmucnt0", "gpmucnt1", "gpmucnt2", "gpmucnt3",
115 + "g30", "g31",
116 +};
117 +#endif
118 /*
119 * One of the main debugging techniques is to use "-d cpu" and compare against
120 * LLDB output when single stepping. However, the target and qemu put the
target/hexagon/internal.h
+4
@@ -30,6 +30,10 @@ void hexagon_debug_qreg(CPUHexagonState *env, int regnum);
30 void hexagon_debug(CPUHexagonState *env);
31
32 extern const char * const hexagon_regnames[TOTAL_PER_THREAD_REGS];
33 +#ifndef CONFIG_USER_ONLY
34 +extern const char * const hexagon_sregnames[];
35 +extern const char * const hexagon_gregnames[];
36 +#endif
37
38 void G_NORETURN do_raise_exception(CPUHexagonState *env,
39 uint32_t exception,