]> 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>
Mon, 22 Oct 2007 02:00:06 +0000 (04:00 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 22 Oct 2007 02:00:06 +0000 (04:00 +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: r129547

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

index 03142ec03d751d07784c45cfb8e994eadb1c2adc..bacaff70f4361c5f4d87fddbbda35c6097bdec18 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-09-23  H.J. Lu  <hongjiu.lu@intel.com>
 
        * configure.ac (ld_vers): Support GNU linker version xx.xx.*
index 6e822bde0e2a52cb31734c05ff6d617521f57c6f..3e931030d599582fad8158bc51be49119213bc3f 100644 (file)
@@ -264,7 +264,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;