Commit a94a6abff47685e33caf332b55f45e02ab2d8a55

Authored by pbrook
1 parent c688a6eb

Fix ARM VFP debugging dumps.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2201 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 10 additions and 3 deletions
target-arm/translate.c
... ... @@ -2542,6 +2542,12 @@ void cpu_dump_state(CPUState *env, FILE *f,
2542 2542 float s;
2543 2543 } s0, s1;
2544 2544 CPU_DoubleU d;
  2545 + /* ??? This assumes float64 and double have the same layout.
  2546 + Oh well, it's only debug dumps. */
  2547 + union {
  2548 + float64 f64;
  2549 + double d;
  2550 + } d0;
2545 2551 uint32_t psr;
2546 2552  
2547 2553 for(i=0;i<16;i++) {
... ... @@ -2565,11 +2571,12 @@ void cpu_dump_state(CPUState *env, FILE *f,
2565 2571 d.d = env->vfp.regs[i];
2566 2572 s0.i = d.l.lower;
2567 2573 s1.i = d.l.upper;
2568   - cpu_fprintf(f, "s%02d=%08x(%8f) s%02d=%08x(%8f) d%02d=%08x%08x(%8f)\n",
  2574 + d0.f64 = d.d;
  2575 + cpu_fprintf(f, "s%02d=%08x(%8g) s%02d=%08x(%8g) d%02d=%08x%08x(%8g)\n",
2569 2576 i * 2, (int)s0.i, s0.s,
2570   - i * 2 + 1, (int)s0.i, s0.s,
  2577 + i * 2 + 1, (int)s1.i, s1.s,
2571 2578 i, (int)(uint32_t)d.l.upper, (int)(uint32_t)d.l.lower,
2572   - d.d);
  2579 + d0.d);
2573 2580 }
2574 2581 cpu_fprintf(f, "FPSCR: %08x\n", (int)env->vfp.xregs[ARM_VFP_FPSCR]);
2575 2582 }
... ...