]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ppc: Fix stwux and stdux masks in skip_prologue
authorPedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
Thu, 22 Mar 2018 13:22:45 +0000 (10:22 -0300)
committerPedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
Thu, 22 Mar 2018 13:22:45 +0000 (10:22 -0300)
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 tdep/18295, this
patch addresses the comment in the same PR indicating that the mask
was too permissive.

gdb/Changelog:

PR tdep/18295
* rs6000-tdep.c (skip_prologue): Match both stwux and stdux
a single mask.

gdb/ChangeLog
gdb/rs6000-tdep.c

index cf996bcc87621857a8034029d512be52d41485a3..ef11361356066c88c766bb0e25efd57c1dafc846 100644 (file)
@@ -1,3 +1,9 @@
+2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
+
+       PR tdep/18295
+       * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
+       a single mask.
+
 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
 
        * rs6000-tdep.c (store_insn_p): New function.
index d61fe58d2238a3f0b12ebdcf7f408e84f0199222..37cbcb672bff0d55971a994d8ceb1160a4a8120c 100644 (file)
@@ -1889,8 +1889,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;
@@ -1903,13 +1903,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;