2004-05-07 Jim Blandy <jimb@redhat.com>
+ * aix-thread.c (fetch_regs_kernel_thread, fill_gprs64,
+ fill_gprs32, store_regs_kernel_thread): Use tdep->ppc_gp0_regnum
+ to recognize gpr regnums, instead of assuming that
+ tdep->ppc_fp0_regnum marks the end of the general-purpose
+ registers.
+
* ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Assert that
the given architecture has floating-point registers.
(long) tid, regno, arch64);
/* General-purpose registers. */
- if (regno == -1 || regno < tdep->ppc_fp0_regnum)
+ if (regno == -1
+ || (tdep->ppc_gp0_regnum <= regno
+ && regno < tdep->ppc_gp0_regnum + ppc_num_gprs))
{
if (arch64)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
- for (regno = 0; regno < tdep->ppc_fp0_regnum; regno++)
- if (register_cached (regno))
- regcache_collect (regno, vals + regno);
+ for (regno = 0; regno < ppc_num_gprs; regno++)
+ if (register_cached (tdep->ppc_gp0_regnum + regno))
+ regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno);
}
static void
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
- for (regno = 0; regno < tdep->ppc_fp0_regnum; regno++)
- if (register_cached (regno))
- regcache_collect (regno, vals + regno);
+ for (regno = 0; regno < ppc_num_gprs; regno++)
+ if (register_cached (tdep->ppc_gp0_regnum + regno))
+ regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno);
}
/* Store the floating point registers into a double array. */
(long) tid, regno);
/* General-purpose registers. */
- if (regno == -1 || regno < tdep->ppc_fp0_regnum)
+ if (regno == -1
+ || (tdep->ppc_gp0_regnum <= regno
+ && regno < tdep->ppc_gp0_regnum + ppc_num_fprs))
{
if (arch64)
{