aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-10-22 02:00:06 +0000
committerJakub Jelinek <jakub@redhat.com>2007-10-22 02:00:06 +0000
commit95b76f885b92da85c3ad9164844344598b401e60 (patch)
treea9912d08e3ab122763b939255650f642238d3677
parent1b2393ec9983be7d9f8547c74bce8999509c601c (diff)
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_1-branch@129547 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/linux-unwind.h5
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 03142ec03d7..bacaff70f43 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.*
diff --git a/gcc/config/rs6000/linux-unwind.h b/gcc/config/rs6000/linux-unwind.h
index 6e822bde0e2..3e931030d59 100644
--- a/gcc/config/rs6000/linux-unwind.h
+++ b/gcc/config/rs6000/linux-unwind.h
@@ -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;