diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-14 18:25:33 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-14 18:25:33 +0000 |
commit | 771a5362c505df9512ca7a4e04879d71acf59f9c (patch) | |
tree | 74200d0b4259405c2cca7263eddb8bb6115ee078 /libgcc | |
parent | 3989b13840ea3e941113ebccd89488d68b9ee8f4 (diff) | |
download | ppe42-gcc-771a5362c505df9512ca7a4e04879d71acf59f9c.tar.gz ppe42-gcc-771a5362c505df9512ca7a4e04879d71acf59f9c.zip |
2013-11-14 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Alan Modra <amodra@gmail.com>
* config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Correct
location of CR save area for 64-bit little-endian systems.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204800 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 6 | ||||
-rw-r--r-- | libgcc/config/rs6000/linux-unwind.h | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 81556a300e9..ba72c24a082 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2013-11-14 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> + Alan Modra <amodra@gmail.com> + + * config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Correct + location of CR save area for 64-bit little-endian systems. + 2013-11-11 Eric Botcazou <ebotcazou@adacore.com> * config.host (arm-wrs-vxworks): Replace arm/t-vxworks with arm/t-elf diff --git a/libgcc/config/rs6000/linux-unwind.h b/libgcc/config/rs6000/linux-unwind.h index c9273c404e2..c481e06dd24 100644 --- a/libgcc/config/rs6000/linux-unwind.h +++ b/libgcc/config/rs6000/linux-unwind.h @@ -185,6 +185,7 @@ ppc_fallback_frame_state (struct _Unwind_Context *context, { struct gcc_regs *regs = get_regs (context); struct gcc_vregs *vregs; + long cr_offset; long new_cfa; int i; @@ -206,11 +207,13 @@ ppc_fallback_frame_state (struct _Unwind_Context *context, fs->regs.reg[i].loc.offset = (long) ®s->gpr[i] - new_cfa; } + /* The CR is saved in the low 32 bits of regs->ccr. */ + cr_offset = (long) ®s->ccr - new_cfa; +#ifndef __LITTLE_ENDIAN__ + cr_offset += sizeof (long) - 4; +#endif fs->regs.reg[R_CR2].how = REG_SAVED_OFFSET; - /* 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) ®s->ccr - new_cfa - + sizeof (long) - 4; + fs->regs.reg[R_CR2].loc.offset = cr_offset; fs->regs.reg[R_LR].how = REG_SAVED_OFFSET; fs->regs.reg[R_LR].loc.offset = (long) ®s->link - new_cfa; |