mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-23 13:21:43 +08:00
* 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.
This commit is contained in:
parent
b967e06fbc
commit
8bf659e8f6
@ -1,5 +1,16 @@
|
||||
2004-05-04 Jim Blandy <jimb@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
* config/rs6000/tm-rs6000.h (FPLAST_REGNUM): Delete #definition.
|
||||
* ppc-tdep.h (ppc_num_fprs): New enum constant.
|
||||
* aix-thread.c (fetch_regs_kernel_thread, fill_fprs,
|
||||
|
@ -132,7 +132,8 @@ ppc_register_u_addr (int regno)
|
||||
int wordsize = sizeof (PTRACE_XFER_TYPE);
|
||||
|
||||
/* General purpose registers occupy 1 slot each in the buffer */
|
||||
if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum )
|
||||
if (regno >= tdep->ppc_gp0_regnum
|
||||
&& regno < tdep->ppc_gp0_regnum + ppc_num_gprs)
|
||||
u_addr = ((regno - tdep->ppc_gp0_regnum + PT_R0) * wordsize);
|
||||
|
||||
/* Floating point regs: eight bytes each in both 32- and 64-bit
|
||||
|
@ -144,7 +144,6 @@ struct gdbarch_tdep
|
||||
int *regoff; /* byte offsets in register arrays */
|
||||
const struct reg *regs; /* from current variant */
|
||||
int ppc_gp0_regnum; /* GPR register 0 */
|
||||
int ppc_gplast_regnum; /* GPR register 31 */
|
||||
int ppc_toc_regnum; /* TOC register */
|
||||
int ppc_ps_regnum; /* Processor (or machine) status (%msr) */
|
||||
int ppc_cr_regnum; /* Condition register */
|
||||
@ -166,6 +165,7 @@ struct gdbarch_tdep
|
||||
/* Constants for register set sizes. */
|
||||
enum
|
||||
{
|
||||
ppc_num_gprs = 32, /* 32 general-purpose registers */
|
||||
ppc_num_fprs = 32 /* 32 floating-point registers */
|
||||
};
|
||||
|
||||
|
@ -156,7 +156,8 @@ regmap (int regno, int *isfloat)
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
|
||||
|
||||
*isfloat = 0;
|
||||
if (tdep->ppc_gp0_regnum <= regno && regno <= tdep->ppc_gplast_regnum)
|
||||
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)
|
||||
{
|
||||
@ -350,7 +351,7 @@ fetch_inferior_registers (int regno)
|
||||
|
||||
/* Read 32 general purpose registers. */
|
||||
for (regno = tdep->ppc_gp0_regnum;
|
||||
regno <= tdep->ppc_gplast_regnum;
|
||||
regno < tdep->ppc_gp0_regnum + ppc_num_gprs;
|
||||
regno++)
|
||||
{
|
||||
fetch_register (regno);
|
||||
@ -389,7 +390,7 @@ store_inferior_registers (int regno)
|
||||
|
||||
/* Write general purpose registers first. */
|
||||
for (regno = tdep->ppc_gp0_regnum;
|
||||
regno <= tdep->ppc_gplast_regnum;
|
||||
regno < tdep->ppc_gp0_regnum + ppc_num_gprs;
|
||||
regno++)
|
||||
{
|
||||
store_register (regno);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user