From dd577f5ea5b276887ded171e16bd692e16c99511 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 7 Feb 2018 09:57:37 -0500 Subject: [PATCH] target/arm: Change the type of vfp.regs Backports commit 3f68b8a5a6862f856524bb347bf348ae364dd43c from qemu --- qemu/target-arm/cpu.h | 2 +- qemu/target-arm/translate-a64.c | 8 ++++---- qemu/target-arm/translate.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qemu/target-arm/cpu.h b/qemu/target-arm/cpu.h index 732b8c32..0c39b783 100644 --- a/qemu/target-arm/cpu.h +++ b/qemu/target-arm/cpu.h @@ -286,7 +286,7 @@ typedef struct CPUARMState { * the two execution states, and means we do not need to explicitly * map these registers when changing states. */ - float64 regs[64]; + uint64_t regs[64]; uint32_t xregs[16]; /* We store these fpcsr fields separately for convenience. */ diff --git a/qemu/target-arm/translate-a64.c b/qemu/target-arm/translate-a64.c index 77437def..4a169ad4 100644 --- a/qemu/target-arm/translate-a64.c +++ b/qemu/target-arm/translate-a64.c @@ -144,12 +144,12 @@ void aarch64_cpu_dump_state(CPUState *cs, FILE *f, 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]); + uint64_t vlo = env->vfp.regs[i * 2]; + uint64_t vhi = env->vfp.regs[(i * 2) + 1]; cpu_fprintf(f, "q%02d=%016" PRIx64 ":%016" PRIx64 " ", i, vhi, vlo); - vlo = float64_val(env->vfp.regs[(i + 1) * 2]); - vhi = float64_val(env->vfp.regs[((i + 1) * 2) + 1]); + vlo = env->vfp.regs[(i + 1) * 2]; + vhi = env->vfp.regs[((i + 1) * 2) + 1]; cpu_fprintf(f, "q%02d=%016" PRIx64 ":%016" PRIx64 "\n", i + 1, vhi, vlo); } diff --git a/qemu/target-arm/translate.c b/qemu/target-arm/translate.c index 9db59a2d..017bd47b 100644 --- a/qemu/target-arm/translate.c +++ b/qemu/target-arm/translate.c @@ -11731,7 +11731,7 @@ void arm_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, numvfpregs += 16; } for (i = 0; i < numvfpregs; i++) { - uint64_t v = float64_val(env->vfp.regs[i]); + uint64_t v = env->vfp.regs[i]; cpu_fprintf(f, "s%02d=%08x s%02d=%08x d%02d=%016" PRIx64 "\n", i * 2, (uint32_t)v, i * 2 + 1, (uint32_t)(v >> 32),