diff options
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r-- | gdb/rs6000-nat.c | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 5fbf334..b80b5a5 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -159,8 +159,7 @@ regmap (int regno, int *isfloat) if (tdep->ppc_gp0_regnum <= regno && regno < tdep->ppc_gp0_regnum + ppc_num_gprs) return regno; - else if (tdep->ppc_fp0_regnum >= 0 - && tdep->ppc_fp0_regnum <= regno + else if (tdep->ppc_fp0_regnum <= regno && regno < tdep->ppc_fp0_regnum + ppc_num_fprs) { *isfloat = 1; @@ -178,8 +177,7 @@ regmap (int regno, int *isfloat) return CTR; else if (regno == tdep->ppc_xer_regnum) return XER; - else if (tdep->ppc_fpscr_regnum >= 0 - && regno == tdep->ppc_fpscr_regnum) + else if (regno == tdep->ppc_fpscr_regnum) return FPSCR; else if (tdep->ppc_mq_regnum >= 0 && regno == tdep->ppc_mq_regnum) return MQ; @@ -361,9 +359,8 @@ fetch_inferior_registers (int regno) } /* Read general purpose floating point registers. */ - if (tdep->ppc_fp0_regnum >= 0) - for (regno = 0; regno < ppc_num_fprs; regno++) - fetch_register (tdep->ppc_fp0_regnum + regno); + for (regno = 0; regno < ppc_num_fprs; regno++) + fetch_register (tdep->ppc_fp0_regnum + regno); /* Read special registers. */ fetch_register (PC_REGNUM); @@ -372,8 +369,7 @@ fetch_inferior_registers (int regno) fetch_register (tdep->ppc_lr_regnum); fetch_register (tdep->ppc_ctr_regnum); fetch_register (tdep->ppc_xer_regnum); - if (tdep->ppc_fpscr_regnum >= 0) - fetch_register (tdep->ppc_fpscr_regnum); + fetch_register (tdep->ppc_fpscr_regnum); if (tdep->ppc_mq_regnum >= 0) fetch_register (tdep->ppc_mq_regnum); } @@ -402,9 +398,8 @@ store_inferior_registers (int regno) } /* Write floating point registers. */ - if (tdep->ppc_fp0_regnum >= 0) - for (regno = 0; regno < ppc_num_fprs; regno++) - store_register (tdep->ppc_fp0_regnum + regno); + for (regno = 0; regno < ppc_num_fprs; regno++) + store_register (tdep->ppc_fp0_regnum + regno); /* Write special registers. */ store_register (PC_REGNUM); @@ -413,8 +408,7 @@ store_inferior_registers (int regno) store_register (tdep->ppc_lr_regnum); store_register (tdep->ppc_ctr_regnum); store_register (tdep->ppc_xer_regnum); - if (tdep->ppc_fpscr_regnum >= 0) - store_register (tdep->ppc_fpscr_regnum); + store_register (tdep->ppc_fpscr_regnum); if (tdep->ppc_mq_regnum >= 0) store_register (tdep->ppc_mq_regnum); } @@ -589,10 +583,9 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, for (regi = 0; regi < 32; regi++) supply_register (regi, (char *) ®s->r64.gpr[regi]); - if (tdep->ppc_fp0_regnum >= 0) - for (regi = 0; regi < 32; regi++) - supply_register (tdep->ppc_fp0_regnum + regi, - (char *) ®s->r64.fpr[regi]); + for (regi = 0; regi < 32; regi++) + supply_register (tdep->ppc_fp0_regnum + regi, + (char *) ®s->r64.fpr[regi]); supply_register (PC_REGNUM, (char *) ®s->r64.iar); supply_register (tdep->ppc_ps_regnum, (char *) ®s->r64.msr); @@ -600,18 +593,16 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, supply_register (tdep->ppc_lr_regnum, (char *) ®s->r64.lr); supply_register (tdep->ppc_ctr_regnum, (char *) ®s->r64.ctr); supply_register (tdep->ppc_xer_regnum, (char *) ®s->r64.xer); - if (tdep->ppc_fpscr_regnum >= 0) - supply_register (tdep->ppc_fpscr_regnum, (char *) ®s->r64.fpscr); + supply_register (tdep->ppc_fpscr_regnum, (char *) ®s->r64.fpscr); } else { for (regi = 0; regi < 32; regi++) supply_register (regi, (char *) ®s->r32.gpr[regi]); - if (tdep->ppc_fp0_regnum >= 0) - for (regi = 0; regi < 32; regi++) - supply_register (tdep->ppc_fp0_regnum + regi, - (char *) ®s->r32.fpr[regi]); + for (regi = 0; regi < 32; regi++) + supply_register (tdep->ppc_fp0_regnum + regi, + (char *) ®s->r32.fpr[regi]); supply_register (PC_REGNUM, (char *) ®s->r32.iar); supply_register (tdep->ppc_ps_regnum, (char *) ®s->r32.msr); @@ -619,8 +610,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, supply_register (tdep->ppc_lr_regnum, (char *) ®s->r32.lr); supply_register (tdep->ppc_ctr_regnum, (char *) ®s->r32.ctr); supply_register (tdep->ppc_xer_regnum, (char *) ®s->r32.xer); - if (tdep->ppc_fpscr_regnum >= 0) - supply_register (tdep->ppc_fpscr_regnum, (char *) ®s->r32.fpscr); + supply_register (tdep->ppc_fpscr_regnum, (char *) ®s->r32.fpscr); if (tdep->ppc_mq_regnum >= 0) supply_register (tdep->ppc_mq_regnum, (char *) ®s->r32.mq); } |