public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] MIPS/Linux: Update the number of pseudo registers too
@ 2011-12-06 22:26 Maciej W. Rozycki
  2011-12-08  8:37 ` Joel Brobecker
  2011-12-08 13:49 ` Joel Brobecker
  0 siblings, 2 replies; 7+ messages in thread
From: Maciej W. Rozycki @ 2011-12-06 22:26 UTC (permalink / raw)
  To: gdb-patches

Hi,

 Similarly to the previous general MIPS change (pc_regnum and sp_regnum) 
the Linux backend needs to update the number of pseudo registers as it 
adds the "restart" register.  No regressions in mips-linux-gnu testing 
(native and remote).  OK to apply?

2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>

	gdb/
	* mips-linux-tdep.c (mips_linux_init_abi): Set num_pseudo_regs
	too.

  Maciej

gdb-mips-num-pseudo-regs.diff
Index: gdb-fsf-trunk-quilt/gdb/mips-linux-tdep.c
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/mips-linux-tdep.c	2011-11-24 00:54:31.955605130 +0000
+++ gdb-fsf-trunk-quilt/gdb/mips-linux-tdep.c	2011-11-24 00:55:54.545604049 +0000
@@ -1325,6 +1325,7 @@ mips_linux_init_abi (struct gdbarch_info
 	 described or not).  */
       gdb_assert (gdbarch_num_regs (gdbarch) <= MIPS_RESTART_REGNUM);
       set_gdbarch_num_regs (gdbarch, MIPS_RESTART_REGNUM + 1);
+      set_gdbarch_num_pseudo_regs (gdbarch, MIPS_RESTART_REGNUM + 1);
 
       /* If it's present, then assign it to the reserved number.  */
       feature = tdesc_find_feature (info.target_desc,

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

* Re: [PATCH] MIPS/Linux: Update the number of pseudo registers too
  2011-12-06 22:26 [PATCH] MIPS/Linux: Update the number of pseudo registers too Maciej W. Rozycki
@ 2011-12-08  8:37 ` Joel Brobecker
  2011-12-08  9:04   ` Mark Kettenis
  2011-12-08 13:49 ` Joel Brobecker
  1 sibling, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2011-12-08  8:37 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: gdb-patches

>  Similarly to the previous general MIPS change (pc_regnum and sp_regnum) 
> the Linux backend needs to update the number of pseudo registers as it 
> adds the "restart" register.  No regressions in mips-linux-gnu testing 
> (native and remote).  OK to apply?

I don't understand this one. Isn't the register added to the list of
normal registers, rather than pseudo registers?

> 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
> 
> 	gdb/
> 	* mips-linux-tdep.c (mips_linux_init_abi): Set num_pseudo_regs
> 	too.
-- 
Joel

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

* Re: [PATCH] MIPS/Linux: Update the number of pseudo registers too
  2011-12-08  8:37 ` Joel Brobecker
@ 2011-12-08  9:04   ` Mark Kettenis
  2011-12-08  9:26     ` Joel Brobecker
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Kettenis @ 2011-12-08  9:04 UTC (permalink / raw)
  To: brobecker; +Cc: macro, gdb-patches

> Date: Thu, 8 Dec 2011 09:31:13 +0100
> From: Joel Brobecker <brobecker@adacore.com>
> 
> >  Similarly to the previous general MIPS change (pc_regnum and sp_regnum) 
> > the Linux backend needs to update the number of pseudo registers as it 
> > adds the "restart" register.  No regressions in mips-linux-gnu testing 
> > (native and remote).  OK to apply?
> 
> I don't understand this one. Isn't the register added to the list of
> normal registers, rather than pseudo registers?

MIPS is a bit weird, since all register access is done via pseudo
registers to deal with 32-bit vs. 64-bit issues (in particular,
supporting a 32-bit ABI on 64-bit hardware).

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

* Re: [PATCH] MIPS/Linux: Update the number of pseudo registers too
  2011-12-08  9:04   ` Mark Kettenis
@ 2011-12-08  9:26     ` Joel Brobecker
  2011-12-08 12:36       ` Mark Kettenis
  0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2011-12-08  9:26 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: macro, gdb-patches

> > >  Similarly to the previous general MIPS change (pc_regnum and sp_regnum) 
> > > the Linux backend needs to update the number of pseudo registers as it 
> > > adds the "restart" register.  No regressions in mips-linux-gnu testing 
> > > (native and remote).  OK to apply?
> > 
> > I don't understand this one. Isn't the register added to the list of
> > normal registers, rather than pseudo registers?
> 
> MIPS is a bit weird, since all register access is done via pseudo
> registers to deal with 32-bit vs. 64-bit issues (in particular,
> supporting a 32-bit ABI on 64-bit hardware).

Aha, thanks! So that would indeed mean that Maciej's patch should be
correct, right?

-- 
Joel

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

* Re: [PATCH] MIPS/Linux: Update the number of pseudo registers too
  2011-12-08  9:26     ` Joel Brobecker
@ 2011-12-08 12:36       ` Mark Kettenis
  2012-02-27 21:37         ` Maciej W. Rozycki
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Kettenis @ 2011-12-08 12:36 UTC (permalink / raw)
  To: brobecker; +Cc: macro, gdb-patches

> Date: Thu, 8 Dec 2011 10:04:15 +0100
> From: Joel Brobecker <brobecker@adacore.com>
> 
> > > >  Similarly to the previous general MIPS change (pc_regnum and sp_regnum) 
> > > > the Linux backend needs to update the number of pseudo registers as it 
> > > > adds the "restart" register.  No regressions in mips-linux-gnu testing 
> > > > (native and remote).  OK to apply?
> > > 
> > > I don't understand this one. Isn't the register added to the list of
> > > normal registers, rather than pseudo registers?
> > 
> > MIPS is a bit weird, since all register access is done via pseudo
> > registers to deal with 32-bit vs. 64-bit issues (in particular,
> > supporting a 32-bit ABI on 64-bit hardware).
> 
> Aha, thanks! So that would indeed mean that Maciej's patch should be
> correct, right?

Almost certainly, yes.

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

* Re: [PATCH] MIPS/Linux: Update the number of pseudo registers too
  2011-12-06 22:26 [PATCH] MIPS/Linux: Update the number of pseudo registers too Maciej W. Rozycki
  2011-12-08  8:37 ` Joel Brobecker
@ 2011-12-08 13:49 ` Joel Brobecker
  1 sibling, 0 replies; 7+ messages in thread
From: Joel Brobecker @ 2011-12-08 13:49 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: gdb-patches

Maciej,

> 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
> 
> 	gdb/
> 	* mips-linux-tdep.c (mips_linux_init_abi): Set num_pseudo_regs
> 	too.

Just in case Mark's message wasn't confirmation enough, this patch
is approved... ;-).

Thanks,
-- 
Joel

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

* Re: [PATCH] MIPS/Linux: Update the number of pseudo registers too
  2011-12-08 12:36       ` Mark Kettenis
@ 2012-02-27 21:37         ` Maciej W. Rozycki
  0 siblings, 0 replies; 7+ messages in thread
From: Maciej W. Rozycki @ 2012-02-27 21:37 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: brobecker, gdb-patches

On Thu, 8 Dec 2011, Mark Kettenis wrote:

> > > > >  Similarly to the previous general MIPS change (pc_regnum and sp_regnum) 
> > > > > the Linux backend needs to update the number of pseudo registers as it 
> > > > > adds the "restart" register.  No regressions in mips-linux-gnu testing 
> > > > > (native and remote).  OK to apply?
> > > > 
> > > > I don't understand this one. Isn't the register added to the list of
> > > > normal registers, rather than pseudo registers?
> > > 
> > > MIPS is a bit weird, since all register access is done via pseudo
> > > registers to deal with 32-bit vs. 64-bit issues (in particular,
> > > supporting a 32-bit ABI on 64-bit hardware).
> > 
> > Aha, thanks! So that would indeed mean that Maciej's patch should be
> > correct, right?
> 
> Almost certainly, yes.

 Applied now, thanks for the review.

  Maciej

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

end of thread, other threads:[~2012-02-27 21:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-06 22:26 [PATCH] MIPS/Linux: Update the number of pseudo registers too Maciej W. Rozycki
2011-12-08  8:37 ` Joel Brobecker
2011-12-08  9:04   ` Mark Kettenis
2011-12-08  9:26     ` Joel Brobecker
2011-12-08 12:36       ` Mark Kettenis
2012-02-27 21:37         ` Maciej W. Rozycki
2011-12-08 13:49 ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).