aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-05-04 17:58:31 +0000
committerJim Blandy <jimb@codesourcery.com>2004-05-04 17:58:31 +0000
commit8bf659e8f6f3cd9041872b77334812bc176bd2e7 (patch)
tree1f03970a815fee6d9fb5fcec1f6fb1c0ecc2ab31 /gdb/rs6000-tdep.c
parentb967e06fbcdd33cc9f61e62dad38dc6d879c1405 (diff)
downloadgdb-8bf659e8f6f3cd9041872b77334812bc176bd2e7.zip
gdb-8bf659e8f6f3cd9041872b77334812bc176bd2e7.tar.gz
gdb-8bf659e8f6f3cd9041872b77334812bc176bd2e7.tar.bz2
* config/ppc-tdep.h (struct gdbarch_tdep): Delete
'ppc_gplast_regnum' member. (ppc_num_gprs): New enum constant. * ppc-linux-nat.c (ppc_register_u_addr): Use tdep->ppc_gp0_regnum and ppc_num_gprs instead of tdep->ppc_gplast_regnum. * rs6000-nat.c (regmap, fetch_inferior_registers, store_inferior_registers): Same. * rs6000-tdep.c (e500_pseudo_register_read) (e500_pseudo_register_write): Same. (rs6000_gdbarch_init): Don't initialize tdep->ppc_gplast_regnum.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 721443e..8a78ff2 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1669,7 +1669,7 @@ e500_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->ppc_gp0_regnum
- && reg_nr <= tdep->ppc_gplast_regnum)
+ && reg_nr < tdep->ppc_gp0_regnum + ppc_num_gprs)
{
base_regnum = reg_nr - tdep->ppc_gp0_regnum + tdep->ppc_ev0_regnum;
@@ -1692,7 +1692,7 @@ e500_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->ppc_gp0_regnum
- && reg_nr <= tdep->ppc_gplast_regnum)
+ && reg_nr < tdep->ppc_gp0_regnum + ppc_num_gprs)
{
base_regnum = reg_nr - tdep->ppc_gp0_regnum + tdep->ppc_ev0_regnum;
/* reg_nr is 32 bit here, and base_regnum is 64 bits. */
@@ -2701,7 +2701,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->regs = v->regs;
tdep->ppc_gp0_regnum = 0;
- tdep->ppc_gplast_regnum = 31;
tdep->ppc_toc_regnum = 2;
tdep->ppc_ps_regnum = 65;
tdep->ppc_cr_regnum = 66;
@@ -2746,7 +2745,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_ppc_e500:
tdep->ppc_gp0_regnum = 41;
- tdep->ppc_gplast_regnum = tdep->ppc_gp0_regnum + 32 - 1;
tdep->ppc_toc_regnum = -1;
tdep->ppc_ps_regnum = 1;
tdep->ppc_cr_regnum = 2;