summaryrefslogtreecommitdiff
path: root/gdb/ppcnbsd-tdep.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
commit85d7eb8bf0b82c4660c2a2b931841410878dd783 (patch)
treea61f1fb50e979d352711d888604edf447b7e3093 /gdb/ppcnbsd-tdep.c
parentdde3424cec40ccb548ad1ddedf6f0eb77c1ebae3 (diff)
downloadgdb-85d7eb8bf0b82c4660c2a2b931841410878dd783.tar.gz
* 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/ppcnbsd-tdep.c')
-rw-r--r--gdb/ppcnbsd-tdep.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c
index 77150af0c41..891b74fc820 100644
--- a/gdb/ppcnbsd-tdep.c
+++ b/gdb/ppcnbsd-tdep.c
@@ -111,10 +111,11 @@ ppcnbsd_supply_fpreg (char *fpregs, int regno)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int i;
- for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
+ for (i = 0; i < ppc_num_fprs; i++)
{
- if (regno == i || regno == -1)
- supply_register (i, fpregs + FPREG_FPR_OFFSET (i - FP0_REGNUM));
+ if (regno == tdep->ppc_fp0_regnum + i || regno == -1)
+ supply_register (tdep->ppc_fp0_regnum + i,
+ fpregs + FPREG_FPR_OFFSET (i));
}
if (regno == tdep->ppc_fpscr_regnum || regno == -1)
@@ -127,10 +128,11 @@ ppcnbsd_fill_fpreg (char *fpregs, int regno)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int i;
- for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
+ for (i = 0; i < ppc_num_fprs; i++)
{
- if (regno == i || regno == -1)
- regcache_collect (i, fpregs + FPREG_FPR_OFFSET (i - FP0_REGNUM));
+ if (regno == tdep->ppc_fp0_regnum + i || regno == -1)
+ regcache_collect (tdep->ppc_fp0_regnum + i,
+ fpregs + FPREG_FPR_OFFSET (i));
}
if (regno == tdep->ppc_fpscr_regnum || regno == -1)