From: Andrew Cagney Date: Wed, 2 Oct 2002 21:21:47 +0000 (+0000) Subject: 2002-10-02 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da3eff4919642fed6fd1f1a48162bc672cf4f06b;p=binutils-gdb.git 2002-10-02 Andrew Cagney * rs6000-tdep.c (rs6000_store_struct_return): Store struct_return value in register 3 adjusted by ppc_gp0_regnum. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f210799b4bb..5bb236a2369 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2002-10-02 Andrew Cagney + * rs6000-tdep.c (rs6000_store_struct_return): Store struct_return + value in register 3 adjusted by ppc_gp0_regnum. + * rs6000-tdep.c (skip_prologue): Bias alloca_reg by ppc_gp0_regnum. 2002-10-02 Marko Mlinar diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 152eb0e3a0c..53b9dd333e0 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -1991,7 +1991,8 @@ rs6000_stab_reg_to_regnum (int num) 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); } /* Write into appropriate registers a function return value