* [PATCH] AIX: Add another way of setting up the frame pointer to skip_prologue
@ 2012-03-08 14:40 Chris January
2012-03-09 19:48 ` Joel Brobecker
0 siblings, 1 reply; 6+ messages in thread
From: Chris January @ 2012-03-08 14:40 UTC (permalink / raw)
To: gdb-patches
Add support for compilers that use the oril r29, r1, 0x0 instruction to
set up the frame pointer.
2012-03-08 Chris January <chris.january@allinea.com>
* rs6000-tdep.c (skip_prologue): Support the oril r29, r1, 0x0
instruction.
---
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index a8ff777..9d4fd40 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1822,6 +1822,15 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR
pc, CORE_ADDR lim_pc,
/* Set up frame pointer */
}
+ else if (op == 0x603d0000 /* oril r29, r1, 0x0 */)
+ {
+ fdata->frameless = 0;
+ framep = 1;
+ fdata->alloca_reg = (tdep->ppc_gp0_regnum + 29);
+ continue;
+
+ /* Another way to set up the frame pointer. */
+ }
else if (op == 0x603f0000 /* oril r31, r1, 0x0 */
|| op == 0x7c3f0b78)
{ /* mr r31, r1 */
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] AIX: Add another way of setting up the frame pointer to skip_prologue
2012-03-08 14:40 [PATCH] AIX: Add another way of setting up the frame pointer to skip_prologue Chris January
@ 2012-03-09 19:48 ` Joel Brobecker
2012-03-12 13:14 ` Chris January
0 siblings, 1 reply; 6+ messages in thread
From: Joel Brobecker @ 2012-03-09 19:48 UTC (permalink / raw)
To: Chris January; +Cc: gdb-patches
Chris,
> Add support for compilers that use the oril r29, r1, 0x0 instruction to
> set up the frame pointer.
>
> 2012-03-08 Chris January <chris.january@allinea.com>
>
> * rs6000-tdep.c (skip_prologue): Support the oril r29, r1, 0x0
> instruction.
Same comments as before: Looks good, but has it been validated against
the testsuite?
I am just going to suggest one tiny change, which is a bit of a nitpick,
but I think makes the code relatively consistent:
> ---
> diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
> index a8ff777..9d4fd40 100644
> --- a/gdb/rs6000-tdep.c
> +++ b/gdb/rs6000-tdep.c
> @@ -1822,6 +1822,15 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR
> pc, CORE_ADDR lim_pc,
>
> /* Set up frame pointer */
> }
> + else if (op == 0x603d0000 /* oril r29, r1, 0x0 */)
I would put the comment outside of the closing parens. I know we do
this for multi-line conditions, but this one fits in a single line,
so we can put it outside, and that way, it doesn't look like a parens
is missing.
> + {
> + fdata->frameless = 0;
> + framep = 1;
> + fdata->alloca_reg = (tdep->ppc_gp0_regnum + 29);
> + continue;
> +
> + /* Another way to set up the frame pointer. */
> + }
> else if (op == 0x603f0000 /* oril r31, r1, 0x0 */
> || op == 0x7c3f0b78)
> { /* mr r31, r1 */
>
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] AIX: Add another way of setting up the frame pointer to skip_prologue
2012-03-09 19:48 ` Joel Brobecker
@ 2012-03-12 13:14 ` Chris January
2012-03-12 13:43 ` Mark Kettenis
0 siblings, 1 reply; 6+ messages in thread
From: Chris January @ 2012-03-12 13:14 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On Fri, 2012-03-09 at 11:48 -0800, Joel Brobecker wrote:
> Chris,
> Same comments as before: Looks good, but has it been validated against
> the testsuite?
No, I have not got the test suite working reliably on AIX yet.
> I am just going to suggest one tiny change, which is a bit of a nitpick,
> but I think makes the code relatively consistent:
> I would put the comment outside of the closing parens. I know we do
> this for multi-line conditions, but this one fits in a single line,
> so we can put it outside, and that way, it doesn't look like a parens
> is missing.
Make sense to me, modified patch below.
Chris
---
2012-03-08 Chris January <chris.january@allinea.com>
* rs6000-tdep.c (skip_prologue): Support the oril r29, r1, 0x0
instruction.
---
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index a8ff777..9d4fd40 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1822,6 +1822,15 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR
pc, CORE_ADDR lim_pc,
/* Set up frame pointer */
}
+ else if (op == 0x603d0000) /* oril r29, r1, 0x0 */
+ {
+ fdata->frameless = 0;
+ framep = 1;
+ fdata->alloca_reg = (tdep->ppc_gp0_regnum + 29);
+ continue;
+
+ /* Another way to set up the frame pointer. */
+ }
else if (op == 0x603f0000 /* oril r31, r1, 0x0 */
|| op == 0x7c3f0b78)
{ /* mr r31, r1 */
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] AIX: Add another way of setting up the frame pointer to skip_prologue
2012-03-12 13:14 ` Chris January
@ 2012-03-12 13:43 ` Mark Kettenis
2012-03-13 15:18 ` Chris January
0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2012-03-12 13:43 UTC (permalink / raw)
To: chris.january; +Cc: brobecker, gdb-patches
> From: Chris January <chris.january@allinea.com>
> Date: Mon, 12 Mar 2012 13:14:20 +0000
>
> On Fri, 2012-03-09 at 11:48 -0800, Joel Brobecker wrote:
> > Chris,
>
> > Same comments as before: Looks good, but has it been validated against
> > the testsuite?
>
> No, I have not got the test suite working reliably on AIX yet.
If you have a Linux PowerPC box available, you could run the testsuite
there to check for regressions.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] AIX: Add another way of setting up the frame pointer to skip_prologue
2012-03-12 13:43 ` Mark Kettenis
@ 2012-03-13 15:18 ` Chris January
2012-03-13 16:50 ` Joel Brobecker
0 siblings, 1 reply; 6+ messages in thread
From: Chris January @ 2012-03-13 15:18 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
On Mon, 2012-03-12 at 14:43 +0100, Mark Kettenis wrote:
> > From: Chris January <chris.january@allinea.com>
> > Date: Mon, 12 Mar 2012 13:14:20 +0000
> >
> > On Fri, 2012-03-09 at 11:48 -0800, Joel Brobecker wrote:
> > > Chris,
> >
> > > Same comments as before: Looks good, but has it been validated against
> > > the testsuite?
> >
> > No, I have not got the test suite working reliably on AIX yet.
>
> If you have a Linux PowerPC box available, you could run the testsuite
> there to check for regressions.
I did just that, and there were no regressions.
Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] AIX: Add another way of setting up the frame pointer to skip_prologue
2012-03-13 15:18 ` Chris January
@ 2012-03-13 16:50 ` Joel Brobecker
0 siblings, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2012-03-13 16:50 UTC (permalink / raw)
To: Chris January; +Cc: gdb-patches
Re:
2012-03-08 Chris January <chris.january@allinea.com>
* rs6000-tdep.c (skip_prologue): Support the oril r29, r1, 0x0
instruction.
> > > > Same comments as before: Looks good, but has it been validated against
> > > > the testsuite?
> > >
> > > No, I have not got the test suite working reliably on AIX yet.
> >
> > If you have a Linux PowerPC box available, you could run the testsuite
> > there to check for regressions.
>
> I did just that, and there were no regressions.
Thanks, Chris. I checked the patch in for you.
Have we started the process for giving you write priviledges so
that you can commit the patches yourself?
PS: Does your mailer wrap long lines? If that's the case, can you send
patches in attachment instead? I couldn't get this patch to apply
even after fixing an obvious long-line automatic-wrap-around. So
I applied it by hand, and verified that the file still compiled.
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-13 16:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-08 14:40 [PATCH] AIX: Add another way of setting up the frame pointer to skip_prologue Chris January
2012-03-09 19:48 ` Joel Brobecker
2012-03-12 13:14 ` Chris January
2012-03-12 13:43 ` Mark Kettenis
2012-03-13 15:18 ` Chris January
2012-03-13 16:50 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox