summaryrefslogtreecommitdiff
path: root/gcc/config/h8300
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/h8300')
-rw-r--r--gcc/config/h8300/elf.h6
-rw-r--r--gcc/config/h8300/h8300-protos.h1
-rw-r--r--gcc/config/h8300/h8300.c29
-rw-r--r--gcc/config/h8300/h8300.h4
4 files changed, 10 insertions, 30 deletions
diff --git a/gcc/config/h8300/elf.h b/gcc/config/h8300/elf.h
index c306993602a..7f67a3a78b1 100644
--- a/gcc/config/h8300/elf.h
+++ b/gcc/config/h8300/elf.h
@@ -31,12 +31,6 @@
%{pg:gcrti.o%s}%{!pg:crti.o%s} \
crtbegin.o%s"
-/* Output at beginning/end of assembler file. */
-#undef ASM_FILE_START
-#define ASM_FILE_START(FILE) \
- (output_file_directive ((FILE), main_input_filename), \
- asm_file_start (FILE))
-
#undef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX "_"
diff --git a/gcc/config/h8300/h8300-protos.h b/gcc/config/h8300/h8300-protos.h
index 320e031946c..b86b8ab1dc8 100644
--- a/gcc/config/h8300/h8300-protos.h
+++ b/gcc/config/h8300/h8300-protos.h
@@ -94,7 +94,6 @@ extern int h8300_can_use_return_insn_p (void);
extern void h8300_expand_prologue (void);
extern void h8300_expand_epilogue (void);
extern int h8300_current_function_interrupt_function_p (void);
-extern void asm_file_start (FILE *);
extern int h8300_initial_elimination_offset (int, int);
struct cpp_reader;
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 8690a3caab9..826cd6ca9bb 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -655,29 +655,15 @@ h8300_current_function_interrupt_function_p (void)
/* Output assembly code for the start of the file. */
-void
-asm_file_start (FILE *file)
+static void
+h8300_file_start (void)
{
- fprintf (file, ";\tGCC For the Hitachi H8/300\n");
- fprintf (file, ";\tBy Hitachi America Ltd and Cygnus Support\n");
+ default_file_start ();
- if (optimize_size)
- fprintf (file, "; -Os\n");
- else if (optimize)
- fprintf (file, "; -O%d\n", optimize);
if (TARGET_H8300H)
- if (TARGET_NORMAL_MODE)
- fprintf (file, "\n\t.h8300hn\n");
- else
- fprintf (file, "\n\t.h8300h\n");
+ fputs (TARGET_NORMAL_MODE ? "\t.h8300hn\n" : "\t.h8300h\n", asm_out_file);
else if (TARGET_H8300S)
- if (TARGET_NORMAL_MODE)
- fprintf (file, "\n\t.h8300sn\n");
- else
- fprintf (file, "\n\t.h8300s\n");
- else
- fprintf (file, "\n\n");
- output_file_directive (file, main_input_filename);
+ fputs (TARGET_NORMAL_MODE ? "\t.h8300sn\n" : "\t.h8300s\n", asm_out_file);
}
/* Output assembly language code for the end of file. */
@@ -4360,6 +4346,11 @@ byte_accesses_mergeable_p (rtx addr1, rtx addr2)
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE h8300_output_function_epilogue
+#undef TARGET_ASM_FILE_START
+#define TARGET_ASM_FILE_START h8300_file_start
+#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
+#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
+
#undef TARGET_ASM_FILE_END
#define TARGET_ASM_FILE_END h8300_file_end
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index 03b4cc37bac..0bbeb2c1081 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -1030,10 +1030,6 @@ struct cum_arg
/* Control the assembler format that we output. */
-/* Output at beginning/end of assembler file. */
-
-#define ASM_FILE_START(FILE) asm_file_start (FILE)
-
/* Output to assembler file text saying following lines
may contain character constants, extra white space, comments, etc. */