From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [PATCH 2/4] target/arm: Dump ZA[] when active
Date: Thu, 22 Jun 2023 17:11:59 +0200 [thread overview]
Message-ID: <20230622151201.1578522-3-richard.henderson@linaro.org> (raw)
In-Reply-To: <20230622151201.1578522-1-richard.henderson@linaro.org>
Always print each matrix row whole, one per line, so that we
get the entire matrix in the proper shape.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/cpu.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 7cb70f9727..3da811bc5e 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1082,6 +1082,24 @@ static void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags)
i, q[1], q[0], (i & 1 ? "\n" : " "));
}
}
+
+ if (cpu_isar_feature(aa64_sme, cpu) &&
+ FIELD_EX64(env->svcr, SVCR, ZA) &&
+ sme_exception_el(env, el) == 0) {
+ int zcr_len = sve_vqm1_for_el_sm(env, el, true);
+ int svl = (zcr_len + 1) * 16;
+ int svl_lg10 = svl < 100 ? 2 : 3;
+
+ for (i = 0; i < svl; i++) {
+ qemu_fprintf(f, "ZA[%0*d]=", svl_lg10, i);
+ for (j = zcr_len; j >= 0; --j) {
+ qemu_fprintf(f, "%016" PRIx64 ":%016" PRIx64 "%c",
+ env->zarray[i].d[2 * j + 1],
+ env->zarray[i].d[2 * j],
+ j ? ':' : '\n');
+ }
+ }
+ }
}
#else
--
2.34.1
next prev parent reply other threads:[~2023-06-22 15:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-22 15:11 [PATCH 0/4] target/arm: Fix SME full tile indexing Richard Henderson
2023-06-22 15:11 ` [PATCH 1/4] target/arm: Avoid splitting Zregs across lines in dump Richard Henderson
2023-06-27 12:51 ` Peter Maydell
2023-06-22 15:11 ` Richard Henderson [this message]
2023-06-27 12:51 ` [PATCH 2/4] target/arm: Dump ZA[] when active Peter Maydell
2023-06-22 15:12 ` [PATCH 3/4] target/arm: Support reading ZA[] from gdbstub Richard Henderson
2023-06-27 13:07 ` Peter Maydell
2023-06-27 13:29 ` Luis Machado
2023-06-22 15:12 ` [PATCH 4/4] target/arm: Fix SME full tile indexing Richard Henderson
2023-06-27 13:24 ` Peter Maydell
2023-06-27 13:36 ` [PATCH 0/4] " Peter Maydell
2023-06-28 6:54 ` 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=20230622151201.1578522-3-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).