]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
linux-unwind.h (ppc_fallback_frame_state): Point saved CR2 offset to low 32 bits...
authorJakub Jelinek <jakub@redhat.com>
Sun, 21 Oct 2007 00:51:31 +0000 (02:51 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sun, 21 Oct 2007 00:51:31 +0000 (02:51 +0200)
* config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Point
saved CR2 offset to low 32 bits of regs->ccr rather than the whole
64-bit register in 64-bit libgcc.

From-SVN: r129521

gcc/ChangeLog
gcc/config/rs6000/linux-unwind.h

index 7acfc843ec3ec4ca64ca8229010d23dd6a9463b9..38279fe60f9c8543e8d1a4df1cd32df370f2baad 100644 (file)
@@ -1,3 +1,9 @@
+2007-10-20  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Point
+       saved CR2 offset to low 32 bits of regs->ccr rather than the whole
+       64-bit register in 64-bit libgcc.
+
 2007-10-18  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/32961
index 6a59a544b1726f0b2a613ff4490c29406e5b73de..61b4b742c469c4fbfd8dc422a5454e77d4074311 100644 (file)
@@ -244,7 +244,10 @@ ppc_fallback_frame_state (struct _Unwind_Context *context,
       }
 
   fs->regs.reg[CR2_REGNO].how = REG_SAVED_OFFSET;
-  fs->regs.reg[CR2_REGNO].loc.offset = (long) &regs->ccr - new_cfa;
+  /* CR? regs are always 32-bit and PPC is big-endian, so in 64-bit
+     libgcc loc.offset needs to point to the low 32 bits of regs->ccr.  */
+  fs->regs.reg[CR2_REGNO].loc.offset = (long) &regs->ccr - new_cfa
+                                      + sizeof (long) - 4;
 
   fs->regs.reg[LINK_REGISTER_REGNUM].how = REG_SAVED_OFFSET;
   fs->regs.reg[LINK_REGISTER_REGNUM].loc.offset = (long) &regs->link - new_cfa;