This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[rfa:ppc} fix e500 struct return
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 02 Oct 2002 00:06:09 -0400
- Subject: [rfa:ppc} fix e500 struct return
Hello,
The attached fixes struct return address for the e500. Same problem as
with my previous patch for alloca_reg - needed to be biased.
ok?
Andrew
2002-10-01 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (rs6000_store_struct_return): Store struct return
address in 3 biased by ppc_gp0_regnum.
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/rs6000-tdep.c,v
retrieving revision 2.148.2.12
diff -u -r2.148.2.12 rs6000-tdep.c
--- rs6000-tdep.c 2002/10/02 02:25:02 2.148.2.12
+++ rs6000-tdep.c 2002/10/02 04:01:40
@@ -2285,7 +2285,8 @@
static void
rs6000_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
- write_register (3, addr);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ write_register (tdep->ppc_gp0_regnum + 3, addr);
rs6000_struct_return_address = addr;
}