Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: RS6000: Use ppc_num_gprs and ppc_num_fprs whereappropriate
Date: Thu, 13 May 2004 14:59:00 -0000	[thread overview]
Message-ID: <20040513075916.2bd5d5ad@saguaro> (raw)
In-Reply-To: <vt265b1p1u5.fsf@zenia.home>

On 12 May 2004 20:12:18 -0500
Jim Blandy <jimb@redhat.com> wrote:

> 2004-05-12  Jim Blandy  <jimb@redhat.com>
> 
> 	* aix-thread.c (pdc_read_regs, supply_gprs64, supply_fprs)
> 	(fetch_regs_user_thread, fetch_regs_kernel_thread)
> 	(store_regs_user_thread, store_regs_kernel_thread): Use
> 	ppc_num_gprs and ppc_num_fprs instead of '32' and '31'.
> 	* ppc-linux-nat.c (fill_gregset): Same.
> 	* ppc-linux-tdep.c (ppc_linux_supply_gregset) 
> 	(ppc_linux_sigtramp_cache): Same.
> 	* ppcnbsd-tdep.c (ppcnbsd_supply_reg, ppcnbsd_fill_reg) 
> 	(ppcnbsd_sigtramp_cache_init): Same.
> 	* rs6000-nat.c (fetch_core_registers): Same.
> 	* rs6000-tdep.c (ppc_supply_gregset, ppc_collect_gregset) 
> 	(rs6000_frame_cache): Same.

Almost okay...

> *************** supply_fprs (double *vals)
> *** 1028,1034 ****
>        floating-point registers.  */
>     gdb_assert (ppc_floating_point_p (current_gdbarch));
>   
> !   for (regno = 0; regno < 32; regno++)
>       supply_register (regno + tdep->ppc_fp0_regnum, (char *) (vals + regno));
>   }
>   
> --- 1028,1034 ----
>        floating-point registers.  */
>     gdb_assert (ppc_floating_point_p (current_gdbarch));
>   
> !   for (regno = 0; regno < ppc_num_gprs; regno++)
>       supply_register (regno + tdep->ppc_fp0_regnum, (char *) (vals + regno));
>   }

I think ppc_num_fprs should be used here.

> *************** rs6000_frame_cache (struct frame_info *n
> *** 2491,2497 ****
>       {
>         int i;
>         CORE_ADDR gpr_addr = cache->base + fdata.gpr_offset;
> !       for (i = fdata.saved_gpr; i < 32; i++)
>   	{
>   	  cache->saved_regs[tdep->ppc_gp0_regnum + i].addr = gpr_addr;
>   	  gpr_addr += wordsize;
> --- 2491,2497 ----
>       {
>         int i;
>         CORE_ADDR gpr_addr = cache->base + fdata.gpr_offset;
> !       for (i = fdata.saved_gpr; i < ppc_num_fprs; i++)
>   	{
>   	  cache->saved_regs[tdep->ppc_gp0_regnum + i].addr = gpr_addr;
>   	  gpr_addr += wordsize;

I think this one should be using ppc_num_gprs.

A suitably revised patch is approved.

Kevin


  reply	other threads:[~2004-05-13 14:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-13  1:12 RFA: RS6000: Use ppc_num_gprs and ppc_num_fprs where appropriate Jim Blandy
2004-05-13 14:59 ` Kevin Buettner [this message]
2004-05-13 19:36   ` Jim Blandy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040513075916.2bd5d5ad@saguaro \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox