]> gcc.gnu.org Git - gcc.git/commitdiff
final.c (no_asm_to_stream): New.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Sun, 8 Jul 2001 19:55:57 +0000 (19:55 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sun, 8 Jul 2001 19:55:57 +0000 (19:55 +0000)
* final.c (no_asm_to_stream): New.
(final_scan_insn): Use target structures for prologue ends
and epilogue starts.
* output.h (no_asm_to_stream): New.
* target-def.h (TARGET_ASM_FUNCTION_END_PROLOGUE,
TARGET_ASM_FUNCTION_BEGIN_EPILOGUE): New.
(TARGET_ASM_OUT): Update.
* target.h (struct gcc_target): New members function_end_prologue
and function_begin_epilogue.
config:
* 1750/1750.h (ASM_OUTPUT_FUNNAM): Delete as unused.
* alpha/alpha-protos.h (output_end_prologue): Delete.
* alpha/alpha.c (output_end_prologue): Rename to
alpha_output_function_end_prologue.  Use in target struct
and make static.
* alpha/alpha.h (FUNCTION_END_PROLOGUE): Delete.
* ia64/ia64-protos.h (ia64_output_end_prologue): Delete.
* ia64/ia64.c (ia64_output_end_prologue): Rename to
ia64_output_function_end_prologue.  Use in target struct
and make static.
(ia64_function_prologue, ia64_funciton_epilogue): Rename
mistyped prototypes.
* ia64/ia64.h (FUNCTION_END_PROLOGUE): Delete.
* m88k/m88k-protos.h (m88k_end_prologue, m88k_begin_epilogue): Delete.
* m88k/m88k.c (m88k_end_prologue, m88k_begin_epilogue): Rename
an use in target struct, make static.
* ia64/ia64.h (FUNCTION_END_PROLOGUE, FUNCTION_BEGIN_EPILOGUE): Delete.

From-SVN: r43849

15 files changed:
gcc/ChangeLog
gcc/config/1750a/1750a.h
gcc/config/alpha/alpha-protos.h
gcc/config/alpha/alpha.c
gcc/config/alpha/alpha.h
gcc/config/ia64/ia64-protos.h
gcc/config/ia64/ia64.c
gcc/config/ia64/ia64.h
gcc/config/m88k/m88k-protos.h
gcc/config/m88k/m88k.c
gcc/config/m88k/m88k.h
gcc/final.c
gcc/output.h
gcc/target-def.h
gcc/target.h

index d0929d8fc97fd865c90d1e05b38562b8b79849b3..066f66cde2a6ed92fb2201602dfa33fd00a00abc 100644 (file)
@@ -1,3 +1,34 @@
+2001-07-08  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * final.c (no_asm_to_stream): New.
+       (final_scan_insn): Use target structures for prologue ends
+       and epilogue starts.
+       * output.h (no_asm_to_stream): New.
+       * target-def.h (TARGET_ASM_FUNCTION_END_PROLOGUE,
+       TARGET_ASM_FUNCTION_BEGIN_EPILOGUE): New.
+       (TARGET_ASM_OUT): Update.
+       * target.h (struct gcc_target): New members function_end_prologue
+       and function_begin_epilogue.
+config:
+       * 1750/1750.h (ASM_OUTPUT_FUNNAM): Delete as unused.
+       * alpha/alpha-protos.h (output_end_prologue): Delete.
+       * alpha/alpha.c (output_end_prologue): Rename to
+       alpha_output_function_end_prologue.  Use in target struct
+       and make static.
+       * alpha/alpha.h (FUNCTION_END_PROLOGUE): Delete.
+       * ia64/ia64-protos.h (ia64_output_end_prologue): Delete.
+       * ia64/ia64.c (ia64_output_end_prologue): Rename to
+       ia64_output_function_end_prologue.  Use in target struct
+       and make static.
+       (ia64_function_prologue, ia64_funciton_epilogue): Rename
+       mistyped prototypes.
+       * ia64/ia64.h (FUNCTION_END_PROLOGUE): Delete.
+       * m88k/m88k-protos.h (m88k_end_prologue, m88k_begin_epilogue): Delete.
+       * m88k/m88k.c (m88k_end_prologue, m88k_begin_epilogue): Rename
+       an use in target struct, make static.
+       * ia64/ia64.h (FUNCTION_END_PROLOGUE, FUNCTION_BEGIN_EPILOGUE): Delete.
+
+
 2001-07-08  Richard Henderson  <rth@redhat.com>
 
        * stmt.c (emit_case_nodes): Convert modes properly in low+high test.
index 26ce2edb277e4ce89b01d586206c216b1a8d33ea..abaa74397135ba3bcf42c647630a4299201f51f7 100644 (file)
@@ -973,9 +973,6 @@ enum reg_class { NO_REGS, R2, R0_1, INDEX_REGS, BASE_REGS, ALL_REGS, LIM_REG_CLA
 
 #define ASM_COMMENT_START  ";"
 
-#define ASM_OUTPUT_FUNNAM(FILE,NAME)   \
-       fprintf(FILE,"%s\n",NAME)
-
 #define ASM_OUTPUT_OPCODE(FILE,PTR)  do {              \
        while (*(PTR) != '\0' && *(PTR) != ' ') {       \
            putc (*(PTR), FILE);                        \
index dfed787f80686ed2cee68f10fea93a3a684fc63b..a625ece21affbc8e8e4ccc0d74ff0d4e7956286a 100644 (file)
@@ -28,7 +28,6 @@ extern int alpha_pv_save_size PARAMS ((void));
 extern int alpha_using_fp PARAMS ((void));
 extern void alpha_write_verstamp PARAMS ((FILE *));
 extern void alpha_expand_prologue PARAMS ((void));
-extern void output_end_prologue PARAMS ((FILE *));
 extern void alpha_expand_epilogue PARAMS ((void));
 extern void alpha_output_filename PARAMS ((FILE *, const char *));
 extern void alpha_output_lineno PARAMS ((FILE *, int));
index 72767c0ba272f9ada647573d27369e686a2cf2ff..ec70eb10bf0fc9c43d1a8ee0029b1518c6b3608b 100644 (file)
@@ -129,6 +129,8 @@ static void alpha_emit_xfloating_libcall
   PARAMS ((const char *, rtx, rtx[], int, rtx));
 static rtx alpha_emit_xfloating_compare
   PARAMS ((enum rtx_code, rtx, rtx));
+static void alpha_output_function_end_prologue
+  PARAMS ((FILE *));
 
 /* Get the number of args of a function in one of two ways.  */
 #ifdef OPEN_VMS
@@ -147,6 +149,9 @@ static rtx alpha_emit_xfloating_compare
 #  define TARGET_VALID_DECL_ATTRIBUTE vms_valid_decl_attribute_p
 #endif
 
+#undef TARGET_ASM_FUNCTION_END_PROLOGUE
+#define TARGET_ASM_FUNCTION_END_PROLOGUE alpha_output_function_end_prologue
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Parse target option strings. */
@@ -5001,8 +5006,8 @@ alpha_start_function (file, fnname, decl)
 
 /* Emit the .prologue note at the scheduled end of the prologue.  */
 
-void
-output_end_prologue (file)
+static void
+alpha_output_function_end_prologue (file)
      FILE *file;
 {
   if (TARGET_OPEN_VMS)
index f11fa184db31c466b7cf937f076fb7cea90f8c8c..832c8951c4081b370fc2401812d923d77249f613 100644 (file)
@@ -1202,10 +1202,6 @@ extern struct alpha_compare alpha_compare;
 #define ASM_DECLARE_FUNCTION_SIZE(FILE,NAME,DECL) \
   alpha_end_function(FILE,NAME,DECL)
    
-/* This macro notes the end of the prologue.  */
-
-#define FUNCTION_END_PROLOGUE(FILE)  output_end_prologue (FILE)
-
 /* Output any profiling code before the prologue.  */
 
 #define PROFILE_BEFORE_PROLOGUE 1
index 1bdfbc4cee1a048ecc8c23a91c4b3143c7a1ecaa..80f7479a14836a473a5676cb7534232252e9da42 100644 (file)
@@ -128,7 +128,6 @@ extern void ia64_encode_section_info PARAMS((tree));
 extern int ia64_register_move_cost PARAMS((enum reg_class, enum reg_class));
 extern int ia64_epilogue_uses PARAMS((int));
 extern void emit_safe_across_calls PARAMS((FILE *));
-extern void ia64_output_end_prologue PARAMS((FILE *));
 extern void ia64_init_builtins PARAMS((void));
 extern void ia64_override_options PARAMS((void));
 extern int ia64_dbx_register_number PARAMS((int));
index 2588612ca7e2343e7e1e73948fd66c31281522ea..a09a7b7b471f1fb6d591685cd1ceb28d37dbe67b 100644 (file)
@@ -137,8 +137,9 @@ static rtx ia64_expand_lock_test_and_set PARAMS ((enum machine_mode,
                                                  tree, rtx));
 static rtx ia64_expand_lock_release PARAMS ((enum machine_mode, tree, rtx));
 static int ia64_valid_type_attribute PARAMS((tree, tree, tree, tree));
-static void ia64_function_prologue PARAMS((FILE *, HOST_WIDE_INT));
-static void ia64_function_epilogue PARAMS((FILE *, HOST_WIDE_INT));
+static void ia64_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
+static void ia64_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
+static void ia64_output_function_end_prologue PARAMS ((FILE *));
 \f
 /* Initialize the GCC target structure.  */
 #undef TARGET_VALID_TYPE_ATTRIBUTE
@@ -146,6 +147,8 @@ static void ia64_function_epilogue PARAMS((FILE *, HOST_WIDE_INT));
 
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE ia64_output_function_prologue
+#undef TARGET_ASM_FUNCTION_END_PROLOGUE
+#define TARGET_ASM_FUNCTION_END_PROLOGUE ia64_output_function_end_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
 #define TARGET_ASM_FUNCTION_EPILOGUE ia64_output_function_epilogue
 
@@ -2572,8 +2575,8 @@ ia64_output_function_prologue (file, size)
 
 /* Emit the .body directive at the scheduled end of the prologue.  */
 
-void
-ia64_output_end_prologue (file)
+static void
+ia64_output_function_end_prologue (file)
      FILE *file;
 {
   if (!flag_unwind_tables && (!flag_exceptions || USING_SJLJ_EXCEPTIONS))
index 05b8f9eba21f22d8d029933fc4e5a22c3d42105f..0944daa548a0cfee05d81c094d8dd2af947635b1 100644 (file)
@@ -1458,10 +1458,6 @@ do {                                                                     \
 \f
 /* Function Entry and Exit */
 
-/* This macro notes the end of the prologue.  */
-
-#define FUNCTION_END_PROLOGUE(FILE)  ia64_output_end_prologue (FILE)
-
 /* Define this macro as a C expression that is nonzero if the return
    instruction or the function epilogue ignores the value of the stack pointer;
    in other words, if it is safe to delete an instruction to adjust the stack
index a8204a37dec4af5670174b3c5a18ed058ecde5a7..93818aea10b8a9e077ae0e9e954c904ade24ebaf 100644 (file)
@@ -84,9 +84,7 @@ extern int null_prologue PARAMS ((void));
 extern int integer_ok_for_set PARAMS ((unsigned));
 extern void m88k_layout_frame PARAMS ((void));
 extern void m88k_expand_prologue PARAMS ((void));
-extern void m88k_end_prologue PARAMS ((FILE *));
 extern void m88k_expand_epilogue PARAMS ((void));
-extern void m88k_begin_epilogue PARAMS ((FILE *));
 extern void output_function_profiler PARAMS ((FILE *, int, const char *, int));
 extern void output_function_block_profiler PARAMS ((FILE *, int));
 extern void output_block_profiler PARAMS ((FILE *, int));
index 80867f2df068ba109e930280697c93dccea6f0db..63e46448bfcb1ffb4b63451571b0ac3572b7289f 100644 (file)
@@ -65,10 +65,16 @@ enum processor_type m88k_cpu;       /* target cpu */
 
 static void m88k_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void m88k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
+static void m88k_output_function_end_prologue PARAMS ((FILE *));
+static void m88k_output_function_begin_epilogue PARAMS ((FILE *));
 \f
 /* Initialize the GCC target structure.  */
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE m88k_output_function_prologue
+#undef TARGET_ASM_FUNCTION_END_PROLOGUE
+#define TARGET_ASM_FUNCTION_END_PROLOGUE m88k_output_function_end_prologue
+#undef TARGET_ASM_FUNCTION_BEGIN_EPILOGUE
+#define TARGET_ASM_FUNCTION_BEGIN_EPILOGUE m88k_output_function_begin_epilogue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
 #define TARGET_ASM_FUNCTION_EPILOGUE m88k_output_function_epilogue
 
@@ -1954,8 +1960,8 @@ m88k_output_function_prologue (stream, size)
   m88k_prologue_done = 1;      /* it's ok now to put out ln directives */
 }
 
-void
-m88k_end_prologue (stream)
+static void
+m88k_output_function_end_prologue (stream)
      FILE *stream;
 {
   if (TARGET_OCS_DEBUG_INFO && !prologue_marked)
@@ -2031,8 +2037,8 @@ m88k_expand_prologue ()
    This is mandatory because of alloca; we also take advantage of it to
    omit stack adjustments before returning.  */
 
-void
-m88k_begin_epilogue (stream)
+static void
+m88k_output_function_begin_epilogue (stream)
      FILE *stream;
 {
   if (TARGET_OCS_DEBUG_INFO && !epilogue_marked && prologue_marked)
index 3af1c291a6d7ff2f337defef6422dcd5cfcec89c..9520aa8bd8ea92545a857638e5fd19befbc34f40 100644 (file)
@@ -1046,9 +1046,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
 #define EXPAND_BUILTIN_VA_ARG(valist, type) \
   m88k_va_arg (valist, type)
 
-/* Perform special actions at the point where the prologue ends.  */
-#define FUNCTION_END_PROLOGUE(FILE) m88k_end_prologue(FILE)
-
 /* Output assembler code to FILE to increment profiler label # LABELNO
    for profiling a function entry.  Redefined in sysv3.h, sysv4.h and
    dgux.h.  */
@@ -1080,9 +1077,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
    No definition is equivalent to always zero.  */
 #define EXIT_IGNORE_STACK (1)
 
-/* Perform special actions at the point where the epilogue begins.  */
-#define FUNCTION_BEGIN_EPILOGUE(FILE) m88k_begin_epilogue(FILE)
-
 /* Value should be nonzero if functions must have frame pointers.
    Zero means the frame pointer need not be set up (and parms
    may be accessed via the stack pointer) in functions that seem suitable.
index 7509fbe0eff558c322b34ab56cbdc84ba3c4facd..35fda053ae17b3072b4902964a0744eb9f4cb95b 100644 (file)
@@ -546,6 +546,13 @@ default_function_pro_epilogue (file, size)
 {
 }
 
+/* Default target hook that outputs nothing to a stream.  */
+void
+no_asm_to_stream (file)
+     FILE *file ATTRIBUTE_UNUSED;
+{
+}
+
 /* Enable APP processing of subsequent output.
    Used before the output from an `asm' statement.  */
 
@@ -2090,16 +2097,12 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
          break;
 
        case NOTE_INSN_PROLOGUE_END:
-#ifdef FUNCTION_END_PROLOGUE
-         FUNCTION_END_PROLOGUE (file);
-#endif
+         (*targetm.asm_out.function_end_prologue) (file);           
          profile_after_prologue (file);
          break;
 
        case NOTE_INSN_EPILOGUE_BEG:
-#ifdef FUNCTION_BEGIN_EPILOGUE
-         FUNCTION_BEGIN_EPILOGUE (file);
-#endif
+         (*targetm.asm_out.function_begin_epilogue) (file);         
          break;
 
        case NOTE_INSN_FUNCTION_BEG:
index a1d5923411d665c3ae2a7e3265a82bf83d5152aa..db4894c54c0aff77500093aec6fa0a7054d65287 100644 (file)
@@ -451,3 +451,6 @@ extern int profile_label_no;
 
 /* Default target function prologue and epilogue assembler output.  */
 extern void default_function_pro_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
+
+/* Default target hook that outputs nothing to a stream.  */
+extern void no_asm_to_stream PARAMS ((FILE *));
index c0894936f66774f7b9a9519eb5a718f57c70a206..ec0b6606f04a49e5d965b098a6c8bf99fff43cc6 100644 (file)
@@ -25,10 +25,15 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    We want to have non-NULL default definitions of all hook functions,
    even if they do nothing.  */
 
+/* Assembler output.  */
 #define TARGET_ASM_FUNCTION_PROLOGUE default_function_pro_epilogue
 #define TARGET_ASM_FUNCTION_EPILOGUE default_function_pro_epilogue
+#define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream
+#define TARGET_ASM_FUNCTION_BEGIN_EPILOGUE no_asm_to_stream
 
-#define TARGET_ASM_OUT {TARGET_ASM_FUNCTION_PROLOGUE,  \
+#define TARGET_ASM_OUT {TARGET_ASM_FUNCTION_PROLOGUE,          \
+                       TARGET_ASM_FUNCTION_END_PROLOGUE,       \
+                       TARGET_ASM_FUNCTION_BEGIN_EPILOGUE,     \
                        TARGET_ASM_FUNCTION_EPILOGUE}
 
 /* All in tree.c.  */
index 11d0a0e08c4df3859f03ea2eb3064c8c9224b3cd..45143abb3de2aecacbf8fb92f3d78b0e0bd91844 100644 (file)
@@ -52,6 +52,12 @@ struct gcc_target
     /* Output the assembler code for entry to a function.  */
     void (* function_prologue) PARAMS ((FILE *, HOST_WIDE_INT));
 
+    /* Output the assembler code for end of prologue.  */
+    void (* function_end_prologue) PARAMS ((FILE *));
+
+    /* Output the assembler code for start of epilogue.  */
+    void (* function_begin_epilogue) PARAMS ((FILE *));
+
     /* Output the assembler code for function exit.  */
     void (* function_epilogue) PARAMS ((FILE *, HOST_WIDE_INT));
   } asm_out;
This page took 0.083445 seconds and 5 git commands to generate.