diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2018-05-10 20:38:23 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2018-05-18 14:52:38 -0700 |
commit | af6e5ea28f0b59097a1215e8d063acbb71361b37 (patch) | |
tree | 85c1eea96fff0461c66cc364e5bcb5a1f82f8d29 | |
parent | 86ea188012c26a724bfefe0fb9a838ce808993cc (diff) | |
download | qemu-af6e5ea28f0b59097a1215e8d063acbb71361b37.zip qemu-af6e5ea28f0b59097a1215e8d063acbb71361b37.tar.gz qemu-af6e5ea28f0b59097a1215e8d063acbb71361b37.tar.bz2 |
target/s390x: Honor CPU_DUMP_FPU
Also do not dump both "fpu" and "vector" registers
as the former overlaps the latter.
Cc: Alexander Graf <agraf@suse.de>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r-- | target/s390x/helper.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/target/s390x/helper.c b/target/s390x/helper.c index e8548f3..fd5791f 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -327,21 +327,22 @@ void s390_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, } } - for (i = 0; i < 16; i++) { - cpu_fprintf(f, "F%02d=%016" PRIx64, i, get_freg(env, i)->ll); - if ((i % 4) == 3) { - cpu_fprintf(f, "\n"); + if (flags & CPU_DUMP_FPU) { + if (s390_has_feat(S390_FEAT_VECTOR)) { + for (i = 0; i < 32; i++) { + cpu_fprintf(f, "V%02d=%016" PRIx64 "%016" PRIx64 "%c", + i, env->vregs[i][0].ll, env->vregs[i][1].ll, + i % 2 ? '\n' : ' '); + } } else { - cpu_fprintf(f, " "); + for (i = 0; i < 16; i++) { + cpu_fprintf(f, "F%02d=%016" PRIx64 "%c", + i, get_freg(env, i)->ll, + (i % 4) == 3 ? '\n' : ' '); + } } } - for (i = 0; i < 32; i++) { - cpu_fprintf(f, "V%02d=%016" PRIx64 "%016" PRIx64, i, - env->vregs[i][0].ll, env->vregs[i][1].ll); - cpu_fprintf(f, (i % 2) ? "\n" : " "); - } - #ifndef CONFIG_USER_ONLY for (i = 0; i < 16; i++) { cpu_fprintf(f, "C%02d=%016" PRIx64, i, env->cregs[i]); |