From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PULL 1/2] target/alpha: Clean up alpha_cpu_dump_state
Date: Sun, 19 May 2019 07:37:01 -0700 [thread overview]
Message-ID: <20190519143702.5587-2-richard.henderson@linaro.org> (raw)
In-Reply-To: <20190519143702.5587-1-richard.henderson@linaro.org>
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>
---
target/alpha/helper.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/target/alpha/helper.c b/target/alpha/helper.c
index 5fe9c87912..74a62c3d7b 100644
--- a/target/alpha/helper.c
+++ b/target/alpha/helper.c
@@ -435,32 +435,33 @@ bool alpha_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags)
{
- static const char *linux_reg_names[] = {
- "v0 ", "t0 ", "t1 ", "t2 ", "t3 ", "t4 ", "t5 ", "t6 ",
- "t7 ", "s0 ", "s1 ", "s2 ", "s3 ", "s4 ", "s5 ", "fp ",
- "a0 ", "a1 ", "a2 ", "a3 ", "a4 ", "a5 ", "t8 ", "t9 ",
- "t10", "t11", "ra ", "t12", "at ", "gp ", "sp ", "zero",
+ static const char linux_reg_names[31][4] = {
+ "v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6",
+ "t7", "s0", "s1", "s2", "s3", "s4", "s5", "fp",
+ "a0", "a1", "a2", "a3", "a4", "a5", "t8", "t9",
+ "t10", "t11", "ra", "t12", "at", "gp", "sp"
};
AlphaCPU *cpu = ALPHA_CPU(cs);
CPUAlphaState *env = &cpu->env;
int i;
- 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));
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),
(i % 3) == 2 ? '\n' : ' ');
}
- qemu_fprintf(f, "lock_a " TARGET_FMT_lx " lock_v " TARGET_FMT_lx "\n",
+ qemu_fprintf(f, "lock_a " TARGET_FMT_lx " lock_v " TARGET_FMT_lx "\n",
env->lock_addr, env->lock_value);
if (flags & CPU_DUMP_FPU) {
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' : ' ');
}
+ qemu_fprintf(f, "fpcr %016" PRIx64 "\n", cpu_alpha_load_fpcr(env));
}
qemu_fprintf(f, "\n");
}
--
2.17.1
next prev parent reply other threads:[~2019-05-19 14:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-19 14:37 [Qemu-devel] [PULL 0/2] target/alpha: Fix user-only floating-point exceptions Richard Henderson
2019-05-19 14:37 ` Richard Henderson [this message]
2019-05-19 14:37 ` [Qemu-devel] [PULL 2/2] " Richard Henderson
2019-05-20 11:42 ` [Qemu-devel] [PULL 0/2] " Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190519143702.5587-2-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).