]> 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:43:01 +0000 (02:43 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sun, 21 Oct 2007 00:43:01 +0000 (02:43 +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: r129520

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

index 6abb0ae87e1a754507776c0ef1762865c13e6b19..bf90912496045942bf72f7b53e9c8ef69002cf8b 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-20  Eric B. Weddington  <eweddington@cso.atmel.com>
 
        * config/avr/avr.c (avr_mcu_types): Add at90pwm2b, at90pwm3b.
index f3d76c0df144800102a1ccbc584cc7db2503ab44..4cd961cf9a82ab84b7158e6ab23e740e179eb889 100644 (file)
@@ -250,7 +250,10 @@ ppc_fallback_frame_state (struct _Unwind_Context *context,
       }
 
   fs->regs.reg[R_CR2].how = REG_SAVED_OFFSET;
-  fs->regs.reg[R_CR2].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[R_CR2].loc.offset = (long) &regs->ccr - new_cfa
+                                  + sizeof (long) - 4;
 
   fs->regs.reg[R_LR].how = REG_SAVED_OFFSET;
   fs->regs.reg[R_LR].loc.offset = (long) &regs->link - new_cfa;