This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, e500] Fix store.exp failures


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)
       {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]