Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [rfa:ppc} fix e500 struct return
Date: Tue, 01 Oct 2002 21:06:00 -0000	[thread overview]
Message-ID: <3D9A70B1.9020706@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]

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

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 735 bytes --]

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;
 }
 

             reply	other threads:[~2002-10-02  4:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-01 21:06 Andrew Cagney [this message]
2002-10-02  9:19 ` Kevin Buettner
2002-10-02 14:21   ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D9A70B1.9020706@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox