From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org, "Michael Matz" <matz@suse.de>,
"Alexander Graf" <agraf@suse.de>,
"Claudio Fontana" <claudio.fontana@linaro.org>,
"Dirk Mueller" <dmueller@suse.de>,
"Will Newton" <will.newton@linaro.org>,
"Laurent Desnogues" <laurent.desnogues@gmail.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
kvmarm@lists.cs.columbia.edu,
"Christoffer Dall" <christoffer.dall@linaro.org>,
"Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH 01/10] target-arm: A64: Add support for dumping AArch64 VFP register state
Date: Sat, 28 Dec 2013 21:49:02 +0000 [thread overview]
Message-ID: <1388267351-31818-2-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1388267351-31818-1-git-send-email-peter.maydell@linaro.org>
From: Alexander Graf <agraf@suse.de>
When dumping the current CPU state, we can also get a request
to dump the FPU state along with the CPU's integer state.
Add support to dump the VFP state when that flag is set, so that
we can properly debug code that modifies floating point registers.
Signed-off-by: Alexander Graf <agraf@suse.de>
[WN: Commit message tweak, rebased. Output all registers, two per-line.]
Signed-off-by: Will Newton <will.newton@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target-arm/translate-a64.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
index 40c6fc4..6f2b26e 100644
--- a/target-arm/translate-a64.c
+++ b/target-arm/translate-a64.c
@@ -119,6 +119,22 @@ void aarch64_cpu_dump_state(CPUState *cs, FILE *f,
psr & PSTATE_C ? 'C' : '-',
psr & PSTATE_V ? 'V' : '-');
cpu_fprintf(f, "\n");
+
+ if (flags & CPU_DUMP_FPU) {
+ int numvfpregs = 32;
+ for (i = 0; i < numvfpregs; i += 2) {
+ uint64_t vlo = float64_val(env->vfp.regs[i * 2]);
+ uint64_t vhi = float64_val(env->vfp.regs[(i * 2) + 1]);
+ cpu_fprintf(f, "q%02d.0=%016" PRIx64 ":%016" PRIx64 " ",
+ i, vlo, vhi);
+ vlo = float64_val(env->vfp.regs[(i + 1) * 2]);
+ vhi = float64_val(env->vfp.regs[((i + 1) * 2) + 1]);
+ cpu_fprintf(f, "q%02d.0=%016" PRIx64 ":%016" PRIx64 "\n",
+ i + 1, vlo, vhi);
+ }
+ cpu_fprintf(f, "FPCR: %08x FPSR: %08x\n",
+ vfp_get_fpcr(env), vfp_get_fpsr(env));
+ }
}
static int get_mem_index(DisasContext *s)
--
1.8.5
next prev parent reply other threads:[~2013-12-28 21:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-28 21:49 [Qemu-devel] [PATCH 00/10] A64 decoder patchset 5: most floating point Peter Maydell
2013-12-28 21:49 ` Peter Maydell [this message]
2013-12-30 14:58 ` [Qemu-devel] [PATCH 01/10] target-arm: A64: Add support for dumping AArch64 VFP register state Richard Henderson
2013-12-30 15:21 ` Peter Maydell
2013-12-28 21:49 ` [Qemu-devel] [PATCH 02/10] target-arm: A64: Fix vector register access on bigendian hosts Peter Maydell
2013-12-30 15:03 ` Richard Henderson
2013-12-30 15:28 ` Peter Maydell
2013-12-30 15:35 ` Richard Henderson
2013-12-28 21:49 ` [Qemu-devel] [PATCH 03/10] target-arm: Use VFP_BINOP macro for min, max, minnum, maxnum Peter Maydell
2013-12-30 15:04 ` Richard Henderson
2013-12-28 21:49 ` [Qemu-devel] [PATCH 04/10] target-arm: A64: Add "Floating-point data-processing (2 source)" insns Peter Maydell
2013-12-30 15:10 ` Richard Henderson
2013-12-28 21:49 ` [Qemu-devel] [PATCH 05/10] target-arm: A64: Add "Floating-point data-processing (3 " Peter Maydell
2013-12-30 15:15 ` Richard Henderson
2013-12-30 15:17 ` Richard Henderson
2013-12-28 21:49 ` [Qemu-devel] [PATCH 06/10] target-arm: A64: Add fmov (scalar, immediate) instruction Peter Maydell
2013-12-30 15:21 ` Richard Henderson
2013-12-28 21:49 ` [Qemu-devel] [PATCH 07/10] target-arm: A64: Add support for floating point compare Peter Maydell
2013-12-30 15:25 ` Richard Henderson
2013-12-28 21:49 ` [Qemu-devel] [PATCH 08/10] target-arm: A64: Add support for floating point conditional compare Peter Maydell
2013-12-30 15:27 ` Richard Henderson
2013-12-28 21:49 ` [Qemu-devel] [PATCH 09/10] target-arm: A64: Add support for floating point cond select Peter Maydell
2013-12-30 15:28 ` Richard Henderson
2013-12-28 21:49 ` [Qemu-devel] [PATCH 10/10] target-arm: Give the FPSCR rounding modes names Peter Maydell
2013-12-30 15:29 ` Richard Henderson
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=1388267351-31818-2-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=agraf@suse.de \
--cc=alex.bennee@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=claudio.fontana@linaro.org \
--cc=dmueller@suse.de \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=laurent.desnogues@gmail.com \
--cc=matz@suse.de \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=will.newton@linaro.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).