Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Add vscr register to 'list' of PowerPC vector registers.
@ 2005-10-14 19:11 Paul Gilliam
  2005-10-14 19:15 ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Gilliam @ 2005-10-14 19:11 UTC (permalink / raw)
  To: gdb-patches

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;


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

* Re: [PATCH] Add vscr register to 'list' of PowerPC vector registers.
  2005-10-14 19:11 [PATCH] Add vscr register to 'list' of PowerPC vector registers Paul Gilliam
@ 2005-10-14 19:15 ` Daniel Jacobowitz
  2005-10-14 20:21   ` [COMMIT] " Paul Gilliam
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2005-10-14 19:15 UTC (permalink / raw)
  To: Paul Gilliam; +Cc: gdb-patches

On Fri, Oct 14, 2005 at 12:13:20PM -0700, Paul Gilliam wrote:
> 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?

You should also try posting patches using a readable diff format :-)
(unified, please, or at least context).

I have no preferences on the actual patch.


-- 
Daniel Jacobowitz
CodeSourcery, LLC


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

* [COMMIT] Add vscr register to 'list' of PowerPC vector registers.
  2005-10-14 19:15 ` Daniel Jacobowitz
@ 2005-10-14 20:21   ` Paul Gilliam
  2005-10-14 20:22     ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Gilliam @ 2005-10-14 20:21 UTC (permalink / raw)
  To: gdb-patches; +Cc: Daniel Jacobowitz

I went with the least intrusive.

Here is what I comitted: (From 'cvs diff -Nau' this time. Hope this is better. 8-)


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 -a -u -r1.245 rs6000-tdep.c
--- rs6000-tdep.c       6 Oct 2005 00:22:57 -0000       1.245
+++ rs6000-tdep.c       14 Oct 2005 20:11:02 -0000
@@ -1888,6 +1888,7 @@
              || (tdep->ppc_ev0_regnum >= 0
                  && regnum >= tdep->ppc_ev0_regnum
                  && regnum < tdep->ppc_ev0_regnum + 32)
+             || regnum == tdep->ppc_vrsave_regnum - 1 /* vscr */
              || regnum == tdep->ppc_vrsave_regnum
              || regnum == tdep->ppc_acc_regnum
              || regnum == tdep->ppc_spefscr_regnum);








On Friday 14 October 2005 12:15, Daniel Jacobowitz wrote:
> On Fri, Oct 14, 2005 at 12:13:20PM -0700, Paul Gilliam wrote:
> > 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?
> 
> You should also try posting patches using a readable diff format :-)
> (unified, please, or at least context).
> 
> I have no preferences on the actual patch.
> 
> 


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

* Re: [COMMIT] Add vscr register to 'list' of PowerPC vector registers.
  2005-10-14 20:21   ` [COMMIT] " Paul Gilliam
@ 2005-10-14 20:22     ` Daniel Jacobowitz
  2005-10-14 20:35       ` Paul Gilliam
  2005-10-15  4:33       ` Jim Blandy
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2005-10-14 20:22 UTC (permalink / raw)
  To: Paul Gilliam; +Cc: gdb-patches

On Fri, Oct 14, 2005 at 01:23:02PM -0700, Paul Gilliam wrote:
> I went with the least intrusive.
> 
> Here is what I comitted: (From 'cvs diff -Nau' this time. Hope this is better. 8-)
> 
> 
> 2005-10-14  Paul Gilliam  <pgilliam@us.ibm.com>
> 
>         * rs6000-tdep.c (rs6000_register_reggroup_p): Add vscr to test for
>         vector registers.

I wasn't actually approving the patch... but I guess this is OK now
that it's in.


-- 
Daniel Jacobowitz
CodeSourcery, LLC


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

* Re: [COMMIT] Add vscr register to 'list' of PowerPC vector registers.
  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
  1 sibling, 2 replies; 8+ messages in thread
From: Paul Gilliam @ 2005-10-14 20:35 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

On Friday 14 October 2005 13:22, Daniel Jacobowitz wrote:
> On Fri, Oct 14, 2005 at 01:23:02PM -0700, Paul Gilliam wrote:
> > I went with the least intrusive.
> > 
> > Here is what I comitted: (From 'cvs diff -Nau' this time. Hope this is better. 8-)
> > 
> > 
> > 2005-10-14  Paul Gilliam  <pgilliam@us.ibm.com>
> > 
> >         * rs6000-tdep.c (rs6000_register_reggroup_p): Add vscr to test for
> >         vector registers.
> 
> I wasn't actually approving the patch... but I guess this is OK now
> that it's in.
> 
> 
Opps!   Sorry.  (I'm glad I picked the one-liner 8-)

Is this the kind of diff you'd like to see: 'cvs diff -Nau'?


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

* Re: [COMMIT] Add vscr register to 'list' of PowerPC vector registers.
  2005-10-14 20:35       ` Paul Gilliam
@ 2005-10-14 20:41         ` Daniel Jacobowitz
  2005-10-18 17:11         ` Kevin Buettner
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2005-10-14 20:41 UTC (permalink / raw)
  To: Paul Gilliam; +Cc: gdb-patches

On Fri, Oct 14, 2005 at 01:37:09PM -0700, Paul Gilliam wrote:
> On Friday 14 October 2005 13:22, Daniel Jacobowitz wrote:
> > On Fri, Oct 14, 2005 at 01:23:02PM -0700, Paul Gilliam wrote:
> > > I went with the least intrusive.
> > > 
> > > Here is what I comitted: (From 'cvs diff -Nau' this time. Hope this is better. 8-)
> > > 
> > > 
> > > 2005-10-14  Paul Gilliam  <pgilliam@us.ibm.com>
> > > 
> > >         * rs6000-tdep.c (rs6000_register_reggroup_p): Add vscr to test for
> > >         vector registers.
> > 
> > I wasn't actually approving the patch... but I guess this is OK now
> > that it's in.
> > 
> > 
> Opps!   Sorry.  (I'm glad I picked the one-liner 8-)
> 
> Is this the kind of diff you'd like to see: 'cvs diff -Nau'?

Sure, that'll do.  I also recommend -p.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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

* Re: [COMMIT] Add vscr register to 'list' of PowerPC vector registers.
  2005-10-14 20:22     ` Daniel Jacobowitz
  2005-10-14 20:35       ` Paul Gilliam
@ 2005-10-15  4:33       ` Jim Blandy
  1 sibling, 0 replies; 8+ messages in thread
From: Jim Blandy @ 2005-10-15  4:33 UTC (permalink / raw)
  To: Paul Gilliam; +Cc: gdb-patches


Daniel Jacobowitz <drow@false.org> writes:
> On Fri, Oct 14, 2005 at 01:23:02PM -0700, Paul Gilliam wrote:
>> I went with the least intrusive.
>> 
>> Here is what I comitted: (From 'cvs diff -Nau' this time. Hope this is better. 8-)
>> 
>> 
>> 2005-10-14  Paul Gilliam  <pgilliam@us.ibm.com>
>> 
>>         * rs6000-tdep.c (rs6000_register_reggroup_p): Add vscr to test for
>>         vector registers.
>
> I wasn't actually approving the patch... but I guess this is OK now
> that it's in.

I'm not a PowerPC maintainer, but I'm somewhat familiar with the
Altivec register set, and this is clearly the right thing.


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

* Re: [COMMIT] Add vscr register to 'list' of PowerPC vector registers.
  2005-10-14 20:35       ` Paul Gilliam
  2005-10-14 20:41         ` Daniel Jacobowitz
@ 2005-10-18 17:11         ` Kevin Buettner
  1 sibling, 0 replies; 8+ messages in thread
From: Kevin Buettner @ 2005-10-18 17:11 UTC (permalink / raw)
  To: gdb-patches

On Fri, 14 Oct 2005 13:37:09 -0700
Paul Gilliam <pgilliam@us.ibm.com> wrote:

> On Friday 14 October 2005 13:22, Daniel Jacobowitz wrote:
> > On Fri, Oct 14, 2005 at 01:23:02PM -0700, Paul Gilliam wrote:
> > > I went with the least intrusive.
> > > 
> > > Here is what I comitted: (From 'cvs diff -Nau' this time. Hope this is better. 8-)
> > > 
> > > 
> > > 2005-10-14  Paul Gilliam  <pgilliam@us.ibm.com>
> > > 
> > >         * rs6000-tdep.c (rs6000_register_reggroup_p): Add vscr to test for
> > >         vector registers.
> > 
> > I wasn't actually approving the patch... but I guess this is OK now
> > that it's in.
> > 
> > 
> Opps!   Sorry.  (I'm glad I picked the one-liner 8-)

The patch that you committed is okay with me.

Kevin


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

end of thread, other threads:[~2005-10-18 17:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-14 19:11 [PATCH] Add vscr register to 'list' of PowerPC vector registers Paul Gilliam
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

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