diff options
author | Alan Modra <amodra@gmail.com> | 2010-10-01 12:53:46 +0930 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2010-10-01 12:53:46 +0930 |
commit | d7e7073f49833266e6edf06da6ca283a824799a4 (patch) | |
tree | 9425d20e125a4e958f2e235f56b1404ea90c40ad /gcc/config/rs6000 | |
parent | c98b08ff4b57a5b9755d84c808618d77c4e90bad (diff) | |
download | gcc-d7e7073f49833266e6edf06da6ca283a824799a4.tar.gz |
re PR target/45807 (Lying eh_frame r2 save info causes crashes with static libgcc_eh and libstdc++)
PR target/45807
* config/rs6000/rs6000.c (rs6000_emit_prologue): Properly sign
extend toc_restore_insn.
From-SVN: r164825
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 6399cab0d31..0b058d396ef 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -20234,8 +20234,8 @@ rs6000_emit_prologue (void) be updated if we arrived at this function via a plt call or toc adjusting stub. */ emit_move_insn (tmp_reg_si, gen_rtx_MEM (SImode, tmp_reg)); - toc_restore_insn = ((TARGET_32BIT ? 0x80410014 : 0xE8410028) - ^ 0x80000000) - 0x80000000; + toc_restore_insn = TARGET_32BIT ? 0x80410014 : 0xE8410028; + toc_restore_insn = (toc_restore_insn ^ 0x80000000) - 0x80000000; emit_insn (gen_xorsi3 (tmp_reg_si, tmp_reg_si, GEN_INT (toc_restore_insn & ~0xffff))); compare_result = gen_rtx_REG (CCUNSmode, CR0_REGNO); |