Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: use ppc_gp0_regnum when appropriate
@ 2004-05-07  1:19 Jim Blandy
  2004-05-07 20:57 ` Kevin Buettner
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2004-05-07  1:19 UTC (permalink / raw)
  To: gdb-patches


2004-05-06  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.

*** gdb/aix-thread.c	2004-05-06 14:18:00.000000000 -0500
--- gdb/aix-thread.c	2004-05-06 14:25:58.000000000 -0500
*************** fetch_regs_kernel_thread (int regno, pth
*** 1157,1163 ****
  	(long) tid, regno, arch64);
  
    /* General-purpose registers.  */
!   if (regno == -1 || regno < tdep->ppc_fp0_regnum)
      {
        if (arch64)
  	{
--- 1157,1165 ----
  	(long) tid, regno, arch64);
  
    /* General-purpose registers.  */
!   if (regno == -1
!       || (tdep->ppc_gp0_regnum <= regno
!           && regno < tdep->ppc_gp0_regnum + ppc_num_gprs))
      {
        if (arch64)
  	{
*************** fill_gprs64 (uint64_t *vals)
*** 1246,1254 ****
    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);
  }
  
  static void 
--- 1248,1256 ----
    struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
    int 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 
*************** fill_gprs32 (uint32_t *vals)
*** 1257,1265 ****
    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);
  }
  
  /* Store the floating point registers into a double array.  */
--- 1259,1267 ----
    struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
    int 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.  */
*************** store_regs_kernel_thread (int regno, pth
*** 1456,1462 ****
                          (long) tid, regno);
  
    /* General-purpose registers.  */
!   if (regno == -1 || regno < tdep->ppc_fp0_regnum)
      {
        if (arch64)
  	{
--- 1458,1466 ----
                          (long) tid, regno);
  
    /* General-purpose registers.  */
!   if (regno == -1
!       || (tdep->ppc_gp0_regnum <= regno
!           && regno < tdep->ppc_gp0_regnum + ppc_num_fprs))
      {
        if (arch64)
  	{


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-07 20:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-07  1:19 RFA: use ppc_gp0_regnum when appropriate Jim Blandy
2004-05-07 20:57 ` Kevin Buettner
2004-05-07 20:50   ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox