> -----Original Message-----
> From: Brian Cain <brian.c...@oss.qualcomm.com>
> Sent: Friday, February 28, 2025 11:29 PM
> To: qemu-devel@nongnu.org
> Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org;
> phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng;
> quic_mlie...@quicinc.com; ltaylorsimp...@gmail.com;
> alex.ben...@linaro.org; quic_mbur...@quicinc.com;
> sidn...@quicinc.com; Brian Cain <bc...@quicinc.com>
> Subject: [PATCH 32/39] target/hexagon: Define system, guest reg names
> 
> From: Brian Cain <bc...@quicinc.com>
> 
> Signed-off-by: Brian Cain <brian.c...@oss.qualcomm.com>
> ---
>  target/hexagon/internal.h |  2 ++
>  target/hexagon/cpu.c      | 29 +++++++++++++++++++++++++++++
>  2 files changed, 31 insertions(+)
> 
> diff --git a/target/hexagon/internal.h b/target/hexagon/internal.h index
> 120cfde7b9..fd2397b9ef 100644
> --- a/target/hexagon/internal.h
> +++ b/target/hexagon/internal.h
> @@ -34,6 +34,8 @@ void hexagon_debug_qreg(CPUHexagonState *env, int
> regnum);  void hexagon_debug(CPUHexagonState *env);
> 
>  extern const char * const hexagon_regnames[TOTAL_PER_THREAD_REGS];
> +extern const char * const hexagon_sregnames[]; extern const char *
> +const hexagon_gregnames[];

Guard these with #ifndef CONFIG_USER_ONLY


> 
>  void G_NORETURN do_raise_exception(CPUHexagonState *env,
>          uint32_t exception,
> diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index
> c7c470b099..3c4776232e 100644
> --- a/target/hexagon/cpu.c
> +++ b/target/hexagon/cpu.c
> @@ -85,6 +85,35 @@ const char * const
> hexagon_regnames[TOTAL_PER_THREAD_REGS] = {
>    "c24", "c25", "c26", "c27", "c28",  "c29", "c30", "c31",  };
> 
> +#ifndef CONFIG_USER_ONLY
> +const char * const hexagon_sregnames[] = {
> +    "sgp0",       "sgp1",       "stid",       "elr",        "badva0",
> +    "badva1",     "ssr",        "ccr",        "htid",       "badva",
> +    "imask",      "gevb",       "vwctrl",     "s13",        "s14",
> +    "s15",        "evb",        "modectl",    "syscfg",     "segment",
> +    "ipendad",    "vid",        "vid1",       "bestwait",   "s24",
> +    "schedcfg",   "s26",        "cfgbase",    "diag",       "rev",
> +    "pcyclelo",   "pcyclehi",   "isdbst",     "isdbcfg0",   "isdbcfg1",
> +    "livelock",   "brkptpc0",   "brkptcfg0",  "brkptpc1",   "brkptcfg1",
> +    "isdbmbxin",  "isdbmbxout", "isdben",     "isdbgpr",    "pmucnt4",
> +    "pmucnt5",    "pmucnt6",    "pmucnt7",    "pmucnt0",    "pmucnt1",
> +    "pmucnt2",    "pmucnt3",    "pmuevtcfg",  "pmustid0",   "pmuevtcfg1",
> +    "pmustid1",   "timerlo",    "timerhi",    "pmucfg",     "rgdr2",
> +    "rgdr",       "turkey",     "duck",       "chicken",

The last 5 names look strange and don't match what's in hex_regs.h.

Otherwise
Reviewed-by: Taylor Simpson <ltaylorsimp...@gmail.com>



Reply via email to