Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paul Gilliam <pgilliam@us.ibm.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Add vscr register to 'list' of PowerPC vector registers.
Date: Fri, 14 Oct 2005 19:11:00 -0000	[thread overview]
Message-ID: <200510141213.20387.pgilliam@us.ibm.com> (raw)

The vscr regisgter was omitted from the if statement in rs6000-tdep.c that decides if a register is a vector register.
Consiquetly, it was not printed along with the other vector registers using the 'info vector' command.

Two patches follow:  the first fixes the problem with the least amount of fuss.

The second adds ppc_vscr_regnum to the gdbarch_tdep struct in ppc-tdep.h and then uses that.
This version was prompted by this comment in rs6000-tdep.c:
       /* FIXME: jimb/2004-07-15: when we have tdep->ppc_vscr_regnum,
          we can treat this more like the other cases.  */

Which should i commit?

---------------------------- take one---------------------------- 
2005-10-14  Paul Gilliam  <pgilliam@us.ibm.com>

        * rs6000-tdep.c (rs6000_register_reggroup_p): Add vscr to test for
        vector registers.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.245
diff -r1.245 rs6000-tdep.c
1890a1891
>             || regnum == tdep->ppc_vrsave_regnum - 1 /* vscr */

---------------------------- take two---------------------------- 
2005-10-14  Paul Gilliam  <pgilliam@us.ibm.com>

        * ppc-tdep.c (struct gdbarch_tdep): Add ppc_vsr_regnum.
        * rs6000-tdep.c (init_sim_regno_table, rs6000_register_reggroup_p,
        rs6000_stab_reg_to_regnum, rs6000_dwarf2_reg_to_regnum): Use new
        ppc_vscr_regnum.  (rs6000_gdbarch_init): Initialize ppc_vscr_regnum.

Index: ppc-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/ppc-tdep.h,v
retrieving revision 1.47
diff -r1.47 ppc-tdep.h
170a171
>     int ppc_vscr_regnum;      /* Second to last AltiVec register */
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.245
diff -r1.245 rs6000-tdep.c
264,265d263
<       /* FIXME: jimb/2004-07-15: when we have tdep->ppc_vscr_regnum,
<          we can treat this more like the other cases.  */
267c265
<                      tdep->ppc_vr0_regnum + ppc_num_vrs,
---
>                      tdep->ppc_vscr_regnum,
1890a1889
>             || regnum == tdep->ppc_vscr_regnum
2106c2105
<         return tdep->ppc_vrsave_regnum - 1; /* vscr */
---
>         return tdep->ppc_vscr_regnum;
2138c2137
<         return tdep->ppc_vrsave_regnum - 1; /* vscr */
---
>         return tdep->ppc_vscr_regnum;
3243a3243
>       tdep->ppc_vscr_regnum = 103;
3247a3248
>       tdep->ppc_vscr_regnum = 151;


             reply	other threads:[~2005-10-14 19:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-14 19:11 Paul Gilliam [this message]
2005-10-14 19:15 ` Daniel Jacobowitz
2005-10-14 20:21   ` [COMMIT] " Paul Gilliam
2005-10-14 20:22     ` Daniel Jacobowitz
2005-10-14 20:35       ` Paul Gilliam
2005-10-14 20:41         ` Daniel Jacobowitz
2005-10-18 17:11         ` Kevin Buettner
2005-10-15  4:33       ` 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=200510141213.20387.pgilliam@us.ibm.com \
    --to=pgilliam@us.ibm.com \
    --cc=gdb-patches@sources.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