Revision 36d23958 gdbstub.c

b/gdbstub.c
568 568
    *(uint32_t *)ptr = tswapl(env->PC);
569 569
    ptr += 4;
570 570

  
571
#ifdef MIPS_USES_FPU
572
    for (i = 0; i < 32; i++)
571
    if (env->CP0_Config1 & (1 << CP0C1_FP))
573 572
      {
574
        *(uint32_t *)ptr = tswapl(FPR_W (env, i));
575
        ptr += 4;
576
      }
573
        for (i = 0; i < 32; i++)
574
          {
575
            *(uint32_t *)ptr = tswapl(FPR_W (env, i));
576
            ptr += 4;
577
          }
577 578

  
578
    *(uint32_t *)ptr = tswapl(env->fcr31);
579
    ptr += 4;
579
        *(uint32_t *)ptr = tswapl(env->fcr31);
580
        ptr += 4;
580 581

  
581
    *(uint32_t *)ptr = tswapl(env->fcr0);
582
    ptr += 4;
583
#endif
582
        *(uint32_t *)ptr = tswapl(env->fcr0);
583
        ptr += 4;
584
      }
584 585

  
585 586
    /* 32 FP registers, fsr, fir, fp.  Not yet implemented.  */
586 587
    /* what's 'fp' mean here?  */
......
629 630
    env->PC = tswapl(*(uint32_t *)ptr);
630 631
    ptr += 4;
631 632

  
632
#ifdef MIPS_USES_FPU
633
    for (i = 0; i < 32; i++)
633
    if (env->CP0_Config1 & (1 << CP0C1_FP))
634 634
      {
635
	FPR_W (env, i) = tswapl(*(uint32_t *)ptr);
636
        ptr += 4;
637
      }
635
        for (i = 0; i < 32; i++)
636
          {
637
            FPR_W (env, i) = tswapl(*(uint32_t *)ptr);
638
            ptr += 4;
639
          }
638 640

  
639
    env->fcr31 = tswapl(*(uint32_t *)ptr) & 0x0183FFFF;
640
    ptr += 4;
641
        env->fcr31 = tswapl(*(uint32_t *)ptr) & 0x0183FFFF;
642
        ptr += 4;
641 643

  
642
    env->fcr0 = tswapl(*(uint32_t *)ptr);
643
    ptr += 4;
644
        env->fcr0 = tswapl(*(uint32_t *)ptr);
645
        ptr += 4;
644 646

  
645
    /* set rounding mode */
646
    RESTORE_ROUNDING_MODE;
647
        /* set rounding mode */
648
        RESTORE_ROUNDING_MODE;
647 649

  
648 650
#ifndef CONFIG_SOFTFLOAT
649
    /* no floating point exception for native float */
650
    SET_FP_ENABLE(env->fcr31, 0);
651
#endif
651
        /* no floating point exception for native float */
652
        SET_FP_ENABLE(env->fcr31, 0);
652 653
#endif
654
      }
653 655
}
654 656
#elif defined (TARGET_SH4)
655 657
static int cpu_gdb_read_registers(CPUState *env, uint8_t *mem_buf)

Also available in: Unified diff