From a5fe455b127af8fb5dc5cd9d3ab6dc5be28fd1ca Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Sat, 7 Jun 2003 17:11:48 +0000 Subject: config.gcc (with_cpu handling): Translate sparc64 in $machine to --with-cpu=v9. * 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 --- gcc/config/i386/cygming.h | 7 +++---- gcc/config/i386/i386-protos.h | 2 +- gcc/config/i386/i386.c | 20 +++++++++----------- gcc/config/i386/i386.h | 7 ++----- gcc/config/i386/linux.h | 8 ++------ gcc/config/i386/linux64.h | 8 ++------ gcc/config/i386/winnt.c | 10 +++++----- 7 files changed, 24 insertions(+), 38 deletions(-) (limited to 'gcc/config/i386') diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h index d6f2a85..2f9b0a1 100644 --- a/gcc/config/i386/cygming.h +++ b/gcc/config/i386/cygming.h @@ -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 *)); diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index a7d76e7..c40ce69 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -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)); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 79c81be..acf037e 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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. */ diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 536e61b..03d4f60 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -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. */ diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h index 8f0a22c..df66a58 100644 --- a/gcc/config/i386/linux.h +++ b/gcc/config/i386/linux.h @@ -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. */ diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h index ec398de..582a22ba 100644 --- a/gcc/config/i386/linux64.h +++ b/gcc/config/i386/linux64.h @@ -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. diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index 04f5ced..97cea6c 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -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" : ""); } -- cgit v1.1