]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
config.gcc (with_cpu handling): Translate sparc64 in $machine to --with-cpu=v9.
authorZack Weinberg <zack@gcc.gnu.org>
Sat, 7 Jun 2003 17:11:48 +0000 (17:11 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Sat, 7 Jun 2003 17:11:48 +0000 (17:11 +0000)
* config.gcc (with_cpu handling): Translate sparc64 in
$machine to --with-cpu=v9.
* config/alpha/alpha.c
(TARGET_ASM_GLOBALIZE_LABEL [TARGET_ABI_UNICOSMK]): Correct definition.
(alpha_setup_incoming_varargs): #ifdef out when TARGET_ABI_UNICOSMK.

* target.h: New hook asm_out.file_end.
* target.h: Update to match.  New hook macro TARGET_ASM_FILE_END.
* toplev.c (compile_file: Use targetm.asm_out.file_end.
* system.h: Poison ASM_FILE_END.
* varasm.c (file_end_indicate_exec_stack): New.
* output.h: Prototype it.
* doc/tm.texi: Document TARGET_ASM_FILE_END and
file_end_indicate_exec_stack.  Delete references to attasm.h.

* config/darwin.h (TARGET_ASM_FILE_END): Reset to darwin_file_end.
(ASM_FILE_END): Delete; move code...
* config/darwin.c (darwin_file_end): Here; new function.
* config/darwin-protos.h: Prototype it.
* config/alpha/alpha.c (unicosmk_asm_file_end): Make static,
rename unicosmk_file_end.
* config/arm/aof.h (ASM_FILE_END): Delete; move code...
* config/arm/arm.c (aof_file_end): ... here; new static function.
Set TARGET_ASM_FILE_END to aof_file_end if AOF_ASSEMBLER.
Make aof_dump_imports and aof_dump_pic_table static.
* config/avr/avr.c (asm_file_end): Rename avr_file_end, make static.
Set TARGET_ASM_FILE_END to avr_file_end.
* config/c4x/c4x.c (c4x_file_end): Make static.  Take no arguments.
Set TARGET_ASM_FILE_END to c4x_file_end.
* config/h8300/h8300.c (asm_file_end): Rename h8300_file_end,
make static. Take no arguments.  Set TARGET_ASM_FILE_END to
h8300_file_end.
* config/i370/i370.h (ASM_FILE_END): Delete; move code...
* config/i370/i370.c (i370_file_end): ... here; new static function.
Set TARGET_ASM_FILE_END to i370_file_end.
 * config/i386/i386.c (ix86_asm_file_end): Rename ix86_file_end.
 Take no arguments.  Call file_end_indicate_exec_stack if
 NEED_INDICATE_EXEC_STACK; don't use SUBTARGET_FILE_END.
* config/i386/i386.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
Define NEED_INDICATE_EXEC_STACK to 0.
* config/i386/linux.h, config/i386/linux64.h: Redefine
NEED_INDICATE_EXEC_STACK to 1 instead of setting SUBTARGET_FILE_END.
* config/i386/winnt.c (i386_pe_asm_file_end): Rename to
i386_pe_file_end.  Take no arguments.  Use ix86_file_end.
* config/ia64/ia64.c (ia64_hpux_asm_file_end): Rename to
ia64_hpux_file_end, make static.  Take no arguments.
* config/ip2k/ip2k.c (asm_file_start, asm_file_end,
commands_in_prologues, commands_in_epilogues): Delete.
(function_epilogue): Update to match.
* config/mips/mips.c (mips_asm_file_end): Rename mips_file_end,
make static.  Take no arguments.
(iris6_asm_file_end): Rename iris6_file_end, make static, use
mips_file_end, take no arguments.
Set TARGET_ASM_FILE_END to iris6_file_end or mips_file_end as
appropriate.
* config/mmix/mmix.c (mmix_asm_file_end): Rename mmix_file_end,
make static, take no arguments. Set TARGET_ASM_FILE_END to
mmix_file_end.
* config/pa/pa.c (output_deferred_plabels): Make static, take
no arguments.  Set TARGET_ASM_FILE_END to output_deferred_plabels.
* config/rs6000/xcoff.h (TARGET_ASM_FILE_END): Set it.
(ASM_FILE_END): Delete; move code...
* config/rs6000/rs6000.c (rs6000_xcoff_file_end): ... here;
new static function.

* config/avr/avr.h, config/cris/cris.h, config/h8300/h8300.h
* config/mmix/mmix.h, config/mips/iris6.h, config/mips/mips.h:
Don't set ASM_FILE_END.
* config/alpha/linux-elf.h, config/m68k/linux.h, config/rs6000/linux.h
* config/rs6000/linux64.h, config/s390/linux.h, config/sparc/linux.h
* config/sparc/linux64.h: Set TARGET_ASM_FILE_END to
file_end_indicate_exec_stack; don't set ASM_FILE_END.
* config/alpha/unicosmk.h, config/i386/cygming.h
* config/ia64/hpux.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
* config/arm/arm-protos.h, config/alpha/alpha-protos.h
* config/avr/avr-protos.h, config/c4x/c4x-protos.h
* config/h8300/h8300-protos.h, config/ia64/ia64-protos.h
* config/ip2k/ip2k-protos.h, config/mips/mips-protos.h
* config/mmix/mmix-protos.h, config/pa/pa-protos.h: Update.

From-SVN: r67591

61 files changed:
gcc/ChangeLog
gcc/config.gcc
gcc/config/alpha/alpha-protos.h
gcc/config/alpha/alpha.c
gcc/config/alpha/linux-elf.h
gcc/config/alpha/unicosmk.h
gcc/config/arm/aof.h
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.c
gcc/config/avr/avr-protos.h
gcc/config/avr/avr.c
gcc/config/avr/avr.h
gcc/config/c4x/c4x-protos.h
gcc/config/c4x/c4x.c
gcc/config/c4x/c4x.h
gcc/config/cris/cris.h
gcc/config/darwin-protos.h
gcc/config/darwin.c
gcc/config/darwin.h
gcc/config/h8300/h8300-protos.h
gcc/config/h8300/h8300.c
gcc/config/h8300/h8300.h
gcc/config/i370/i370.c
gcc/config/i370/i370.h
gcc/config/i386/cygming.h
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/linux.h
gcc/config/i386/linux64.h
gcc/config/i386/winnt.c
gcc/config/ia64/hpux.h
gcc/config/ia64/ia64-protos.h
gcc/config/ia64/ia64.c
gcc/config/ip2k/ip2k-protos.h
gcc/config/ip2k/ip2k.c
gcc/config/m68k/linux.h
gcc/config/mips/iris6.h
gcc/config/mips/mips-protos.h
gcc/config/mips/mips.c
gcc/config/mips/mips.h
gcc/config/mmix/mmix-protos.h
gcc/config/mmix/mmix.c
gcc/config/mmix/mmix.h
gcc/config/pa/pa-protos.h
gcc/config/pa/pa.c
gcc/config/pa/pa.h
gcc/config/rs6000/linux.h
gcc/config/rs6000/linux64.h
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/xcoff.h
gcc/config/s390/linux.h
gcc/config/sparc/linux.h
gcc/config/sparc/linux64.h
gcc/doc/tm.texi
gcc/output.h
gcc/system.h
gcc/target-def.h
gcc/target.h
gcc/toplev.c
gcc/varasm.c

index 58bba210f51f8d7c0a6816f6f33d7a0470c8731d..2b58ad4f1ee4fd8999b228a5c70c0c74cba9b85c 100644 (file)
@@ -1,3 +1,85 @@
+2003-06-07  Zack Weinberg  <zack@codesourcery.com>
+
+       * config.gcc (with_cpu handling): Translate sparc64 in
+       $machine to --with-cpu=v9.
+       * config/alpha/alpha.c
+       (TARGET_ASM_GLOBALIZE_LABEL [TARGET_ABI_UNICOSMK]): Correct definition.
+       (alpha_setup_incoming_varargs): #ifdef out when TARGET_ABI_UNICOSMK.
+
+       * target.h: New hook asm_out.file_end.
+       * target.h: Update to match.  New hook macro TARGET_ASM_FILE_END.
+       * toplev.c (compile_file: Use targetm.asm_out.file_end.
+       * system.h: Poison ASM_FILE_END.
+       * varasm.c (file_end_indicate_exec_stack): New.
+       * output.h: Prototype it.
+       * doc/tm.texi: Document TARGET_ASM_FILE_END and
+       file_end_indicate_exec_stack.  Delete references to attasm.h.
+
+       * config/darwin.h (TARGET_ASM_FILE_END): Reset to darwin_file_end.
+       (ASM_FILE_END): Delete; move code...
+       * config/darwin.c (darwin_file_end): Here; new function.
+       * config/darwin-protos.h: Prototype it.
+       * config/alpha/alpha.c (unicosmk_asm_file_end): Make static,
+       rename unicosmk_file_end.
+       * config/arm/aof.h (ASM_FILE_END): Delete; move code...
+       * config/arm/arm.c (aof_file_end): ... here; new static function.
+       Set TARGET_ASM_FILE_END to aof_file_end if AOF_ASSEMBLER.
+       Make aof_dump_imports and aof_dump_pic_table static.
+       * config/avr/avr.c (asm_file_end): Rename avr_file_end, make static.
+       Set TARGET_ASM_FILE_END to avr_file_end.
+       * config/c4x/c4x.c (c4x_file_end): Make static.  Take no arguments.
+       Set TARGET_ASM_FILE_END to c4x_file_end.
+       * config/h8300/h8300.c (asm_file_end): Rename h8300_file_end,
+       make static. Take no arguments.  Set TARGET_ASM_FILE_END to
+       h8300_file_end.
+       * config/i370/i370.h (ASM_FILE_END): Delete; move code...
+       * config/i370/i370.c (i370_file_end): ... here; new static function.
+       Set TARGET_ASM_FILE_END to i370_file_end.
+        * config/i386/i386.c (ix86_asm_file_end): Rename ix86_file_end.
+        Take no arguments.  Call file_end_indicate_exec_stack if
+        NEED_INDICATE_EXEC_STACK; don't use SUBTARGET_FILE_END.
+       * config/i386/i386.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
+       Define NEED_INDICATE_EXEC_STACK to 0.
+       * config/i386/linux.h, config/i386/linux64.h: Redefine
+       NEED_INDICATE_EXEC_STACK to 1 instead of setting SUBTARGET_FILE_END.
+       * config/i386/winnt.c (i386_pe_asm_file_end): Rename to
+       i386_pe_file_end.  Take no arguments.  Use ix86_file_end.
+       * config/ia64/ia64.c (ia64_hpux_asm_file_end): Rename to
+       ia64_hpux_file_end, make static.  Take no arguments.
+       * config/ip2k/ip2k.c (asm_file_start, asm_file_end,
+       commands_in_prologues, commands_in_epilogues): Delete.
+       (function_epilogue): Update to match.
+       * config/mips/mips.c (mips_asm_file_end): Rename mips_file_end,
+       make static.  Take no arguments.
+       (iris6_asm_file_end): Rename iris6_file_end, make static, use
+       mips_file_end, take no arguments.
+       Set TARGET_ASM_FILE_END to iris6_file_end or mips_file_end as
+       appropriate.
+       * config/mmix/mmix.c (mmix_asm_file_end): Rename mmix_file_end,
+       make static, take no arguments. Set TARGET_ASM_FILE_END to
+       mmix_file_end.
+       * config/pa/pa.c (output_deferred_plabels): Make static, take
+       no arguments.  Set TARGET_ASM_FILE_END to output_deferred_plabels.
+       * config/rs6000/xcoff.h (TARGET_ASM_FILE_END): Set it.
+       (ASM_FILE_END): Delete; move code...
+       * config/rs6000/rs6000.c (rs6000_xcoff_file_end): ... here;
+       new static function.
+
+       * config/avr/avr.h, config/cris/cris.h, config/h8300/h8300.h
+       * config/mmix/mmix.h, config/mips/iris6.h, config/mips/mips.h:
+       Don't set ASM_FILE_END.
+       * config/alpha/linux-elf.h, config/m68k/linux.h, config/rs6000/linux.h
+       * config/rs6000/linux64.h, config/s390/linux.h, config/sparc/linux.h
+       * config/sparc/linux64.h: Set TARGET_ASM_FILE_END to
+       file_end_indicate_exec_stack; don't set ASM_FILE_END.
+       * config/alpha/unicosmk.h, config/i386/cygming.h
+       * config/ia64/hpux.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
+       * config/arm/arm-protos.h, config/alpha/alpha-protos.h
+       * config/avr/avr-protos.h, config/c4x/c4x-protos.h
+       * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h
+       * config/ip2k/ip2k-protos.h, config/mips/mips-protos.h
+       * config/mmix/mmix-protos.h, config/pa/pa-protos.h: Update.
+
 Sat Jun  7 18:32:13 CEST 2003  Jan Hubicka  <jh@suse.cz>
 
        * i386.h (OPTION_DEFAULT_SPECS): Avoid -mcpu default when -march is
@@ -312,10 +394,10 @@ Thu Jun  5 13:23:51 CEST 2003  Jan Hubicka  <jh@suse.cz>
 2003-06-05  Nick Clifton  <nickc@redhat.com>
 
        * config.gcc (m32r-elf): Revert previous delta.
-        * config/m32r/t-m32r (crtinit.o): Fix rule to work with
-        multilibs.  Remove m32rx specific version.
-        (crtfini.o): Likewise.
-        (EXTRA_MULTILIB_PARTS): Define.
+       * config/m32r/t-m32r (crtinit.o): Fix rule to work with
+       multilibs.  Remove m32rx specific version.
+       (crtfini.o): Likewise.
+       (EXTRA_MULTILIB_PARTS): Define.
 
 2003-06-05  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
@@ -323,7 +405,7 @@ Thu Jun  5 13:23:51 CEST 2003  Jan Hubicka  <jh@suse.cz>
        constraints related to floating-point registers on SPARC.
 
 2003-06-05  Eric Botcazou  <ebotcazou@libertysurf.fr>
-            Paolo Bonzini  <bonzini@gnu.org>
+           Paolo Bonzini  <bonzini@gnu.org>
 
        PR target/10663
        * configure.in (HAVE_LD_RO_RW_SECTION_MIXING): Redirect
index b8568421adb99f6477ad7de3da97f25be0eae495..f01209f6b11e22b224f131b4c2578de5c154771b 100644 (file)
@@ -2226,6 +2226,9 @@ then
                        ;;
                sparc*-*-*)
                        with_cpu="`echo $machine | sed 's/-.*$//'`"
+                       if [ x$with_cpu = xsparc64 ]; then
+                               with_cpu=v9
+                       fi
                        ;;
                esac
        fi
index d71b2d1ac5b15cc1c63606dfe22d49b19efeee06..460207b6b5dc075dcb42e131670a46b1265ec522 100644 (file)
@@ -180,6 +180,5 @@ extern void unicosmk_output_align PARAMS ((FILE *, int));
 extern char * unicosmk_text_section PARAMS ((void));
 extern char * unicosmk_data_section PARAMS ((void));
 extern void unicosmk_asm_file_start PARAMS ((FILE *));
-extern void unicosmk_asm_file_end PARAMS ((FILE *));
 extern void unicosmk_output_common PARAMS ((FILE *, const char *, int, int));
 #endif /* TARGET_ABI_UNICOSMK */
index eef95ba05e94d06329441ba37785801092aa3e47..1da140e5fc7e682220b869ee2440b2496d3c2ae6 100644 (file)
@@ -269,6 +269,7 @@ static void unicosmk_output_deferred_case_vectors PARAMS ((FILE *));
 static void unicosmk_gen_dsib PARAMS ((unsigned long *imaskP));
 static void unicosmk_output_ssib PARAMS ((FILE *, const char *));
 static int unicosmk_need_dex PARAMS ((rtx));
+static void unicosmk_file_end PARAMS ((void));
 
 /* Get the number of args of a function in one of two ways.  */
 #if TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK
@@ -309,7 +310,7 @@ static void unicosmk_unique_section PARAMS ((tree, int));
 # undef TARGET_ASM_UNIQUE_SECTION
 # define TARGET_ASM_UNIQUE_SECTION unicosmk_unique_section
 # undef TARGET_ASM_GLOBALIZE_LABEL
-# define TARGET_ASM_GLOBALIZE_LABEL hook_FILEptr_constcharptr_void
+# define TARGET_ASM_GLOBALIZE_LABEL hook_void_FILEptr_constcharptr
 #endif
 
 #undef TARGET_ASM_ALIGNED_HI_OP
@@ -6398,7 +6399,7 @@ alpha_build_va_list ()
    not the most efficient way to implement varargs with just one register
    class, but it isn't worth doing anything more efficient in this rare
    case.  */
-
+#ifndef TARGET_ABI_UNICOSMK
 void   
 alpha_setup_incoming_varargs(cum, mode, type, pretend_size, no_rtl)
      CUMULATIVE_ARGS cum;
@@ -6430,6 +6431,7 @@ alpha_setup_incoming_varargs(cum, mode, type, pretend_size, no_rtl)
      }
   *pretend_size = 12 * UNITS_PER_WORD;
 }
+#endif
 
 void
 alpha_va_start (valist, nextarg)
@@ -9663,24 +9665,23 @@ unicosmk_asm_file_start (file)
 /* Output text to appear at the end of an assembler file. This includes all
    pending extern declarations and DEX expressions.  */
 
-void
-unicosmk_asm_file_end (file)
-      FILE *file;
+static void
+unicosmk_file_end ()
 {
-  fputs ("\t.endp\n\n", file);
+  fputs ("\t.endp\n\n", asm_out_file);
 
   /* Output all pending externs.  */
 
-  unicosmk_output_externs (file);
+  unicosmk_output_externs (asm_out_file);
 
   /* Output dex definitions used for functions whose names conflict with 
      register names.  */
 
-  unicosmk_output_dex (file);
+  unicosmk_output_dex (asm_out_file);
 
-  fputs ("\t.end\t", file);
-  unicosmk_output_module_name (file);
-  putc ('\n', file);
+  fputs ("\t.end\t", asm_out_file);
+  unicosmk_output_module_name (asm_out_file);
+  putc ('\n', asm_out_file);
 }
 
 /* Output the definition of a common variable.  */
@@ -9985,7 +9986,7 @@ unicosmk_ssib_name ()
   x = XEXP (x, 0);
   if (GET_CODE (x) != SYMBOL_REF)
     abort ();
-  fnname = default_name_encoding (XSTR (x, 0));
+  fnname = XSTR (x, 0);
 
   len = strlen (fnname);
   if (len + SSIB_PREFIX_LEN > 255)
index c7319f31ffeb604524b896f0a74969e522fa4eb3..f3f1d6723b5c313f331d9fe9607ada87ad1054ba 100644 (file)
@@ -42,9 +42,4 @@ Boston, MA 02111-1307, USA.  */
 #define LIB_SPEC \
 "%{pthread:-lpthread} %{shared:-lc}%{!shared:%{profile:-lc_p}%{!profile:-lc}} "
 
-#define ASM_FILE_END(FILE) \
-  do {                                                                 \
-    named_section_flags (".note.GNU-stack",                            \
-                        SECTION_DEBUG                                  \
-                        | (trampolines_created ? SECTION_CODE : 0));   \
-  } while (0)
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
index 5fc1b342cc0ad9734211e0c6269322b36aff7466..fc0a9703d920d806fbd43e756ce9fae14049e065 100644 (file)
@@ -342,8 +342,7 @@ ssib_section ()                     \
 
 /* This outputs text to go at the end of an assembler file.  */
 
-#undef ASM_FILE_END
-#define ASM_FILE_END(FILE)     unicosmk_asm_file_end (FILE)
+#define TARGET_ASM_FILE_END    unicosmk_file_end
 
 /* We take care of that in ASM_FILE_START.  */
 
index ef0a6faa186dfa8ab922282285cfbadac4dfd0b4..82749ffff8107e847239920386f2844e80848e35 100644 (file)
@@ -170,15 +170,6 @@ do {                                       \
 #define NAME__MAIN "__gccmain"
 #define SYMBOL__MAIN __gccmain
 
-#define ASM_FILE_END(STREAM)           \
-do                                     \
-{                                      \
-  if (flag_pic)                                \
-    aof_dump_pic_table (STREAM);       \
-  aof_dump_imports (STREAM);           \
-  fputs ("\tEND\n", (STREAM));         \
-} while (0);
-
 #define ASM_COMMENT_START ";"
 
 #define ASM_APP_ON ""
index 33117ba3589d133a2cb0f8ce5ef784e7a0d9c3a6..43de1d98e7b9793fb62a0631811a2d911738585f 100644 (file)
@@ -158,12 +158,10 @@ extern int    arm_function_arg_pass_by_reference PARAMS ((CUMULATIVE_ARGS *,
 
 #if defined AOF_ASSEMBLER 
 extern rtx    aof_pic_entry            PARAMS ((rtx));
-extern void   aof_dump_pic_table       PARAMS ((FILE *));
 extern char * aof_text_section         PARAMS ((void));
 extern char * aof_data_section         PARAMS ((void));
 extern void   aof_add_import           PARAMS ((const char *));
 extern void   aof_delete_import                PARAMS ((const char *));
-extern void   aof_dump_imports         PARAMS ((FILE *));
 extern void   zero_init_section                PARAMS ((void));
 extern void   common_section           PARAMS ((void));
 #endif /* AOF_ASSEMBLER */
index f28362af4800783724c00e648bdad1868810425f..5b089e4b44abb6a53162a8e08d379c88c718f15b 100644 (file)
@@ -147,6 +147,9 @@ static void  arm_encode_section_info        PARAMS ((tree, rtx, int));
 #endif
 #ifdef AOF_ASSEMBLER
 static void     aof_globalize_label            PARAMS ((FILE *, Ccstar));
+static void     aof_dump_imports               PARAMS ((FILE *));
+static void     aof_dump_pic_table             PARAMS ((FILE *));
+static void     aof_file_end                   PARAMS ((void));
 #endif
 
 #undef Hint
@@ -172,6 +175,8 @@ static void  aof_globalize_label            PARAMS ((FILE *, Ccstar));
 #define TARGET_ASM_ALIGNED_SI_OP "\tDCD\t"
 #undef TARGET_ASM_GLOBALIZE_LABEL
 #define TARGET_ASM_GLOBALIZE_LABEL aof_globalize_label
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END aof_file_end
 #else
 #undef  TARGET_ASM_ALIGNED_SI_OP
 #define TARGET_ASM_ALIGNED_SI_OP NULL
@@ -12080,7 +12085,7 @@ aof_delete_import (name)
 
 int arm_main_function = 0;
 
-void
+static void
 aof_dump_imports (f)
      FILE * f;
 {
@@ -12113,6 +12118,15 @@ aof_globalize_label (stream, name)
   if (! strcmp (name, "main"))
     arm_main_function = 1;
 }
+
+static void
+aof_file_end ()
+{
+  if (flag_pic)
+    aof_dump_pic_table (asm_out_file);
+  aof_dump_imports (asm_out_file);
+  fputs ("\tEND\n", asm_out_file);
+}
 #endif /* AOF_ASSEMBLER */
 
 #ifdef OBJECT_FORMAT_ELF
index 1e002c88fba78a0c9dc31ba37cc6a40b19c41304..f49538875718f55971ab032d0db1dd5b227a639f 100644 (file)
@@ -23,7 +23,6 @@
 
 extern int    function_arg_regno_p              PARAMS ((int r));
 extern void   asm_file_start                    PARAMS ((FILE *file));
-extern void   asm_file_end                      PARAMS ((FILE *file));
 extern void   avr_init_once                     PARAMS ((void));
 extern void   avr_override_options              PARAMS ((void));
 extern void   avr_optimization_options         PARAMS ((int level, int size));
index 5e4f1c0e9bdeeddaed83312167bbd556d0989d2e..fe883f9d3f9d0a1b48fc75e34e9c54a177a64514 100644 (file)
@@ -63,6 +63,7 @@ static tree   avr_handle_progmem_attribute PARAMS ((tree *, tree, tree, int, boo
 static tree   avr_handle_fndecl_attribute PARAMS ((tree *, tree, tree, int, bool *));
 const struct attribute_spec avr_attribute_table[];
 static bool   avr_assemble_integer PARAMS ((rtx, unsigned int, int));
+static void   avr_file_end PARAMS ((void));
 static void   avr_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void   avr_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 static void   avr_unique_section PARAMS ((tree, int));
@@ -218,6 +219,8 @@ int avr_case_values_threshold = 30000;
 #define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
 #undef TARGET_ASM_INTEGER
 #define TARGET_ASM_INTEGER avr_assemble_integer
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END avr_file_end
 
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE avr_output_function_prologue
@@ -4918,13 +4921,12 @@ asm_file_start (file)
 /* Outputs to the stdio stream FILE some
    appropriate text to go at the end of an assembler file.  */
 
-void
-asm_file_end (file)
-     FILE *file;
+static void
+avr_file_end ()
 {
-  fputs ("/* File ", file);
-  output_quoted_string (file, main_input_filename);
-  fprintf (file,
+  fputs ("/* File ", asm_out_file);
+  output_quoted_string (asm_out_file, main_input_filename);
+  fprintf (asm_out_file,
           ": code %4d = 0x%04x (%4d), prologues %3d, epilogues %3d */\n",
           commands_in_file,
           commands_in_file,
index e8a90d36800c453dadd7cc2bf086c2cc74cc8230..3d09c00b9c0a739a8784d49efbbb58a3c27d924c 100644 (file)
@@ -1699,17 +1699,6 @@ progmem_section ()                                                             \
    On systems that use SDB, it is necessary to output certain
    commands; see `attasm.h'.  */
 
-#define ASM_FILE_END(STREAM) asm_file_end (STREAM)
-/* A C expression which outputs to the stdio stream STREAM some
-   appropriate text to go at the end of an assembler file.
-
-   If this macro is not defined, the default is to output nothing
-   special at the end of the file.  Most systems don't require any
-   definition.
-
-   On systems that use SDB, it is necessary to output certain
-   commands; see `attasm.h'.  */
-
 #define ASM_COMMENT_START " ; "
 /* A C string constant describing how to begin a comment in the target
    assembler language.  The compiler assumes that the comment will
index 3a5f7a7a535e6a64828d60fcfa3a460f589e63ad..458019c1d7498ba165228dc57623d79b45d2af87 100644 (file)
@@ -43,8 +43,6 @@ extern void c4x_global_label (const char *);
 
 extern void c4x_external_ref (const char *);
 
-extern void c4x_file_end (FILE *);
-
 #ifdef TREE_CODE
 extern void c4x_function_arg_advance PARAMS ((CUMULATIVE_ARGS *, 
                                              enum machine_mode, tree, int));
index 19b9047e2b6a03a0365bfef27fcc4761cc73b15e..e708521e50967491a68a5899bf85312350a52b4a 100644 (file)
@@ -186,6 +186,7 @@ static int c4x_valid_operands PARAMS ((enum rtx_code, rtx *,
                                       enum machine_mode, int));
 static int c4x_arn_reg_operand PARAMS ((rtx, enum machine_mode, unsigned int));
 static int c4x_arn_mem_operand PARAMS ((rtx, enum machine_mode, unsigned int));
+static void c4x_file_end PARAMS ((void));
 static void c4x_check_attribute PARAMS ((const char *, tree, tree, tree *));
 static int c4x_r11_set_p PARAMS ((rtx));
 static int c4x_rptb_valid_p PARAMS ((rtx, rtx));
@@ -207,6 +208,8 @@ static int c4x_address_cost PARAMS ((rtx));
 #define TARGET_ASM_ALIGNED_HI_OP NULL
 #undef TARGET_ASM_ALIGNED_SI_OP
 #define TARGET_ASM_ALIGNED_SI_OP NULL
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END c4x_file_end
 
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE c4x_attribute_table
@@ -4562,9 +4565,8 @@ c4x_external_ref (name)
 }
 
 
-void
-c4x_file_end (fp)
-     FILE *fp;
+static void
+c4x_file_end ()
 {
   struct name_list *p;
   
@@ -4572,12 +4574,12 @@ c4x_file_end (fp)
   p = extern_head;
   while (p)
     {
-      fprintf (fp, "\t.ref\t");
-      assemble_name (fp, p->name);
-      fprintf (fp, "\n");
+      fprintf (asm_out_file, "\t.ref\t");
+      assemble_name (asm_out_file, p->name);
+      fprintf (asm_out_file, "\n");
       p = p->next;
     }
-  fprintf (fp, "\t.end\n");
+  fprintf (asm_out_file, "\t.end\n");
 }
 
 
index 70c2afcdbc80287485ec25ea78da69a683813645..bea00ffa1c6de0efa002f38f08d700eb1fdc82a0 100644 (file)
@@ -1602,9 +1602,6 @@ c4x_external_ref (NAME)
 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
 c4x_external_ref (XSTR (FUN, 0))
 
-#define        ASM_FILE_END(FILE) \
-c4x_file_end (FILE)
-
 /* The prefix to add to user-visible assembler symbols.  */
 
 #define USER_LABEL_PREFIX "_"
index f741663b53df8e966748423ea6e6c2477d35993e..cc9d43e5980165685d8c262c13f0c9c53fb16bb6 100644 (file)
@@ -1410,10 +1410,6 @@ call_ ## FUNC (void)                                             \
     }                                                          \
   while (0)
 
-/* Override previous definitions (elfos.h).  */
-#undef ASM_FILE_END
-#define ASM_FILE_END(STREAM)
-
 /* We don't want an .ident for gcc.  To avoid that but still support
    #ident, we override ASM_OUTPUT_IDENT and, since the gcc .ident is its
    only use besides ASM_OUTPUT_IDENT, undef IDENT_ASM_OP from elfos.h.  */
index 518bea83c69b438f71d18d7dcddc8541928196c9..ad8b2340ae6ebd27a8c9185892f446d9540d7bdb 100644 (file)
@@ -78,6 +78,8 @@ extern void darwin_pragma_ignore PARAMS ((struct cpp_reader *));
 extern void darwin_pragma_options PARAMS ((struct cpp_reader *));
 extern void darwin_pragma_unused PARAMS ((struct cpp_reader *));
 
+extern void darwin_file_end PARAMS ((void));
+
 /* Expanded by EXTRA_SECTION_FUNCTIONS into varasm.o.  */
 extern void const_section PARAMS ((void));
 extern void const_data_section PARAMS ((void));
index d9ba56f7a5e1261d6f82fa767c91408682058ca6..c17fc74ba087e48aa666a1dacc39728797377cb0 100644 (file)
@@ -1374,5 +1374,17 @@ darwin_asm_output_dwarf_delta (file, size, lab1, lab2)
     fprintf (file, "\n\t.long L$set$%d", darwin_dwarf_label_counter++);
 }
 
+void
+darwin_file_end ()
+{
+  machopic_finish (asm_out_file);
+  if (strcmp (lang_hooks.name, "GNU C++") == 0)
+    {
+      constructor_section ();
+      destructor_section ();
+      ASM_OUTPUT_ALIGN (asm_out_file, 1);
+    }
+}
+
 #include "gt-darwin.h"
 
index 72c1eebcd5a744cda3cb4ef09ace6d71cdf59bf2..eebb0ee12c62b57d1ed91ced7b3aa13d7d86dc7e 100644 (file)
@@ -330,17 +330,8 @@ do { text_section ();                                                      \
 #undef ASM_FILE_START
 #define ASM_FILE_START(FILE)
 
-#undef ASM_FILE_END
-#define ASM_FILE_END(FILE)                                     \
-  do {                                                         \
-    machopic_finish (asm_out_file);                             \
-    if (strcmp (lang_hooks.name, "GNU C++") == 0)              \
-      {                                                                \
-       constructor_section ();                                 \
-       destructor_section ();                                  \
-       ASM_OUTPUT_ALIGN (FILE, 1);                             \
-      }                                                                \
-  } while (0)
+#undef  TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END darwin_file_end
 
 #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
   fprintf (FILE, "\t.space "HOST_WIDE_INT_PRINT_UNSIGNED"\n", SIZE)
index 6cdfbeed57180b0afee11b39f98a3aefde28f370..025f42311318c6f75935d89579a81bbc361b2aa8 100644 (file)
@@ -95,7 +95,6 @@ extern void h8300_expand_prologue PARAMS ((void));
 extern void h8300_expand_epilogue PARAMS ((void));
 extern int h8300_current_function_interrupt_function_p PARAMS ((void));
 extern void asm_file_start PARAMS ((FILE *));
-extern void asm_file_end PARAMS ((FILE *));
 extern int h8300_initial_elimination_offset PARAMS ((int, int));
 
 struct cpp_reader;
index 7ab530dbc8eb077d2c092181e14e15de8bd4cdfe..ae01d281795609637cd81bf69bdf948a9494f443 100644 (file)
@@ -63,6 +63,7 @@ static tree h8300_handle_eightbit_data_attribute PARAMS ((tree *, tree, tree, in
 static tree h8300_handle_tiny_data_attribute PARAMS ((tree *, tree, tree, int, bool *));
 static void h8300_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 static void h8300_insert_attributes PARAMS ((tree, tree *));
+static void h8300_file_end PARAMS ((void));
 #ifndef OBJECT_FORMAT_ELF
 static void h8300_asm_named_section PARAMS ((const char *, unsigned int));
 #endif
@@ -112,6 +113,10 @@ const char *h8_push_op, *h8_pop_op, *h8_mov_op;
 
 #undef TARGET_ASM_FUNCTION_EPILOGUE
 #define TARGET_ASM_FUNCTION_EPILOGUE h8300_output_function_epilogue
+
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END h8300_file_end
+
 #undef TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO h8300_encode_section_info
 
@@ -715,11 +720,10 @@ asm_file_start (file)
 
 /* Output assembly language code for the end of file.  */
 
-void
-asm_file_end (file)
-     FILE *file;
+static void
+h8300_file_end ()
 {
-  fprintf (file, "\t.end\n");
+  fputs ("\t.end\n", asm_out_file);
 }
 \f
 /* Return true if OP is a valid source operand for an integer move
index 3225b2cce277d2c907c9dd090d50fdcbe5245672..e979e972ea2dc04a4dfcf78c7f95c716ef0e416e 100644 (file)
@@ -1039,8 +1039,6 @@ struct cum_arg
 
 #define ASM_FILE_START(FILE) asm_file_start (FILE)
 
-#define ASM_FILE_END(FILE) asm_file_end (FILE)
-
 /* Output to assembler file text saying following lines
    may contain character constants, extra white space, comments, etc.  */
 
index da26b9e9d6849b0f7d42b7c84ca811683d3392d1..cbb118b1b9b0e34bd10709697a8873b5c723ea52 100644 (file)
@@ -107,6 +107,8 @@ static void i370_globalize_label PARAMS ((FILE *, const char *));
 #endif
 static void i370_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void i370_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
+static void i370_file_end PARAMS ((void));
+
 #ifdef LONGEXTERNAL
 static int mvs_hash_alias PARAMS ((const char *));
 #endif
@@ -318,6 +320,8 @@ static const unsigned char ebcasc[256] =
 #define TARGET_ASM_FUNCTION_PROLOGUE i370_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
 #define TARGET_ASM_FUNCTION_EPILOGUE i370_output_function_epilogue
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END i370_file_end
 #undef TARGET_ASM_INTERNAL_LABEL
 #define  TARGET_ASM_INTERNAL_LABEL i370_internal_label
 #undef TARGET_RTX_COSTS
@@ -1598,6 +1602,12 @@ i370_output_function_epilogue (file, l)
     fprintf (file, "\tDC\tA(PG%d)\n", i);
 }
 
+static void
+i370_file_end ()
+{
+  fputs ("\tEND\n", asm_out_file);
+}
+
 static void
 i370_internal_label (stream, prefix, labelno)
      FILE *stream;
index a52bb804a6e544b0c948dc84fcb45d2b72f2ee04..fcdde6afda76ad5fd4587c24519d8e01d3a6aa61 100644 (file)
@@ -1036,7 +1036,6 @@ enum reg_class
 { fputs ("\tRMODE\tANY\n", FILE);                                      \
   fputs ("\tCSECT\n", FILE); }
 
-#define ASM_FILE_END(FILE) fputs ("\tEND\n", FILE);
 #define ASM_COMMENT_START "*"
 #define ASM_APP_OFF ""
 #define ASM_APP_ON ""
index d6f2a85319b78123124e1948265e641c497b56ec..2f9b0a1920efb9abf1824fa6ab7945fffb51bb98 100644 (file)
@@ -294,9 +294,8 @@ extern void i386_pe_unique_section PARAMS ((TREE, int));
   asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
 
 /* Output function declarations at the end of the file.  */
-#undef ASM_FILE_END
-#define ASM_FILE_END(FILE) \
-  i386_pe_asm_file_end (FILE)
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END i386_pe_file_end
 
 #undef ASM_COMMENT_START
 #define ASM_COMMENT_START " #"
@@ -332,7 +331,7 @@ extern void i386_pe_unique_section PARAMS ((TREE, int));
 extern void i386_pe_record_external_function PARAMS ((const char *));
 extern void i386_pe_declare_function_type PARAMS ((FILE *, const char *, int));
 extern void i386_pe_record_exported_symbol PARAMS ((const char *, int));
-extern void i386_pe_asm_file_end PARAMS ((FILE *));
+extern void i386_pe_file_end PARAMS ((void));
 extern int i386_pe_dllexport_name_p PARAMS ((const char *));
 extern int i386_pe_dllimport_name_p PARAMS ((const char *));
 
index a7d76e7dce6b052d03eae05c6fe399bbf31d5bf5..c40ce6967cedb8c7d5904a146da62bc02315dc14 100644 (file)
@@ -27,7 +27,7 @@ extern int ix86_can_use_return_insn_p PARAMS ((void));
 extern int ix86_frame_pointer_required PARAMS ((void));
 extern void ix86_setup_frame_addresses PARAMS ((void));
 
-extern void ix86_asm_file_end PARAMS ((FILE *));
+extern void ix86_file_end PARAMS ((void));
 extern HOST_WIDE_INT ix86_initial_elimination_offset PARAMS((int, int));
 extern void ix86_expand_prologue PARAMS ((void));
 extern void ix86_expand_epilogue PARAMS ((int));
index 79c81be5de40a283073bbb957e673f6c3af7613e..acf037e60e24c0248887dd61acda410e2f0266cd 100644 (file)
@@ -4705,8 +4705,7 @@ get_pc_thunk_name (name, regno)
    the return address of the caller and then returns.  */
 
 void
-ix86_asm_file_end (file)
-     FILE *file;
+ix86_file_end ()
 {
   rtx xops[2];
   int regno;
@@ -4733,16 +4732,16 @@ ix86_asm_file_end (file)
          (*targetm.asm_out.unique_section) (decl, 0);
          named_section (decl, NULL, 0);
 
-         (*targetm.asm_out.globalize_label) (file, name);
-         fputs ("\t.hidden\t", file);
-         assemble_name (file, name);
-         fputc ('\n', file);
-         ASM_DECLARE_FUNCTION_NAME (file, name, decl);
+         (*targetm.asm_out.globalize_label) (asm_out_file, name);
+         fputs ("\t.hidden\t", asm_out_file);
+         assemble_name (asm_out_file, name);
+         fputc ('\n', asm_out_file);
+         ASM_DECLARE_FUNCTION_NAME (asm_out_file, name, decl);
        }
       else
        {
          text_section ();
-         ASM_OUTPUT_LABEL (file, name);
+         ASM_OUTPUT_LABEL (asm_out_file, name);
        }
 
       xops[0] = gen_rtx_REG (SImode, regno);
@@ -4751,9 +4750,8 @@ ix86_asm_file_end (file)
       output_asm_insn ("ret", xops);
     }
 
-#ifdef SUBTARGET_FILE_END
-  SUBTARGET_FILE_END (file);
-#endif
+  if (NEED_INDICATE_EXEC_STACK)
+    file_end_indicate_exec_stack ();
 }
 
 /* Emit code for the SET_GOT patterns.  */
index 536e61bed218859ffc0c5f75c626f508cbd9ff94..03d4f60d43ce302baa613c8413c0089585943758 100644 (file)
@@ -1825,11 +1825,8 @@ typedef struct ix86_args {
 #define EXPAND_BUILTIN_VA_ARG(VALIST, TYPE) \
   ix86_va_arg ((VALIST), (TYPE))
 
-/* This macro is invoked at the end of compilation.  It is used here to
-   output code for -fpic that will load the return address into %ebx.  */
-
-#undef ASM_FILE_END
-#define ASM_FILE_END(FILE)  ix86_asm_file_end (FILE)
+#define TARGET_ASM_FILE_END ix86_file_end
+#define NEED_INDICATE_EXEC_STACK 0
 
 /* Output assembler code to FILE to increment profiler label # LABELNO
    for profiling a function entry.  */
index 8f0a22c049486fbe1ee70dd4ba774d60f5f10c67..df66a58447bf4bf778f952e4a55e5e7bd06432de 100644 (file)
@@ -223,12 +223,8 @@ Boston, MA 02111-1307, USA.  */
           : "=d"(BASE))
 #endif
 
-#define SUBTARGET_FILE_END(FILE) \
-  do {                                                                 \
-    named_section_flags (".note.GNU-stack",                            \
-                        SECTION_DEBUG                                  \
-                        | (trampolines_created ? SECTION_CODE : 0));   \
-  } while (0)
+#undef NEED_INDICATE_EXEC_STACK
+#define NEED_INDICATE_EXEC_STACK 1
 
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
index ec398de8d6650488951339f00e4385096ab81f67..582a22bacd4f0e4f912865891ccaf5a17126042d 100644 (file)
@@ -71,12 +71,8 @@ Boston, MA 02111-1307, USA.  */
 
 #define MULTILIB_DEFAULTS { "m64" }
 
-#define SUBTARGET_FILE_END(FILE) \
-  do {                                                                 \
-    named_section_flags (".note.GNU-stack",                            \
-                        SECTION_DEBUG                                  \
-                        | (trampolines_created ? SECTION_CODE : 0));   \
-  } while (0)
+#undef NEED_INDICATE_EXEC_STACK
+#define NEED_INDICATE_EXEC_STACK 1
 
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  
index 04f5cedb036338f380a7081c4a01c7f19074137f..97cea6c58f5e293185f4fc7865f9fee97fa8e329 100644 (file)
@@ -763,12 +763,11 @@ i386_pe_record_exported_symbol (name, is_data)
    output the .drectve section.  */
 
 void
-i386_pe_asm_file_end (file)
-     FILE *file;
+i386_pe_file_end ()
 {
   struct extern_list *p;
 
-  ix86_asm_file_end (file);
+  ix86_file_end ();
 
   for (p = extern_head; p != NULL; p = p->next)
     {
@@ -780,7 +779,8 @@ i386_pe_asm_file_end (file)
       if (! TREE_ASM_WRITTEN (decl) && TREE_SYMBOL_REFERENCED (decl))
        {
          TREE_ASM_WRITTEN (decl) = 1;
-         i386_pe_declare_function_type (file, p->name, TREE_PUBLIC (decl));
+         i386_pe_declare_function_type (asm_out_file, p->name,
+                                        TREE_PUBLIC (decl));
        }
     }
 
@@ -790,7 +790,7 @@ i386_pe_asm_file_end (file)
       drectve_section ();
       for (q = export_head; q != NULL; q = q->next)
        {
-         fprintf (file, "\t.ascii \" -export:%s%s\"\n",
+         fprintf (asm_out_file, "\t.ascii \" -export:%s%s\"\n",
                   i386_pe_strip_name_encoding (q->name),
                   (q->is_data) ? ",data" : "");
        }
index 8e933b85fd4b0bb1bba92f55997dcf02f198dad6..60674ba49b4126672cb6e0eb30d4d1b423d2a0a5 100644 (file)
@@ -136,7 +136,7 @@ do {                                                                \
 
 /* Put out the needed function declarations at the end.  */
 
-#define ASM_FILE_END(STREAM) ia64_hpux_asm_file_end(STREAM)
+#define TARGET_ASM_FILE_END ia64_hpux_file_end
 
 #undef CTORS_SECTION_ASM_OP
 #define CTORS_SECTION_ASM_OP  "\t.section\t.init_array,\t\"aw\",\"init_array\""
index 16d32fdc39d26365dbba3c7741376496e97c8a23..e0760f3e17b760ae1bd859542da32e30e4e77ba9 100644 (file)
@@ -153,4 +153,3 @@ extern enum direction ia64_hpux_function_arg_padding PARAMS ((enum machine_mode,
 #endif /* ARGS_SIZE_RTX */
 
 extern void ia64_hpux_handle_builtin_pragma PARAMS ((struct cpp_reader *));
-extern void ia64_hpux_asm_file_end PARAMS ((FILE *));
index 84f45af4f7b02ed79c24ddf8c8faa4f7aff444b9..ab49ff63328f869b44a584c4a2325f6491bc37ed 100644 (file)
@@ -257,6 +257,9 @@ static unsigned int ia64_rwreloc_section_type_flags
 
 static void ia64_hpux_add_extern_decl PARAMS ((const char *name))
      ATTRIBUTE_UNUSED;
+static void ia64_hpux_file_end PARAMS ((void))
+     ATTRIBUTE_UNUSED;
+
 \f
 /* Table of valid machine attributes.  */
 static const struct attribute_spec ia64_attribute_table[] =
@@ -8359,9 +8362,8 @@ ia64_hpux_add_extern_decl (name)
 
 /* Print out the list of used global functions.  */
 
-void
-ia64_hpux_asm_file_end (file)
-       FILE *file;
+static void
+ia64_hpux_file_end ()
 {
   while (extern_func_head)
     {
@@ -8376,12 +8378,13 @@ ia64_hpux_asm_file_end (file)
         {
          if (decl)
            TREE_ASM_WRITTEN (decl) = 1;
-         (*targetm.asm_out.globalize_label) (file, extern_func_head->name);
-         fprintf (file, "%s", TYPE_ASM_OP);
-         assemble_name (file, extern_func_head->name);
-         putc (',', file);
-         fprintf (file, TYPE_OPERAND_FMT, "function");
-         putc ('\n', file);
+         (*targetm.asm_out.globalize_label) (asm_out_file,
+                                             extern_func_head->name);
+         fputs (TYPE_ASM_OP, asm_out_file);
+         assemble_name (asm_out_file, extern_func_head->name);
+         putc (',', asm_out_file);
+         fprintf (asm_out_file, TYPE_OPERAND_FMT, "function");
+         putc ('\n', asm_out_file);
         }
       extern_func_head = extern_func_head->next;
     }
index ba9a8ee7a50700063eea7074d81f6896d171b5ed..0bc901c8462dfd9fa32723fde04bea28d26584c3 100644 (file)
@@ -18,9 +18,6 @@
    the Free Software Foundation, 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-extern void asm_file_start PARAMS ((FILE *));
-extern void asm_file_end PARAMS ((FILE *));
-
 extern void function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 extern void function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 extern int find_one_set_bit_p PARAMS ((HOST_WIDE_INT));
index c8c17ccc3d0b51faa4cb8762ee16d2d93d64d3d9..3e165054c951ed38fc3b423e448987f473709962 100644 (file)
@@ -111,12 +111,6 @@ const struct attribute_spec ip2k_attribute_table[];
 
 struct gcc_target targetm = TARGET_INITIALIZER;
 
-/* Commands in the functions prologues in the compiled file.  */
-static int commands_in_prologues;
-
-/* Commands in the functions epilogues in the compiled file.  */
-static int commands_in_epilogues;
-
 /* Prologue/Epilogue size in words.  */
 static int prologue_size;
 static int epilogue_size;
@@ -536,8 +530,6 @@ function_epilogue (file, size)
     }
   
   fprintf (file, "/* epilogue end (size=%d) */\n", epilogue_size);
-  commands_in_prologues += prologue_size;
-  commands_in_epilogues += epilogue_size;
 }
 \f
 /* Return the difference between the registers after the function
@@ -3242,32 +3234,6 @@ ip2k_handle_fndecl_attribute (node, name, args, flags, no_add_attrs)
   return NULL_TREE;
 }
 
-/* Outputs to the stdio stream FILE some
-   appropriate text to go at the start of an assembler file.  */
-
-void
-asm_file_start (file)
-     FILE *file;
-{
-  output_file_directive (file, main_input_filename);
-  
-  commands_in_prologues = 0;
-  commands_in_epilogues = 0;
-}
-
-/* Outputs to the stdio stream FILE some
-   appropriate text to go at the end of an assembler file.  */
-
-void
-asm_file_end (file)
-     FILE *file;
-{
-  fprintf
-    (file,
-     "/* File %s: prologues %3d, epilogues %3d */\n",
-     main_input_filename, commands_in_prologues, commands_in_epilogues);
-}
-
 /* Cost functions.  */
 
 /* Compute a (partial) cost for rtx X.  Return true if the complete
index 82015d300ae9acb6925aefbe446edceb3aa6f41f..073eed76196a3b7e3c9de50e561bad870d1dc285 100644 (file)
@@ -335,9 +335,4 @@ do {                                                                        \
      : "%d0", "%d2", "%d3");                                           \
 }
 
-#define ASM_FILE_END(FILE) \
-  do {                                                                 \
-    named_section_flags (".note.GNU-stack",                            \
-                        SECTION_DEBUG                                  \
-                        | (trampolines_created ? SECTION_CODE : 0));   \
-  } while (0)
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
index f4d303ccb49aba9bf863592439414fe0c4984614..9ba7d21d2c1a7ace813583eb776cfd00452e7aba 100644 (file)
@@ -358,8 +358,6 @@ current_section_flags ()                                            \
 #define ASM_OUTPUT_ALIGN iris6_asm_output_align
 #undef ASM_FILE_START
 #define ASM_FILE_START  iris6_asm_file_start
-#undef ASM_FILE_END
-#define ASM_FILE_END   iris6_asm_file_end
 
 #undef MAX_OFILE_ALIGNMENT
 #define MAX_OFILE_ALIGNMENT (32768*8)
index d74cfbc57468719e1a499f317b17e9d1ee22952e..a08cf008dd06632e2d84a00f5ac3119c320dc75c 100644 (file)
@@ -28,10 +28,8 @@ Boston, MA 02111-1307, USA.  */
 
 extern HOST_WIDE_INT   compute_frame_size PARAMS ((HOST_WIDE_INT));
 extern int             mips_initial_elimination_offset PARAMS ((int, int));
-extern void            mips_asm_file_end PARAMS ((FILE *));
 extern void            mips_asm_file_start PARAMS ((FILE *));
 extern void            iris6_asm_file_start PARAMS ((FILE *));
-extern void            iris6_asm_file_end PARAMS ((FILE *));
 extern void            iris6_asm_output_align PARAMS ((FILE *, unsigned));
 extern const char *    current_section_name PARAMS ((void));
 extern unsigned int    current_section_flags PARAMS ((void));
index 0b216105e0aeeeb75e55bcebc053d804f37614e5..af2bbf3acd81f0fa046a711aa877bc2be5dbfcca 100644 (file)
@@ -272,6 +272,7 @@ static void iris6_asm_named_section         PARAMS ((const char *,
 static int iris_section_align_entry_eq         PARAMS ((const PTR, const PTR));
 static hashval_t iris_section_align_entry_hash PARAMS ((const PTR));
 static int iris6_section_align_1               PARAMS ((void **, void *));
+static void iris6_file_end                     PARAMS ((void));
 #endif
 static int mips_adjust_cost                    PARAMS ((rtx, rtx, rtx, int));
 static int mips_issue_rate                     PARAMS ((void));
@@ -287,7 +288,7 @@ static int mips_use_dfa_pipeline_interface      PARAMS ((void));
 static bool mips_rtx_costs                     PARAMS ((rtx, int, int, int *));
 static int mips_address_cost                    PARAMS ((rtx));
 static void mips_encode_section_info            PARAMS ((tree, rtx, int));
-
+static void mips_file_end                      PARAMS ((void));
 
 /* Structure to be filled in by compute_frame_size with register
    save masks, and offsets for the current function.  */
@@ -872,6 +873,13 @@ const struct mips_cpu_info mips_cpu_info_table[] = {
 #undef TARGET_MACHINE_DEPENDENT_REORG
 #define TARGET_MACHINE_DEPENDENT_REORG mips_reorg
 
+#undef TARGET_ASM_FILE_END
+#ifdef TARGET_IRIX6
+#define TARGET_ASM_FILE_END iris6_file_end
+#else
+#define TARGET_ASM_FILE_END mips_file_end
+#endif
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* If X is one of the constants described by mips_constant_type,
@@ -6550,16 +6558,15 @@ mips_asm_file_start (stream)
    warning if the data area is more than 32K and -pic because 3 instructions
    are needed to reference the data pointers.  */
 
-void
-mips_asm_file_end (file)
-     FILE *file;
+static void
+mips_file_end ()
 {
   tree name_tree;
   struct extern_list *p;
 
   if (extern_head)
     {
-      fputs ("\n", file);
+      fputs ("\n", asm_out_file);
 
       for (p = extern_head; p != 0; p = p->next)
        {
@@ -6571,13 +6578,13 @@ mips_asm_file_end (file)
              TREE_ASM_WRITTEN (name_tree) = 1;
 #ifdef ASM_OUTPUT_UNDEF_FUNCTION
              if (p->size == -1)
-               ASM_OUTPUT_UNDEF_FUNCTION (file, p->name);
+               ASM_OUTPUT_UNDEF_FUNCTION (asm_out_file, p->name);
              else
 #endif
                {
-                 fputs ("\t.extern\t", file);
-                 assemble_name (file, p->name);
-                 fprintf (file, ", %d\n", p->size);
+                 fputs ("\t.extern\t", asm_out_file);
+                 assemble_name (asm_out_file, p->name);
+                 fprintf (asm_out_file, ", %d\n", p->size);
                }
            }
        }
@@ -6585,8 +6592,8 @@ mips_asm_file_end (file)
 
   if (TARGET_FILE_SWITCHING)
     {
-      fprintf (file, "\n\t.text\n");
-      copy_file_data (file, asm_out_text_file);
+      fputs ("\n\t.text\n", asm_out_file);
+      copy_file_data (asm_out_file, asm_out_text_file);
     }
 }
 
@@ -6612,7 +6619,7 @@ copy_file_data (to, from)
 }
 
 /* Emit either a label, .comm, or .lcomm directive, and mark that the symbol
-   is used, so that we don't emit an .extern for it in mips_asm_file_end.  */
+   is used, so that we don't emit an .extern for it in mips_file_end.  */
 
 void
 mips_declare_object (stream, name, init_string, final_string, size)
@@ -10717,19 +10724,19 @@ iris6_section_align_1 (slot, data)
   return 1;
 }
 
-void
-iris6_asm_file_end (stream)
-     FILE *stream;
+static void
+iris6_file_end ()
 {
   /* Emit section directives with the proper alignment at the top of the
      real output file.  */
+  FILE *temp = asm_out_file;
   asm_out_file = iris_orig_asm_out_file;
   htab_traverse (iris_section_align_htab, iris6_section_align_1, NULL);
 
   /* Copy the data emitted to the temp file to the real output file.  */
-  copy_file_data (asm_out_file, stream);
+  copy_file_data (asm_out_file, temp);
 
-  mips_asm_file_end (stream);
+  mips_file_end ();
 }
 #endif /* TARGET_IRIX6 */
 
index 6f550058981ff808572b534de98170f620f29380..abc3e4fd57ee7a81d28ed43146fc442c0403d6a9 100644 (file)
@@ -3930,11 +3930,6 @@ while (0)
 #define ASM_OUTPUT_EXTERNAL(STREAM,DECL,NAME) \
   mips_output_external(STREAM,DECL,NAME)
 
-/* This says what to print at the end of the assembly file */
-#undef ASM_FILE_END
-#define ASM_FILE_END(STREAM) mips_asm_file_end(STREAM)
-
-
 /* Play switch file games if we're optimizing the global pointer.  */
 
 #undef TEXT_SECTION
index cd5bdb17cce1e05ade99e6a3ec18225cee67c278..24ba481320966ade27116f3d2ee162b272414c6f 100644 (file)
@@ -34,7 +34,6 @@ extern int mmix_register_move_cost
 extern const char *mmix_text_section_asm_op PARAMS ((void));
 extern const char *mmix_data_section_asm_op PARAMS ((void));
 extern void mmix_asm_file_start PARAMS ((FILE *));
-extern void mmix_asm_file_end PARAMS ((FILE *));
 extern void mmix_asm_output_source_filename PARAMS ((FILE *, const char *));
 extern void mmix_output_quoted_string PARAMS ((FILE *, const char *, int));
 extern void mmix_asm_output_source_line  PARAMS ((FILE *, int));
index 211033518a21baec6ce69e334afba4a25f83abc6..bf2a4a22f2106c654cd0f612e489126ec78a5c7c 100644 (file)
@@ -135,6 +135,7 @@ static void mmix_target_asm_function_epilogue
 static void mmix_reorg PARAMS ((void));
 static void mmix_asm_output_mi_thunk
   PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
+static void mmix_file_end PARAMS ((void));
 static bool mmix_rtx_costs
   PARAMS ((rtx, int, int, int *));
 
@@ -173,6 +174,8 @@ static bool mmix_rtx_costs
 #define TARGET_ASM_OUTPUT_MI_THUNK mmix_asm_output_mi_thunk
 #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
 #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END mmix_file_end
 
 #undef TARGET_RTX_COSTS
 #define TARGET_RTX_COSTS mmix_rtx_costs
@@ -1310,11 +1313,10 @@ mmix_asm_file_start (stream)
   text_section ();
 }
 
-/* ASM_FILE_END.  */
+/* TARGET_ASM_FILE_END.  */
 
-void
-mmix_asm_file_end (stream)
-     FILE * stream ATTRIBUTE_UNUSED;
+static void
+mmix_file_end ()
 {
   /* Make sure each file ends with the data section. */
   data_section ();
index 179a5855a6266a78ce98a5d37dda1fece30274c2..16c434f0fcb4c1fa5b784c026fe6d37a5e11d552 100644 (file)
@@ -922,9 +922,6 @@ typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
 #define ASM_FILE_START(STREAM) \
  mmix_asm_file_start (STREAM)
 
-#define ASM_FILE_END(STREAM) \
- mmix_asm_file_end (STREAM)
-
 /* While any other punctuation character but ";" would do, we prefer "%"
    or "!"; "!" is an unary operator and so will not be mistakenly included
    in correctly formed expressions.  The hash character adds mass; catches
index b7e46eb6da2261ed3d55c7f1c0a0000d1a6e2068..cff08c2ba1d96761145f2900e8856e074628b751 100644 (file)
@@ -133,7 +133,6 @@ extern int zdepi_cint_p PARAMS ((unsigned HOST_WIDE_INT));
 
 extern struct rtx_def *hppa_builtin_saveregs PARAMS ((void));
 
-extern void output_deferred_plabels PARAMS ((FILE *));
 extern void override_options PARAMS ((void));
 extern void output_ascii PARAMS ((FILE *, const char *, int));
 extern int compute_frame_size PARAMS ((int, int *));
index 547c21174dc8d46d61bb806236eb59bc8a4e466f..3c775954d1f4b2944149c0fd89cc6ed029e34098 100644 (file)
@@ -136,6 +136,7 @@ static void copy_fp_args PARAMS ((rtx)) ATTRIBUTE_UNUSED;
 static int length_fp_args PARAMS ((rtx)) ATTRIBUTE_UNUSED;
 static struct deferred_plabel *get_plabel PARAMS ((const char *))
      ATTRIBUTE_UNUSED;
+static void output_deferred_plabels PARAMS ((void));
 
 /* Save the operands last given to a compare for use when we
    generate a scc or bcc insn.  */
@@ -174,6 +175,7 @@ struct deferred_plabel GTY(())
 static GTY((length ("n_deferred_plabels"))) struct deferred_plabel *
   deferred_plabels;
 static size_t n_deferred_plabels = 0;
+
 \f
 /* Initialize the GCC target structure.  */
 
@@ -217,6 +219,9 @@ static size_t n_deferred_plabels = 0;
 #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
 #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall
 
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END output_deferred_plabels
+
 #if !defined(USE_COLLECT2)
 #undef TARGET_ASM_CONSTRUCTOR
 #define TARGET_ASM_CONSTRUCTOR pa_asm_out_constructor
@@ -4939,9 +4944,8 @@ get_plabel (fname)
   return &deferred_plabels[i];
 }
 
-void
-output_deferred_plabels (file)
-     FILE *file;
+static void
+output_deferred_plabels ()
 {
   size_t i;
   /* If we have deferred plabels, then we need to switch into the data
@@ -4950,13 +4954,14 @@ output_deferred_plabels (file)
   if (n_deferred_plabels)
     {
       data_section ();
-      ASM_OUTPUT_ALIGN (file, TARGET_64BIT ? 3 : 2);
+      ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2);
     }
 
   /* Now output the deferred plabels.  */
   for (i = 0; i < n_deferred_plabels; i++)
     {
-      (*targetm.asm_out.internal_label) (file, "L", CODE_LABEL_NUMBER (deferred_plabels[i].internal_label));
+      (*targetm.asm_out.internal_label) (asm_out_file, "L",
+                CODE_LABEL_NUMBER (deferred_plabels[i].internal_label));
       assemble_integer (gen_rtx_SYMBOL_REF (Pmode, deferred_plabels[i].name),
                        TARGET_64BIT ? 8 : 4, TARGET_64BIT ? 64 : 32, 1);
     }
index 8a188ffc53851c4952b5bde05b4648ca34b43fd2..2d6c22e9c5ef18d93604aeb38e70dcca4c1037c8 100644 (file)
@@ -1682,10 +1682,6 @@ do {                                                                     \
 
 #define ASM_APP_OFF ""
 
-/* Output deferred plabels at the end of the file.  */
-
-#define ASM_FILE_END(FILE) output_deferred_plabels (FILE)
-
 /* This is how to output the definition of a user-level label named NAME,
    such as the label on a static function or variable NAME.  */
 
index 7234d13617160715df1298f6972071809792c425..3cfe0204734b729b36159fdadc0284214c810f7e 100644 (file)
 /* We don't need to generate entries in .fixup.  */
 #undef RELOCATABLE_NEEDS_FIXUP
 
-#define ASM_FILE_END(FILE) \
-  do {                                                                 \
-    named_section_flags (".note.GNU-stack",                            \
-                        SECTION_DEBUG                                  \
-                        | (trampolines_created ? SECTION_CODE : 0));   \
-  } while (0)
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
index 8d136fb4bfd0f6e8bf2362d044d8915afca138a8..a5c62e2f9044589a8903288ecead036b3d6506a3 100644 (file)
@@ -515,13 +515,7 @@ while (0)
 #undef DRAFT_V4_STRUCT_RET
 #define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
 
-#define ASM_FILE_END(FILE) \
-  do {                                                                 \
-    if (! TARGET_64BIT)                                                        \
-      named_section_flags (".note.GNU-stack",                          \
-                          SECTION_DEBUG                                \
-                          | (trampolines_created ? SECTION_CODE : 0)); \
-  } while (0)
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
index 5d0c7fcc3e2fb0bb57e76d507035e28ef68ba08e..68d0e964ace23a5a9d6a94b04e69848292fa395b 100644 (file)
@@ -258,6 +258,7 @@ static void rs6000_xcoff_select_rtx_section PARAMS ((enum machine_mode, rtx,
                                                     unsigned HOST_WIDE_INT));
 static const char * rs6000_xcoff_strip_name_encoding PARAMS ((const char *));
 static unsigned int rs6000_xcoff_section_type_flags PARAMS ((tree, const char *, int));
+static void rs6000_xcoff_file_end PARAMS ((void));
 #endif
 #if TARGET_MACHO
 static bool rs6000_binds_local_p PARAMS ((tree));
@@ -14140,6 +14141,20 @@ rs6000_xcoff_section_type_flags (decl, name, reloc)
 
   return flags | (exact_log2 (align) & SECTION_ENTSIZE);
 }
+
+/* Output at end of assembler file.
+   On the RS/6000, referencing data should automatically pull in text.  */
+
+static void
+rs6000_xcoff_file_end ()
+{
+  text_section ();
+  fputs ("_section_.text:\n", asm_out_file);
+  data_section ();
+  fputs (TARGET_32BIT
+        ? "\t.long _section_.text\n" : "\t.llong _section_.text\n",
+        asm_out_file);
+}
 #endif /* TARGET_XCOFF */
 
 #if TARGET_MACHO
index 892017692af9baeaab13e342b739ffb1d281f41d..affe073dfa51964b8abf1827825e20ad3109825b 100644 (file)
@@ -233,18 +233,7 @@ toc_section ()                                             \
   rs6000_file_start (FILE, TARGET_CPU_DEFAULT);                        \
 }
 
-/* Output at end of assembler file.
-
-   On the RS/6000, referencing data should automatically pull in text.  */
-
-#define ASM_FILE_END(FILE)                                     \
-{                                                              \
-  text_section ();                                             \
-  fputs ("_section_.text:\n", FILE);                           \
-  data_section ();                                             \
-  fputs (TARGET_32BIT                                          \
-        ? "\t.long _section_.text\n" : "\t.llong _section_.text\n", FILE); \
-}
+#define TARGET_ASM_FILE_END rs6000_xcoff_file_end
 
 /* This macro produces the initial definition of a function name.
    On the RS/6000, we need to place an extra '.' in the function name and
index e4b34537a010fa3ca6cb77fc725c46bcb087b525..83c8247e2f36a6c0fa8d6a8fdace394bebd94850 100644 (file)
@@ -121,12 +121,7 @@ Boston, MA 02111-1307, USA.  */
   { "link_arch31",     LINK_ARCH31_SPEC },     \
   { "link_arch64",     LINK_ARCH64_SPEC },     \
 
-#define ASM_FILE_END(FILE) \
-  do {                                                                 \
-    named_section_flags (".note.GNU-stack",                            \
-                        SECTION_DEBUG                                  \
-                        | (trampolines_created ? SECTION_CODE : 0));   \
-  } while (0)
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
index c78f1562e9a6daf7f7a6e43dee620bf3ac78e56c..f6616a77dd3d519fd78bcdff872f1bcd881d6991 100644 (file)
@@ -259,12 +259,7 @@ do {                                                                       \
 #undef CTORS_SECTION_ASM_OP
 #undef DTORS_SECTION_ASM_OP
 
-#define ASM_FILE_END(FILE) \
-  do {                                                                 \
-    named_section_flags (".note.GNU-stack",                            \
-                        SECTION_DEBUG                                  \
-                        | (trampolines_created ? SECTION_CODE : 0));   \
-  } while (0)
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
index 0bb1e646b1d39b97d3edece6f4ea4daa7b611b97..d4835dd34e3e512b9284edbc4b74b3021ec9f7c8 100644 (file)
@@ -324,12 +324,7 @@ do {                                                                       \
 #undef CTORS_SECTION_ASM_OP
 #undef DTORS_SECTION_ASM_OP
 
-#define ASM_FILE_END(FILE) \
-  do {                                                                 \
-    named_section_flags (".note.GNU-stack",                            \
-                        SECTION_DEBUG                                  \
-                        | (trampolines_created ? SECTION_CODE : 0));   \
-  } while (0)
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
index 6686a509c4ca3a828accb0a08bf9c2af11cb5f72..de07785d61b36b81242ed6bd2ca4b6d7899ea195 100644 (file)
@@ -6186,22 +6186,23 @@ Normally this macro is defined to output a line containing
 @samp{#NO_APP}, which is a comment that has no effect on most
 assemblers but tells the GNU assembler that it can save time by not
 checking for certain assembler constructs.
+@end table
 
-On systems that use SDB, it is necessary to output certain commands;
-see @file{attasm.h}.
-
-@findex ASM_FILE_END
-@item ASM_FILE_END (@var{stream})
-A C expression which outputs to the stdio stream @var{stream}
-some appropriate text to go at the end of an assembler file.
-
-If this macro is not defined, the default is to output nothing
-special at the end of the file.  Most systems don't require any
-definition.
+@deftypefn {Target Hook} void TARGET_ASM_FILE_END ()
+Output to @code{asm_out_file} any text which the assembler expects
+to find at the end of a file.  The default is to output nothing.
+@end deftypefn
 
-On systems that use SDB, it is necessary to output certain commands;
-see @file{attasm.h}.
+@deftypefun void file_end_indicate_exec_stack ()
+Some systems use a common convention, the @samp{.note.GNU-stack}
+special section, to indicate whether or not an object file relies on
+the stack being executable.  If your system uses this convention, you
+should define @code{TARGET_ASM_FILE_END} to this function.  If you
+need to do other things in that hook, have your hook function call
+this function.
+@end deftypefun
 
+@table @code
 @findex ASM_COMMENT_START
 @item ASM_COMMENT_START
 A C string constant describing how to begin a comment in the target
index b78dd63f07fc6e1e5798b6e5cfb6e01d4619433a..2bfc64d3a6bf6a805736a36662d74218923fb1d7 100644 (file)
@@ -519,6 +519,7 @@ extern bool default_binds_local_p PARAMS ((tree));
 extern bool default_binds_local_p_1 PARAMS ((tree, int));
 extern void default_globalize_label PARAMS ((FILE *, const char *));
 extern void default_internal_label PARAMS ((FILE *, const char *, unsigned long));
+extern void file_end_indicate_exec_stack PARAMS ((void));
 extern bool default_valid_pointer_mode PARAMS ((enum machine_mode));
 
 /* Emit data for vtable gc for GNU binutils.  */
index 904f13aad5ad24f023463104146e3352facb9d37..f5b52204ed823bdf1bd3fad14602a2257b351f93 100644 (file)
@@ -623,7 +623,7 @@ typedef char _Bool;
        WCHAR_UNSIGNED UNIQUE_SECTION SELECT_SECTION SELECT_RTX_SECTION \
        ENCODE_SECTION_INFO STRIP_NAME_ENCODING ASM_GLOBALIZE_LABEL     \
        ASM_OUTPUT_MI_THUNK CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS     \
-       ADDRESS_COST MACHINE_DEPENDENT_REORG
+       ADDRESS_COST MACHINE_DEPENDENT_REORG ASM_FILE_END
 
 /* Other obsolete target macros, or macros that used to be in target
    headers and were not used, and may be obsolete or may never have
index 65d25c3e3a952094332943e48048c313c5e1af54..02374d08201f6fada1dd0363a30b79c4ad2d2ed8 100644 (file)
@@ -150,6 +150,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #define TARGET_ASM_EH_FRAME_SECTION default_eh_frame_section
 #endif
 
+#ifndef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END hook_void_void
+#endif
+
 #define TARGET_ASM_ALIGNED_INT_OP                              \
                       {TARGET_ASM_ALIGNED_HI_OP,               \
                        TARGET_ASM_ALIGNED_SI_OP,               \
@@ -184,7 +188,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
                        TARGET_ASM_CONSTRUCTOR,                 \
                        TARGET_ASM_DESTRUCTOR,                  \
                         TARGET_ASM_OUTPUT_MI_THUNK,             \
-                        TARGET_ASM_CAN_OUTPUT_MI_THUNK }
+                        TARGET_ASM_CAN_OUTPUT_MI_THUNK,         \
+                        TARGET_ASM_FILE_END}
 
 /* Scheduler hooks.  All of these default to null pointers, which
    haifa-sched.c looks for and handles.  */
index cc2640b19b8c1a3bc20cafad1ae81bb6dadf9bf2..ad07f86d9587a3766a3e205684ecd652d1326198 100644 (file)
@@ -142,6 +142,9 @@ struct gcc_target
                                          HOST_WIDE_INT delta,
                                          HOST_WIDE_INT vcall_offset,
                                          tree function_decl));
+
+    /* Output any boilerplate text needed at the end of a translation unit.  */
+    void (*file_end) PARAMS ((void));
   } asm_out;
 
   /* Functions relating to instruction scheduling.  */
index 83db268232f5ff146618b4daf1afb1f300540724..ea9388ca4552a0b591805b1fb8eb409b0b0935b4 100644 (file)
@@ -2261,9 +2261,7 @@ compile_file (void)
       timevar_pop (TV_DUMP);
     }
 
-#ifdef ASM_FILE_END
-  ASM_FILE_END (asm_out_file);
-#endif
+  targetm.asm_out.file_end ();
 
   /* Attach a special .ident directive to the end of the file to identify
      the version of GCC which compiled this code.  The format of the .ident
index fec16d531964ff57ee597ef1f59647e1037708de..b13e09cf6f4b0975297eb74bd8d9675949a69fe0 100644 (file)
@@ -5364,4 +5364,18 @@ default_internal_label (stream, prefix, labelno)
   ASM_OUTPUT_LABEL (stream, buf);
 }
 
+/* This is a generic routine suitable for use as TARGET_ASM_FILE_END
+   which emits a special section directive used to indicate whether or
+   not this object file needs an executable stack.  This is primarily
+   a GNU extension to ELF but could be used on other targets.  */
+void
+file_end_indicate_exec_stack ()
+{
+  unsigned int flags = SECTION_DEBUG;
+  if (trampolines_created)
+    flags |= SECTION_CODE;
+
+  named_section_flags (".note.GNU-stack", flags);
+}
+
 #include "gt-varasm.h"