[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 6/9] target/s390x: Honor CPU_DUMP_FPU
From: |
David Hildenbrand |
Subject: |
Re: [Qemu-devel] [PATCH 6/9] target/s390x: Honor CPU_DUMP_FPU |
Date: |
Fri, 11 May 2018 08:57:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 11.05.2018 05:52, Richard Henderson wrote:
> Also do not dump both "fpu" and "vector" registers
> as the former overlaps the latter.
>
> Cc: Alexander Graf <address@hidden>
> Cc: David Hildenbrand <address@hidden>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> target/s390x/helper.c | 23 ++++++++++++-----------
> 1 file changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/target/s390x/helper.c b/target/s390x/helper.c
> index e8548f340a..fd5791f134 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)) {
CPU model should always be initialized at this point, so this check
actually returns the right thing.
Reviewed-by: David Hildenbrand <address@hidden>
> + 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]);
>
--
Thanks,
David / dhildenb
- Re: [Qemu-devel] [PATCH 1/9] target/alpha: Honor CPU_DUMP_FPU, (continued)
- [Qemu-devel] [PATCH 2/9] target/mips: Honor CPU_DUMP_FPU, Richard Henderson, 2018/05/10
- [Qemu-devel] [PATCH 3/9] target/ppc: Honor CPU_DUMP_FPU, Richard Henderson, 2018/05/10
- [Qemu-devel] [PATCH 4/9] target/riscv: Introduce cpu_riscv_get_fcsr, Richard Henderson, 2018/05/10
- [Qemu-devel] [PATCH 5/9] target/riscv: Honor CPU_DUMP_FPU, Richard Henderson, 2018/05/10
- [Qemu-devel] [PATCH 6/9] target/s390x: Honor CPU_DUMP_FPU, Richard Henderson, 2018/05/10
- Re: [Qemu-devel] [PATCH 6/9] target/s390x: Honor CPU_DUMP_FPU,
David Hildenbrand <=
- [Qemu-devel] [PATCH 9/9] target/xtensa: Honor CPU_DUMP_FPU, Richard Henderson, 2018/05/10
- [Qemu-devel] [PATCH 7/9] target/sparc: Honor CPU_DUMP_FPU, Richard Henderson, 2018/05/10
- [Qemu-devel] [PATCH 8/9] target/unicore32: Honor CPU_DUMP_FPU, Richard Henderson, 2018/05/10