Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfa/ppc] prologue parser tweaks
Date: Fri, 19 Mar 2004 00:10:00 -0000	[thread overview]
Message-ID: <405A0810.90409@gnu.org> (raw)
In-Reply-To: <20040318091532.63ae9d21@saguaro>

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


>>> +
>>> +      if ((op & 0xfc1fffff) == 0x7c0802a6)
>>> +	{			/* mflr Rx */
>>> +	  /* Since shared library / PIC code, which needs to get its
>>> +	     address at runtime, can appear to save more than one link
>>> +	     register vis:
>>> +
>>> +	     *INDENT-OFF*
>>> +	     stwu r1,-304(r1)
>>> +	     mflr r3
>>> +	     bl 0xff570d0 (blrl)
>>> +	     stw r30,296(r1)
>>> +	     mflr r30
>>> +	     stw r31,300(r1)
>>> +	     stw r3,308(r1);
>>> +	     ...
>>> +	     *INDENT-ON*
>>> +
>>> +	     remember just the first one, but skip over additional
>>> +	     ones.  */
>>> +	  if (lr_reg < 0)
>>> +	    lr_reg = (op & 0x03e00000);
>>> +	  continue;
>>> +	}
>>>  
>>>        if ((op & 0xfc1fffff) == 0x7c0802a6)
>>>  	{			/* mflr Rx */
> 
> 
> The above is okay so long as you remove the old "mflr Rx" test.

I've checked this part in, I'll follow up the other part later.

Andrew


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

2004-03-18  Andrew Cagney  <cagney@redhat.com>

	* rs6000-tdep.c (skip_prologue): Record only the first LR save.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.184
diff -u -r1.184 rs6000-tdep.c
--- rs6000-tdep.c	15 Mar 2004 21:21:01 -0000	1.184
+++ rs6000-tdep.c	18 Mar 2004 20:14:38 -0000
@@ -551,9 +551,26 @@
 
       if ((op & 0xfc1fffff) == 0x7c0802a6)
 	{			/* mflr Rx */
-	  lr_reg = (op & 0x03e00000);
-	  continue;
+	  /* Since shared library / PIC code, which needs to get its
+	     address at runtime, can appear to save more than one link
+	     register vis:
+
+	     *INDENT-OFF*
+	     stwu r1,-304(r1)
+	     mflr r3
+	     bl 0xff570d0 (blrl)
+	     stw r30,296(r1)
+	     mflr r30
+	     stw r31,300(r1)
+	     stw r3,308(r1);
+	     ...
+	     *INDENT-ON*
 
+	     remember just the first one, but skip over additional
+	     ones.  */
+	  if (lr_reg < 0)
+	    lr_reg = (op & 0x03e00000);
+	  continue;
 	}
       else if ((op & 0xfc1fffff) == 0x7c000026)
 	{			/* mfcr Rx */

      parent reply	other threads:[~2004-03-19  0:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-16 22:28 Andrew Cagney
2004-03-19  0:09 ` Andrew Cagney
2004-03-19  0:09 ` Kevin Buettner
2004-03-18 16:15   ` Kevin Buettner
2004-03-19  0:10   ` Andrew Cagney [this message]

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=405A0810.90409@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@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