[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug target/45807] Lying eh_frame r2 save info causes crashes with static libgcc_eh and libstdc++
From:       "amodra at gmail dot com" <gcc-bugzilla () gcc ! gnu ! org>
Date:       2010-09-30 23:52:39
Message-ID: 201009302352.o8UNqnLs031863 () mailer ! progressive-comp ! com
[Download RAW message or body]

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45807

--- Comment #4 from Alan Modra <amodra at gmail dot com> 2010-09-30 23:52:29 UTC ---
Caught out by sign extension rules.

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c    (revision 164818)
+++ gcc/config/rs6000/rs6000.c    (working copy)
@@ -20234,8 +20242,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);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic