This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH, e500] Fix store.exp failures
- From: Luis Machado <lgustavo at codesourcery dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: "'gdb-patches at sourceware dot org'" <gdb-patches at sourceware dot org>
- Date: Thu, 27 Jun 2013 17:29:00 -0300
- Subject: Re: [PATCH, e500] Fix store.exp failures
- References: <51B07A91 dot 2090907 at codesourcery dot com> <87sj03mikc dot fsf at fleche dot redhat dot com>
- Reply-to: lgustavo at codesourcery dot com
On 06/27/2013 04:58 PM, Tom Tromey wrote:
"Luis" == Luis Machado <lgustavo@codesourcery.com> writes:
Luis> In reality, GDB should return the REAL register (SPE half) instead of
Luis> returning the PSEUDO register (full SPE register comprised of one SPE
Luis> half and one GPR).
It seems logical to me; though I know nothing about rs6000.
Thanks for taking a look.
Luis> 2013-06-06 Luis Machado <lgustavo@codesourcery.com>
Luis> * rs6000-tdep.c (rs6000_dwarf2_reg_to_regnum): Return the real register
Luis> number instead of the pseudo register one.
It seems like a similar change is needed in rs6000_stab_reg_to_regnum.
Ah, well spotted. It does need that change as well, which is addressed
by the following updated patch.
2013-06-27 Luis Machado <lgustavo@codesourcery.com>
* rs6000-tdep.c (rs6000_stab_reg_to_regnum): Return the real
register number instead of the pseudo register one.
(rs6000_dwarf2_reg_to_regnum): Likewise.
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index d3ff09d..4041cf9 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2854,7 +2854,7 @@ rs6000_stab_reg_to_regnum (struct gdbarch *gdbarch, int num)
else if (77 <= num && num <= 108)
return tdep->ppc_vr0_regnum + (num - 77);
else if (1200 <= num && num < 1200 + 32)
- return tdep->ppc_ev0_regnum + (num - 1200);
+ return tdep->ppc_ev0_upper_regnum + (num - 1200);
else
switch (num)
{
@@ -2896,7 +2896,7 @@ rs6000_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int num)
else if (1124 <= num && num < 1124 + 32)
return tdep->ppc_vr0_regnum + (num - 1124);
else if (1200 <= num && num < 1200 + 32)
- return tdep->ppc_ev0_regnum + (num - 1200);
+ return tdep->ppc_ev0_upper_regnum + (num - 1200);
else
switch (num)
{