]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
qrnnd.asm: Mark for noexecstack.
authorRichard Henderson <rth@redhat.com>
Thu, 30 Sep 2004 19:36:28 +0000 (12:36 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 30 Sep 2004 19:36:28 +0000 (12:36 -0700)
        * config/alpha/qrnnd.asm: Mark for noexecstack.

        * unwind-dw2.c (_Unwind_GetGR): Honor DWARF_ZERO_REG.
        * doc/tm.texi (DWARF_ZERO_REG): New.

        * config/alpha/alpha.c (alpha_sa_mask, alpha_expand_prologue,
        alpha_expand_epilogue): Revert 2003-09-30 change to store zero.
        * config/alpha/alpha.h (DWARF_ZERO_REG): New.

From-SVN: r88351

gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/config/alpha/alpha.h
gcc/config/alpha/qrnnd.asm
gcc/unwind-dw2.c

index 6c73f977a060099a6bb5a431cd8a19651415aa26..016d1e0d10cd7a9d7b8fff3a8cdcab4b993b0a41 100644 (file)
@@ -1,3 +1,16 @@
+2004-09-30  Richard Henderson  <rth@redhat.com>
+        * config/alpha/qrnnd.asm: Mark for noexecstack.
+2004-09-30  Richard Henderson  <rth@redhat.com>
+  
+        * unwind-dw2.c (_Unwind_GetGR): Honor DWARF_ZERO_REG.
+        * doc/tm.texi (DWARF_ZERO_REG): New.
+  
+        * config/alpha/alpha.c (alpha_sa_mask, alpha_expand_prologue,
+        alpha_expand_epilogue): Revert 2003-09-30 change to store zero.
+        * config/alpha/alpha.h (DWARF_ZERO_REG): New.
+
 2004-09-30  Release Manager
 
        * GCC 3.3.5 Released.
index 3a0bde446397a6e601523c2e62d3249caf7eafd0..e5ee7d8b0e5eb96f55695cfe63390006721f155e 100644 (file)
@@ -6766,11 +6766,6 @@ alpha_sa_mask (imaskP, fmaskP)
            break;
          imask |= 1L << regno;
        }
-
-      /* Glibc likes to use $31 as an unwind stopper for crt0.  To
-        avoid hackery in unwind-dw2.c, we need to actively store a
-        zero in the prologue of _Unwind_RaiseException et al.  */
-      imask |= 1UL << 31;
     }
 
   /* If any register spilled, then spill the return address also.  */
@@ -7236,24 +7231,6 @@ alpha_expand_prologue ()
            reg_offset += 8;
          }
 
-      /* Store a zero if requested for unwinding.  */
-      if (imask & (1UL << 31))
-       {
-         rtx insn, t;
-         mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));
-         set_mem_alias_set (mem, alpha_sr_alias_set);
-         insn = emit_move_insn (mem, const0_rtx);
-         RTX_FRAME_RELATED_P (insn) = 1;
-         t = gen_rtx_REG (Pmode, 31);
-         t = gen_rtx_SET (VOIDmode, mem, t);
-         t = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, t, REG_NOTES (insn));
-         REG_NOTES (insn) = t;
-         reg_offset += 8;
-       }
       for (i = 0; i < 31; i++)
        if (fmask & (1L << i))
          {
@@ -7674,9 +7651,6 @@ alpha_expand_epilogue ()
            reg_offset += 8;
          }
 
-      if (imask & (1UL << 31))
-       reg_offset += 8;
-
       for (i = 0; i < 31; ++i)
        if (fmask & (1L << i))
          {
index 82a23a27063a1ef6e0503bb8b6ab71a9da7f2021..62e9f7bbf53e59fd8d33f93a3aec56a79d9cd391 100644 (file)
@@ -1299,6 +1299,7 @@ do {                                              \
 #define INCOMING_RETURN_ADDR_RTX  gen_rtx_REG (Pmode, 26)
 #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (26)
 #define DWARF_ALT_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (64)
+#define DWARF_ZERO_REG 31
 
 /* Describe how we implement __builtin_eh_return.  */
 #define EH_RETURN_DATA_REGNO(N)        ((N) < 4 ? (N) + 16 : INVALID_REGNUM)
index d6373ec1bff9e99a9f65368d713a2f42ecd0bf15..da9c4bc83388e9246df2fc16a04ecdac9a6132b1 100644 (file)
  # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  # MA 02111-1307, USA.
 
+#ifdef __ELF__
+.section .note.GNU-stack,""
+#endif
+
         .set noreorder
         .set noat
 
index e0c8ed568c643a3abf62ab30b51bdd9b16c140a5..354b4b7edbff86f6f5f79aa02733e6915e028acf 100644 (file)
@@ -165,6 +165,11 @@ read_8s (const void *p) { const union unaligned *up = p; return up->s8; }
 inline _Unwind_Word
 _Unwind_GetGR (struct _Unwind_Context *context, int index)
 {
+#ifdef DWARF_ZERO_REG
+  if (index == DWARF_ZERO_REG)
+    return 0;
+#endif
+
   /* This will segfault if the register hasn't been saved.  */
   return * (_Unwind_Word *) context->reg[index];
 }