Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Cc: uweigand@de.ibm.com
Subject: [PATCH] [PowerPC] Fix stwux and stdux masks in skip_prologue
Date: Fri, 16 Mar 2018 18:13:00 -0000	[thread overview]
Message-ID: <20180316181251.1632-1-pedromfc@linux.vnet.ibm.com> (raw)

This patch merges the masks for matching the stwux and stdux
instructions in rs6000-tdep.c:skip_prologue into a single mask that
only matches these two instructions.

Commit 72dd273062 fixed the warning described in PR gdb/18295, this
patch addresses the comment in the same PR indicating that the mask
was too permissive.

gdb/Changelog:

2018-mm-dd  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>

	* rs6000-tdep.c (skip_prologue): Match both stwux and stdux
          with a single mask.
---
 gdb/rs6000-tdep.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index a5b70917b7..2b60196247 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1857,8 +1857,8 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
 	  offset = fdata->offset;
 	  continue;
 	}
-      else if ((op & 0xfc1f016e) == 0x7c01016e)
-	{			/* stwux rX,r1,rY */
+      else if ((op & 0xfc1f07fa) == 0x7c01016a)
+	{		/* stwux rX,r1,rY  || stdux rX,r1,rY */
 	  /* No way to figure out what r1 is going to be.  */
 	  fdata->frameless = 0;
 	  offset = fdata->offset;
@@ -1871,13 +1871,6 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
 	  offset = fdata->offset;
 	  continue;
 	}
-      else if ((op & 0xfc1f016a) == 0x7c01016a)
-	{			/* stdux rX,r1,rY */
-	  /* No way to figure out what r1 is going to be.  */
-	  fdata->frameless = 0;
-	  offset = fdata->offset;
-	  continue;
-	}
       else if ((op & 0xffff0000) == 0x38210000)
  	{			/* addi r1,r1,SIMM */
  	  fdata->frameless = 0;
-- 
2.13.6


             reply	other threads:[~2018-03-16 18:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 18:13 Pedro Franco de Carvalho [this message]
2018-03-16 20:05 ` Ulrich Weigand
2018-03-22 13:31   ` Pedro Franco de Carvalho

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=20180316181251.1632-1-pedromfc@linux.vnet.ibm.com \
    --to=pedromfc@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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