mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
target/alpha: Clean up alpha_cpu_dump_state
Drop the "RI" and "FIR" prefixes; use only the normal linux names. Add the FPCR to the dump. Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
1b46b4daa6
commit
4a24793290
1 changed files with 10 additions and 9 deletions
|
@ -435,11 +435,11 @@ bool alpha_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||||
|
|
||||||
void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
||||||
{
|
{
|
||||||
static const char *linux_reg_names[] = {
|
static const char linux_reg_names[31][4] = {
|
||||||
"v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6",
|
"v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6",
|
||||||
"t7", "s0", "s1", "s2", "s3", "s4", "s5", "fp",
|
"t7", "s0", "s1", "s2", "s3", "s4", "s5", "fp",
|
||||||
"a0", "a1", "a2", "a3", "a4", "a5", "t8", "t9",
|
"a0", "a1", "a2", "a3", "a4", "a5", "t8", "t9",
|
||||||
"t10", "t11", "ra ", "t12", "at ", "gp ", "sp ", "zero",
|
"t10", "t11", "ra", "t12", "at", "gp", "sp"
|
||||||
};
|
};
|
||||||
AlphaCPU *cpu = ALPHA_CPU(cs);
|
AlphaCPU *cpu = ALPHA_CPU(cs);
|
||||||
CPUAlphaState *env = &cpu->env;
|
CPUAlphaState *env = &cpu->env;
|
||||||
|
@ -448,7 +448,7 @@ void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
||||||
qemu_fprintf(f, "PC " TARGET_FMT_lx " PS %02x\n",
|
qemu_fprintf(f, "PC " TARGET_FMT_lx " PS %02x\n",
|
||||||
env->pc, extract32(env->flags, ENV_FLAG_PS_SHIFT, 8));
|
env->pc, extract32(env->flags, ENV_FLAG_PS_SHIFT, 8));
|
||||||
for (i = 0; i < 31; i++) {
|
for (i = 0; i < 31; i++) {
|
||||||
qemu_fprintf(f, "IR%02d %s " TARGET_FMT_lx "%c", i,
|
qemu_fprintf(f, "%-8s" TARGET_FMT_lx "%c",
|
||||||
linux_reg_names[i], cpu_alpha_load_gr(env, i),
|
linux_reg_names[i], cpu_alpha_load_gr(env, i),
|
||||||
(i % 3) == 2 ? '\n' : ' ');
|
(i % 3) == 2 ? '\n' : ' ');
|
||||||
}
|
}
|
||||||
|
@ -458,9 +458,10 @@ void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
||||||
|
|
||||||
if (flags & CPU_DUMP_FPU) {
|
if (flags & CPU_DUMP_FPU) {
|
||||||
for (i = 0; i < 31; i++) {
|
for (i = 0; i < 31; i++) {
|
||||||
qemu_fprintf(f, "FIR%02d %016" PRIx64 "%c", i, env->fir[i],
|
qemu_fprintf(f, "f%-7d%016" PRIx64 "%c", i, env->fir[i],
|
||||||
(i % 3) == 2 ? '\n' : ' ');
|
(i % 3) == 2 ? '\n' : ' ');
|
||||||
}
|
}
|
||||||
|
qemu_fprintf(f, "fpcr %016" PRIx64 "\n", cpu_alpha_load_fpcr(env));
|
||||||
}
|
}
|
||||||
qemu_fprintf(f, "\n");
|
qemu_fprintf(f, "\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue