@samitouri / QOSamiQemu / commits / ef259446d1

target/hexagon: Fix badva reference, delete CAUSE

The BADVA reg is referred to with the wrong identifier. The CAUSE reg field of SSR is not yet modeled, we will dump the SSR in a subsequent commit. Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> 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:27 UTC ef259446d157299c259ae57ae5987280b7f97f0f
1 file changed +9 -2
target/hexagon/cpu.c
+9 -2
@@ -110,6 +110,14 @@ static void print_reg(FILE *f, CPUHexagonState *env, int regnum)
110 hexagon_regnames[regnum], value);
111 }
112
113 +#ifndef CONFIG_USER_ONLY
114 +static void print_t_sreg(FILE *f, const CPUHexagonState *env, int regnum)
115 +{
116 + qemu_fprintf(f, " %s = 0x" TARGET_FMT_lx "\n",
117 + hexagon_sregnames[regnum], env->t_sreg[regnum]);
118 +}
119 +#endif
120 +
121 static void print_vreg(FILE *f, CPUHexagonState *env, int regnum,
122 bool skip_if_zero)
123 {
@@ -209,8 +217,7 @@ static void hexagon_dump(CPUHexagonState *env, FILE *f, int flags)
217 qemu_fprintf(f, " cs0 = 0x00000000\n");
218 qemu_fprintf(f, " cs1 = 0x00000000\n");
219 #else
212 - print_reg(f, env, HEX_REG_CAUSE);
213 - print_reg(f, env, HEX_REG_BADVA);
220 + print_t_sreg(f, env, HEX_SREG_BADVA);
221 print_reg(f, env, HEX_REG_CS0);
222 print_reg(f, env, HEX_REG_CS1);
223 #endif