When reviewing how this patch

        [PATCH] gcc: move assemble_start_function / assemble_end_function to 
output_mi_thunk
        https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00722.html

might affect Solaris, I noticed an obsolete comment

     Note that use_thunk calls assemble_start_function et al.  */

that in one form or another is present in several targets, but has been
wrong for almost 10 years when r154736 ripped out those calls to
assemble_*_function in use_thunk.

The following patch corrects this.  Bootstrapped on i386-pc-solaris2.11
and sparc-sun-solaris2.11; I didn't bother to try and build cc1 on all
other affected targets, though.

Ok for mainline?  I guess this is obvious.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2019-05-25  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * config/alpha/alpha.c [TARGET_ABI_OSF] (alpha_output_mi_thunk_osf):
        Remove obsolete use_thunk reference.
        * config/i386/i386.c (x86_output_mi_thunk): Likewise.
        * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
        * config/nios2/nios2.c (nios2_asm_output_mi_thunk): Likewise.
        * config/or1k/or1k.c (or1k_output_mi_thunk): Likewise.
        * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
        * config/sh/sh.c (sh_output_mi_thunk): Likewise.
        * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
        * config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise.
        * config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise.

# HG changeset patch
# Parent  74a1aea7c39d71273fd4f28d937e03f593e92778
Remove obsolete comment about use_thunk

diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -8514,8 +8514,7 @@ alpha_output_mi_thunk_osf (FILE *file, t
 
   /* Run just enough of rest_of_compilation to get the insns emitted.
      There's not really enough bulk here to make other passes such as
-     instruction scheduling worth while.  Note that use_thunk calls
-     assemble_start_function and assemble_end_function.  */
+     instruction scheduling worth while.  */
   insn = get_insns ();
   shorten_branches (insn);
   assemble_start_function (thunk_fndecl, fnname);
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -19983,8 +19983,7 @@ x86_output_mi_thunk (FILE *file, tree th
     }
   emit_barrier ();
 
-  /* Emit just enough of rest_of_compilation to get the insns emitted.
-     Note that use_thunk calls assemble_start_function et al.  */
+  /* Emit just enough of rest_of_compilation to get the insns emitted.  */
   insn = get_insns ();
   shorten_branches (insn);
   assemble_start_function (thunk_fndecl, fnname);
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -11033,8 +11033,7 @@ ia64_output_mi_thunk (FILE *file, tree t
 
   /* Run just enough of rest_of_compilation to get the insns emitted.
      There's not really enough bulk here to make other passes such as
-     instruction scheduling worth while.  Note that use_thunk calls
-     assemble_start_function and assemble_end_function.  */
+     instruction scheduling worth while.  */
 
   emit_all_insn_group_barriers (NULL);
   insn = get_insns ();
diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c
--- a/gcc/config/nios2/nios2.c
+++ b/gcc/config/nios2/nios2.c
@@ -4519,8 +4519,7 @@ nios2_asm_output_mi_thunk (FILE *file, t
 
   /* Run just enough of rest_of_compilation to get the insns emitted.
      There's not really enough bulk here to make other passes such as
-     instruction scheduling worth while.  Note that use_thunk calls
-     assemble_start_function and assemble_end_function.  */
+     instruction scheduling worth while.  */
   insn = get_insns ();
   shorten_branches (insn);
   assemble_start_function (thunk_fndecl, fnname);
diff --git a/gcc/config/or1k/or1k.c b/gcc/config/or1k/or1k.c
--- a/gcc/config/or1k/or1k.c
+++ b/gcc/config/or1k/or1k.c
@@ -2112,8 +2112,7 @@ or1k_output_mi_thunk (FILE *file, tree t
 
   /* Run just enough of rest_of_compilation to get the insns emitted.
      There's not really enough bulk here to make other passes such as
-     instruction scheduling worth while.  Note that use_thunk calls
-     assemble_start_function and assemble_end_function.  */
+     instruction scheduling worth while.  */
   insn = get_insns ();
   shorten_branches (insn);
   assemble_start_function (thunk_fndecl, fnname);
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -29296,8 +29296,7 @@ rs6000_output_mi_thunk (FILE *file, tree
 
   /* Run just enough of rest_of_compilation to get the insns emitted.
      There's not really enough bulk here to make other passes such as
-     instruction scheduling worth while.  Note that use_thunk calls
-     assemble_start_function and assemble_end_function.  */
+     instruction scheduling worth while.  */
   insn = get_insns ();
   shorten_branches (insn);
   assemble_start_function (thunk_fndecl, fnname);
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -10940,8 +10940,7 @@ sh_output_mi_thunk (FILE *file, tree thu
   emit_barrier ();
 
   /* Run just enough of rest_of_compilation to do scheduling and get
-     the insns emitted.  Note that use_thunk calls
-     assemble_start_function and assemble_end_function.  */
+     the insns emitted.  */
 
   insns = get_insns ();
 
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -12482,8 +12482,7 @@ sparc_output_mi_thunk (FILE *file, tree 
 
   /* Run just enough of rest_of_compilation to get the insns emitted.
      There's not really enough bulk here to make other passes such as
-     instruction scheduling worth while.  Note that use_thunk calls
-     assemble_start_function and assemble_end_function.  */
+     instruction scheduling worth while.  */
   insn = get_insns ();
   shorten_branches (insn);
   assemble_start_function (thunk_fndecl, fnname);
diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c
--- a/gcc/config/tilegx/tilegx.c
+++ b/gcc/config/tilegx/tilegx.c
@@ -4993,8 +4993,7 @@ tilegx_output_mi_thunk (FILE *file, tree
 
   /* Run just enough of rest_of_compilation to get the insns emitted.
      There's not really enough bulk here to make other passes such as
-     instruction scheduling worth while.  Note that use_thunk calls
-     assemble_start_function and assemble_end_function.
+     instruction scheduling worth while.
 
      We don't currently bundle, but the instruciton sequence is all
      serial except for the tail call, so we're only wasting one cycle.
diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c
--- a/gcc/config/tilepro/tilepro.c
+++ b/gcc/config/tilepro/tilepro.c
@@ -4416,8 +4416,7 @@ tilepro_asm_output_mi_thunk (FILE *file,
 
   /* Run just enough of rest_of_compilation to get the insns emitted.
      There's not really enough bulk here to make other passes such as
-     instruction scheduling worth while.  Note that use_thunk calls
-     assemble_start_function and assemble_end_function.
+     instruction scheduling worth while.
 
      We don't currently bundle, but the instruciton sequence is all
      serial except for the tail call, so we're only wasting one cycle.

Reply via email to