aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-05-05 01:46:55 +0000
committerJim Blandy <jimb@codesourcery.com>2004-05-05 01:46:55 +0000
commit366f009f23b0e5fc1668d1f728b4cda533df5cb5 (patch)
tree6a4f33eea5a1504c1169b4f9e7d0f7bff0dca852 /gdb/rs6000-nat.c
parente792b4ce88267ea6d1fc66defae56f8dc8d4c05d (diff)
downloadgdb-366f009f23b0e5fc1668d1f728b4cda533df5cb5.zip
gdb-366f009f23b0e5fc1668d1f728b4cda533df5cb5.tar.gz
gdb-366f009f23b0e5fc1668d1f728b4cda533df5cb5.tar.bz2
* config/rs6000/tm-rs6000.h (FP0_REGNUM): Document that this
should no longer be used in code specific to the RS6000 and its derivatives. * ppc-tdep.h (struct gdbarch_tdep): Add 'ppc_fp0_regnum' member. * rs6000-tdep.c (rs6000_gdbarch_init): Initialize tdep->ppc_fp0_regnum. (ppc_supply_fpregset, ppc_collect_fpregset) (rs6000_push_dummy_call, rs6000_extract_return_value) (rs6000_dwarf2_stab_reg_to_regnum, rs6000_store_return_value) (rs6000_frame_cache): Use tdep->ppc_fp0_regnum instead of FP0_REGNUM. * aix-thread.c (supply_fprs, fetch_regs_kernel_thread) (fill_gprs64, fill_gprs32, fill_fprs, store_regs_kernel_thread): Same. * ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_fetch_registers, bdm_ppc_store_registers): Same. * ppc-linux-nat.c (ppc_register_u_addr, fetch_register) (store_register, fill_fpregset): Same. * ppc-linux-tdep.c (ppc_linux_sigtramp_cache) (ppc_linux_supply_fpregset): Same. * ppcnbsd-nat.c (getfpregs_supplies): Same. * ppcnbsd-tdep.c (ppcnbsd_supply_fpreg, ppcnbsd_fill_fpreg): Same. * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call, do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call, ppc64_sysv_abi_return_value): Same. * rs6000-nat.c (regmap, fetch_inferior_registers) (store_inferior_registers, fetch_core_registers): Same.
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 5628a2e..b80b5a5 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -159,10 +159,11 @@ regmap (int regno, int *isfloat)
if (tdep->ppc_gp0_regnum <= regno
&& regno < tdep->ppc_gp0_regnum + ppc_num_gprs)
return regno;
- else if (FP0_REGNUM <= regno && regno < FP0_REGNUM + ppc_num_fprs)
+ else if (tdep->ppc_fp0_regnum <= regno
+ && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)
{
*isfloat = 1;
- return regno - FP0_REGNUM + FPR0;
+ return regno - tdep->ppc_fp0_regnum + FPR0;
}
else if (regno == PC_REGNUM)
return IAR;
@@ -358,8 +359,8 @@ fetch_inferior_registers (int regno)
}
/* Read general purpose floating point registers. */
- for (regno = FP0_REGNUM; regno < FP0_REGNUM + ppc_num_fprs; regno++)
- fetch_register (regno);
+ for (regno = 0; regno < ppc_num_fprs; regno++)
+ fetch_register (tdep->ppc_fp0_regnum + regno);
/* Read special registers. */
fetch_register (PC_REGNUM);
@@ -397,8 +398,8 @@ store_inferior_registers (int regno)
}
/* Write floating point registers. */
- for (regno = FP0_REGNUM; regno < FP0_REGNUM + ppc_num_fprs; regno ++)
- store_register (regno);
+ for (regno = 0; regno < ppc_num_fprs; regno++)
+ store_register (tdep->ppc_fp0_regnum + regno);
/* Write special registers. */
store_register (PC_REGNUM);
@@ -583,7 +584,8 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
supply_register (regi, (char *) &regs->r64.gpr[regi]);
for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi, (char *) &regs->r64.fpr[regi]);
+ supply_register (tdep->ppc_fp0_regnum + regi,
+ (char *) &regs->r64.fpr[regi]);
supply_register (PC_REGNUM, (char *) &regs->r64.iar);
supply_register (tdep->ppc_ps_regnum, (char *) &regs->r64.msr);
@@ -599,7 +601,8 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
supply_register (regi, (char *) &regs->r32.gpr[regi]);
for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi, (char *) &regs->r32.fpr[regi]);
+ supply_register (tdep->ppc_fp0_regnum + regi,
+ (char *) &regs->r32.fpr[regi]);
supply_register (PC_REGNUM, (char *) &regs->r32.iar);
supply_register (tdep->ppc_ps_regnum, (char *) &regs->r32.msr);