mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-17 15:12:07 -06:00
target/arm: Handle SME in aarch64_cpu_dump_state
Dump SVCR, plus use the correct access check for Streaming Mode. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220708151540.18136-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
63b38f6c85
commit
7a867dd57a
1 changed files with 16 additions and 1 deletions
|
@ -878,6 +878,7 @@ static void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
||||||
int i;
|
int i;
|
||||||
int el = arm_current_el(env);
|
int el = arm_current_el(env);
|
||||||
const char *ns_status;
|
const char *ns_status;
|
||||||
|
bool sve;
|
||||||
|
|
||||||
qemu_fprintf(f, " PC=%016" PRIx64 " ", env->pc);
|
qemu_fprintf(f, " PC=%016" PRIx64 " ", env->pc);
|
||||||
for (i = 0; i < 32; i++) {
|
for (i = 0; i < 32; i++) {
|
||||||
|
@ -904,6 +905,12 @@ static void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
||||||
el,
|
el,
|
||||||
psr & PSTATE_SP ? 'h' : 't');
|
psr & PSTATE_SP ? 'h' : 't');
|
||||||
|
|
||||||
|
if (cpu_isar_feature(aa64_sme, cpu)) {
|
||||||
|
qemu_fprintf(f, " SVCR=%08" PRIx64 " %c%c",
|
||||||
|
env->svcr,
|
||||||
|
(FIELD_EX64(env->svcr, SVCR, ZA) ? 'Z' : '-'),
|
||||||
|
(FIELD_EX64(env->svcr, SVCR, SM) ? 'S' : '-'));
|
||||||
|
}
|
||||||
if (cpu_isar_feature(aa64_bti, cpu)) {
|
if (cpu_isar_feature(aa64_bti, cpu)) {
|
||||||
qemu_fprintf(f, " BTYPE=%d", (psr & PSTATE_BTYPE) >> 10);
|
qemu_fprintf(f, " BTYPE=%d", (psr & PSTATE_BTYPE) >> 10);
|
||||||
}
|
}
|
||||||
|
@ -918,7 +925,15 @@ static void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
||||||
qemu_fprintf(f, " FPCR=%08x FPSR=%08x\n",
|
qemu_fprintf(f, " FPCR=%08x FPSR=%08x\n",
|
||||||
vfp_get_fpcr(env), vfp_get_fpsr(env));
|
vfp_get_fpcr(env), vfp_get_fpsr(env));
|
||||||
|
|
||||||
if (cpu_isar_feature(aa64_sve, cpu) && sve_exception_el(env, el) == 0) {
|
if (cpu_isar_feature(aa64_sme, cpu) && FIELD_EX64(env->svcr, SVCR, SM)) {
|
||||||
|
sve = sme_exception_el(env, el) == 0;
|
||||||
|
} else if (cpu_isar_feature(aa64_sve, cpu)) {
|
||||||
|
sve = sve_exception_el(env, el) == 0;
|
||||||
|
} else {
|
||||||
|
sve = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sve) {
|
||||||
int j, zcr_len = sve_vqm1_for_el(env, el);
|
int j, zcr_len = sve_vqm1_for_el(env, el);
|
||||||
|
|
||||||
for (i = 0; i <= FFR_PRED_NUM; i++) {
|
for (i = 0; i <= FFR_PRED_NUM; i++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue