[1/N] Rename asm_out_file function arguments.

Message ID fecb7cd4-a868-f157-b53f-9e80b9ab20d1@suse.cz
State New
Headers
Series [1/N] Rename asm_out_file function arguments. |

Commit Message

Martin Liška Sept. 16, 2021, 10 a.m. UTC
  As preparation for a new global object that will encapsulate
asm_out_file, we would need to live with a macro that will
define asm_out_file as casm->out_file and thus the name
can't be used in function arguments.

I've built all cross compilers with the change and
can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin
  

Comments

Iain Sandoe Sept. 16, 2021, 1:52 p.m. UTC | #1
Hi Martin,

> On 16 Sep 2021, at 11:00, Martin Liška <mliska@suse.cz> wrote:
> 
> As preparation for a new global object that will encapsulate
> asm_out_file, we would need to live with a macro that will
> define asm_out_file as casm->out_file and thus the name
> can't be used in function arguments.

So, if I understand correctly, the motivation is to be able to switch
between output file streams for different categories of content?

Darwin, actually already does this (manually) with a separate
lto_asm_out_name for lto data (so a general solution would
be great).
 
What is the reason for associating the section pointers with the
casm object?

* I can understand that each instance of a casm object would have
 potentially a different current section (“in_section”), but it seems that
 as things stand the section pointers would be duplicates.

* In the case that there’s reason that the sections could be different
  between casm instances, then would it make sense to have a
  target hook so that target-specific sections can be added to the
  local list (via some indirection, I’d assume)?

—

(of course, it would be great if one day we could abstract the asm out
 such that we could switch to a direct-to-object implementation)

> I've built all cross compilers with the change and
> can bootstrap on x86_64-linux-gnu and survives regression tests.

A native bootstrap fails early in stage1 for x86_64-darwin (I’ll take a look
at fixing the issues once the patch series settles down)

---

/src-local/gcc-master/gcc/dwarf2asm.c: In function ‘void dw2_asm_output_nstring(const char*, size_t, const char*, ...)’:
/src-local/gcc-master/gcc/output.h:387:26: error: expected initializer before ‘->’ token
 #define asm_out_file casm->out_file
                          ^
/src-local/gcc-master/gcc/defaults.h:68:13: note: in expansion of macro ‘asm_out_file’
       FILE *asm_out_file = _hide_asm_out_file;          \
             ^~~~~~~~~~~~
/src-local/gcc-master/gcc/dwarf2asm.c:414:7: note: in expansion of macro ‘ASM_OUTPUT_ASCII’
       ASM_OUTPUT_ASCII (asm_out_file, str, len);
       ^~~~~~~~~~~~~~~~
In file included from ./tm.h:42:0,

------

/src-local/gcc-master/gcc/config/i386/darwin.h:219:6: error: ‘in_section’ was not declared in this scope
  if (in_section == text_section)       \
      ^
/src-local/gcc-master/gcc/dwarf2out.c:677:3: note: in expansion of macro ‘ASM_OUTPUT_ALIGN’
   ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
  
Richard Biener Sept. 17, 2021, 8:23 a.m. UTC | #2
On Thu, Sep 16, 2021 at 3:52 PM Iain Sandoe <iain@sandoe.co.uk> wrote:
>
>
> Hi Martin,
>
> > On 16 Sep 2021, at 11:00, Martin Liška <mliska@suse.cz> wrote:
> >
> > As preparation for a new global object that will encapsulate
> > asm_out_file, we would need to live with a macro that will
> > define asm_out_file as casm->out_file and thus the name
> > can't be used in function arguments.
>
> So, if I understand correctly, the motivation is to be able to switch
> between output file streams for different categories of content?
>
> Darwin, actually already does this (manually) with a separate
> lto_asm_out_name for lto data (so a general solution would
> be great).
>
> What is the reason for associating the section pointers with the
> casm object?
>
> * I can understand that each instance of a casm object would have
>  potentially a different current section (“in_section”), but it seems that
>  as things stand the section pointers would be duplicates.
>
> * In the case that there’s reason that the sections could be different
>   between casm instances, then would it make sense to have a
>   target hook so that target-specific sections can be added to the
>   local list (via some indirection, I’d assume)?

Yes, casm likely will end up with target specific state.  Note the main
motivation of the exercise is to develop and alternate way of funneling
the early debug data through the LTO pipeline, eliding the need for
the simple-object copying and section renaming dance.

The idea is that at dwarf2out_early_finish time (which runs at
the compile stage) we write a regular pure debug-info object
with unmangled section names to an alternate assembler file
which we then assemble and include as raw byte blob in the
LTO IR + debug object file.  At link time the debug object
byte blobs can either be re-instantiated as separate input
object file or the linker can be taught to pick them up from
the existing file at a byte offset (internally it does this for
AR archive members for example) avoiding the extra I/O.

So for this alternate assembler file we'd have a different set
of sections.

> —
>
> (of course, it would be great if one day we could abstract the asm out
>  such that we could switch to a direct-to-object implementation)

Small steps ;)

> > I've built all cross compilers with the change and
> > can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> A native bootstrap fails early in stage1 for x86_64-darwin (I’ll take a look
> at fixing the issues once the patch series settles down)
>
> ---
>
> /src-local/gcc-master/gcc/dwarf2asm.c: In function ‘void dw2_asm_output_nstring(const char*, size_t, const char*, ...)’:
> /src-local/gcc-master/gcc/output.h:387:26: error: expected initializer before ‘->’ token
>  #define asm_out_file casm->out_file
>                           ^
> /src-local/gcc-master/gcc/defaults.h:68:13: note: in expansion of macro ‘asm_out_file’
>        FILE *asm_out_file = _hide_asm_out_file;          \
>              ^~~~~~~~~~~~
> /src-local/gcc-master/gcc/dwarf2asm.c:414:7: note: in expansion of macro ‘ASM_OUTPUT_ASCII’
>        ASM_OUTPUT_ASCII (asm_out_file, str, len);
>        ^~~~~~~~~~~~~~~~
> In file included from ./tm.h:42:0,
>
> ------
>
> /src-local/gcc-master/gcc/config/i386/darwin.h:219:6: error: ‘in_section’ was not declared in this scope
>   if (in_section == text_section)       \
>       ^
> /src-local/gcc-master/gcc/dwarf2out.c:677:3: note: in expansion of macro ‘ASM_OUTPUT_ALIGN’
>    ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
>
>
  
Iain Sandoe Sept. 17, 2021, 9:42 a.m. UTC | #3
Hi Folks,

> On 17 Sep 2021, at 09:23, Richard Biener <richard.guenther@gmail.com> wrote:
> 
> On Thu, Sep 16, 2021 at 3:52 PM Iain Sandoe <iain@sandoe.co.uk> wrote:
>> 
>> 
>>> On 16 Sep 2021, at 11:00, Martin Liška <mliska@suse.cz> wrote:
>>> 
>>> As preparation for a new global object that will encapsulate
>>> asm_out_file, we would need to live with a macro that will
>>> define asm_out_file as casm->out_file and thus the name
>>> can't be used in function arguments.
>> 
>> So, if I understand correctly, the motivation is to be able to switch
>> between output file streams for different categories of content?
>> 
>> Darwin, actually already does this (manually) with a separate
>> lto_asm_out_name for lto data (so a general solution would
>> be great).
>> 
>> What is the reason for associating the section pointers with the
>> casm object?
>> 
>> * I can understand that each instance of a casm object would have
>> potentially a different current section (“in_section”), but it seems that
>> as things stand the section pointers would be duplicates.
>> 
>> * In the case that there’s reason that the sections could be different
>>  between casm instances, then would it make sense to have a
>>  target hook so that target-specific sections can be added to the
>>  local list (via some indirection, I’d assume)?
> 
> Yes, casm likely will end up with target specific state.  Note the main
> motivation of the exercise is to develop and alternate way of funneling
> the early debug data through the LTO pipeline, eliding the need for
> the simple-object copying and section renaming dance.

great ;-)

FWIW, I did an implementation for Darwin, but not yet presented/comitted
because…. the dependencies on the debug linker (dsymutil) mean that it
is of limited value until I can find time to fix that up to understand the input.

> The idea is that at dwarf2out_early_finish time (which runs at
> the compile stage) we write a regular pure debug-info object
> with unmangled section names to an alternate assembler file
> which we then assemble and include as raw byte blob in the
> LTO IR + debug object file.  At link time the debug object
> byte blobs can either be re-instantiated as separate input
> object file or the linker can be taught to pick them up from
> the existing file at a byte offset (internally it does this for
> AR archive members for example) avoiding the extra I/O.

… the more dependencies on external tool behaviour we have
the harder it gets for non-ELF-binutils targets; I’d like to think
about how to implement this in Mach-O…

I don’t think there’s any mechanism for Mach-O to include an
arbitrary blob in a _regular_ mach-o file, of course one could make
it FAT in some way - but that would mean a lot of changes to the
back end tools..

… so the path of least resistance is to do something like we do
with the LTO already - abstract the info into a blob section with
and index and a name table (we funnel the LTO off into a second
file and then re-include that in finish_asm_file).

not sure what xcoff etc. can do...

> So for this alternate assembler file we'd have a different set
> of sections.

can you give me an example ?
(I’m not succeeding in visualizing this yet).

Note that we already have categories of sections:
 generic (e.g. .text, .data, etc. supported by all file formats)
 language-related (for at least C++, D, ObjC…)
 debug
 lto
 back-end-specific 

I was wondering which of those needed to be cloned per casm
and if it includes any of the language/back-end ones how we figure
a mechanism to include those (I suppose the usual style of a macro-
programmed .def would work?)

>> —
>> 
>> (of course, it would be great if one day we could abstract the asm out
>> such that we could switch to a direct-to-object implementation)
> 
> Small steps ;)

Yes - but it’s easier to see if the small steps are in the direction we want,
with some idea of the finishing post, right? :)

I was wondering about a conceptual scenario like:

 casm ==> target_asm state
 this also conceptually “owns” the TARGET_ASM macros.
 one could consider migrating those macros to add casm as a first argument
 this would allow a second migration when target chose to implement the macros
 as inline functions taking the state as a first argument...

 .. or to implement casm as an abstract base class, where the target macros become
 virtual methods, with a default impl. that can be overriden by the target.

 My guess is that people will say “the second one is too much overhead because it
 incurs an indirection instead of the direct inline” … I suppose that depends on how
 well we devirtualize ….

>>> I've built all cross compilers with the change and
>>> can bootstrap on x86_64-linux-gnu and survives regression tests.
>> 
>> A native bootstrap fails early in stage1 for x86_64-darwin (I’ll take a look
>> at fixing the issues once the patch series settles down)

JFTR, I applied the first two patches and then a couple of tweaks and it did
bootstrap on Darwin.

thanks
Iain
  
Richard Biener Sept. 17, 2021, 9:57 a.m. UTC | #4
On Fri, Sep 17, 2021 at 11:42 AM Iain Sandoe <iain@sandoe.co.uk> wrote:
>
> Hi Folks,
>
> > On 17 Sep 2021, at 09:23, Richard Biener <richard.guenther@gmail.com> wrote:
> >
> > On Thu, Sep 16, 2021 at 3:52 PM Iain Sandoe <iain@sandoe.co.uk> wrote:
> >>
> >>
> >>> On 16 Sep 2021, at 11:00, Martin Liška <mliska@suse.cz> wrote:
> >>>
> >>> As preparation for a new global object that will encapsulate
> >>> asm_out_file, we would need to live with a macro that will
> >>> define asm_out_file as casm->out_file and thus the name
> >>> can't be used in function arguments.
> >>
> >> So, if I understand correctly, the motivation is to be able to switch
> >> between output file streams for different categories of content?
> >>
> >> Darwin, actually already does this (manually) with a separate
> >> lto_asm_out_name for lto data (so a general solution would
> >> be great).
> >>
> >> What is the reason for associating the section pointers with the
> >> casm object?
> >>
> >> * I can understand that each instance of a casm object would have
> >> potentially a different current section (“in_section”), but it seems that
> >> as things stand the section pointers would be duplicates.
> >>
> >> * In the case that there’s reason that the sections could be different
> >>  between casm instances, then would it make sense to have a
> >>  target hook so that target-specific sections can be added to the
> >>  local list (via some indirection, I’d assume)?
> >
> > Yes, casm likely will end up with target specific state.  Note the main
> > motivation of the exercise is to develop and alternate way of funneling
> > the early debug data through the LTO pipeline, eliding the need for
> > the simple-object copying and section renaming dance.
>
> great ;-)
>
> FWIW, I did an implementation for Darwin, but not yet presented/comitted
> because…. the dependencies on the debug linker (dsymutil) mean that it
> is of limited value until I can find time to fix that up to understand the input.
>
> > The idea is that at dwarf2out_early_finish time (which runs at
> > the compile stage) we write a regular pure debug-info object
> > with unmangled section names to an alternate assembler file
> > which we then assemble and include as raw byte blob in the
> > LTO IR + debug object file.  At link time the debug object
> > byte blobs can either be re-instantiated as separate input
> > object file or the linker can be taught to pick them up from
> > the existing file at a byte offset (internally it does this for
> > AR archive members for example) avoiding the extra I/O.
>
> … the more dependencies on external tool behaviour we have
> the harder it gets for non-ELF-binutils targets; I’d like to think
> about how to implement this in Mach-O…
>
> I don’t think there’s any mechanism for Mach-O to include an
> arbitrary blob in a _regular_ mach-o file, of course one could make
> it FAT in some way - but that would mean a lot of changes to the
> back end tools..

Nah, it would be GCC itself opening the object and copying the
data byte-by-byte into a special LTO data section which of course
means emitting a lot of .data in the assembler ... but well.

We could do without the copying but then we produce two files
for each object we compile - the LTO IR .o and the object with
the debug info, say, .debug.o.  The debug info will be linked into
the final object without further changes.  But we have to be
able to emit those two objects from a single cc1 invocation - that's
what this change is about (yeah, emit assembly).

The copying would just involve assembling the alternate file
and including it as data in the main assembly (and thus object)
in a way that makes it easy to either re-materialize the alternate
object file at link time or include it by reference.

> … so the path of least resistance is to do something like we do
> with the LTO already - abstract the info into a blob section with
> and index and a name table (we funnel the LTO off into a second
> file and then re-include that in finish_asm_file).
>
> not sure what xcoff etc. can do...
>
> > So for this alternate assembler file we'd have a different set
> > of sections.
>
> can you give me an example ?
> (I’m not succeeding in visualizing this yet).
>
> Note that we already have categories of sections:
>  generic (e.g. .text, .data, etc. supported by all file formats)
>  language-related (for at least C++, D, ObjC…)
>  debug
>  lto
>  back-end-specific
>
> I was wondering which of those needed to be cloned per casm
> and if it includes any of the language/back-end ones how we figure
> a mechanism to include those (I suppose the usual style of a macro-
> programmed .def would work?)

In principle all of them - we are really emitting a completely separate
and different object file (as assembler).  For the LTO debug use
we'd need all DWARF .debug_* sections.

I understand that all the special backend sections are eventually
created on-demand (there's also targetm.asm_file_start/end ...)

> >> —
> >>
> >> (of course, it would be great if one day we could abstract the asm out
> >> such that we could switch to a direct-to-object implementation)
> >
> > Small steps ;)
>
> Yes - but it’s easier to see if the small steps are in the direction we want,
> with some idea of the finishing post, right? :)
>
> I was wondering about a conceptual scenario like:
>
>  casm ==> target_asm state
>  this also conceptually “owns” the TARGET_ASM macros.
>  one could consider migrating those macros to add casm as a first argument
>  this would allow a second migration when target chose to implement the macros
>  as inline functions taking the state as a first argument...
>
>  .. or to implement casm as an abstract base class, where the target macros become
>  virtual methods, with a default impl. that can be overriden by the target.
>
>  My guess is that people will say “the second one is too much overhead because it
>  incurs an indirection instead of the direct inline” … I suppose that depends on how
>  well we devirtualize ….

Yes, adjusting the TARGET_ASM macros is the next natural step, and I'd
do it the C way, provide the asm-out state as argument (but we already
have cfun, so casm didn't seem so gross).

> >>> I've built all cross compilers with the change and
> >>> can bootstrap on x86_64-linux-gnu and survives regression tests.
> >>
> >> A native bootstrap fails early in stage1 for x86_64-darwin (I’ll take a look
> >> at fixing the issues once the patch series settles down)
>
> JFTR, I applied the first two patches and then a couple of tweaks and it did
> bootstrap on Darwin.
>
> thanks
> Iain
>
>
  
Martin Liška Oct. 20, 2021, 11:57 a.m. UTC | #5
On 9/16/21 12:00, Martin Liška wrote:
> As preparation for a new global object that will encapsulate
> asm_out_file, we would need to live with a macro that will
> define asm_out_file as casm->out_file and thus the name
> can't be used in function arguments.
> 
> I've built all cross compilers with the change and
> can bootstrap on x86_64-linux-gnu and survives regression tests.
> 
> Ready to be installed?
> Thanks,
> Martin

May I please ping this renaming patch?

Thanks,
Martin
  
Richard Biener Oct. 20, 2021, 12:11 p.m. UTC | #6
On Wed, Oct 20, 2021 at 1:58 PM Martin Liška <mliska@suse.cz> wrote:
>
> On 9/16/21 12:00, Martin Liška wrote:
> > As preparation for a new global object that will encapsulate
> > asm_out_file, we would need to live with a macro that will
> > define asm_out_file as casm->out_file and thus the name
> > can't be used in function arguments.
> >
> > I've built all cross compilers with the change and
> > can bootstrap on x86_64-linux-gnu and survives regression tests.
> >
> > Ready to be installed?
> > Thanks,
> > Martin
>
> May I please ping this renaming patch?

The patch is OK.

Thanks,
Richard.

> Thanks,
> Martin
>
  

Patch

From 58c7c7f5ecf45f2f227f0792c9fdd24d4a7b59a6 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Wed, 15 Sep 2021 15:49:02 +0200
Subject: [PATCH 1/3] Rename asm_out_file function arguments.

As preparation for a new global object that will encapsulate
asm_out_file, we would need to live with a macro that will
define asm_out_file as casm->out_file and thus the name
can't be used in function arguments.

gcc/ChangeLog:

	* config/arm/arm.c (arm_unwind_emit_sequence): Do not declare
	already declared global variable.
	(arm_unwind_emit_set): Use out_file as function argument.
	(arm_unwind_emit): Likewise.
	* config/darwin.c (machopic_output_data_section_indirection): Likewise.
	(machopic_output_stub_indirection): Likewise.
	(machopic_output_indirection): Likewise.
	(machopic_finish): Likewise.
	* config/i386/i386.c (ix86_asm_output_function_label): Likewise.
	* config/i386/winnt.c (i386_pe_seh_unwind_emit): Likewise.
	* config/ia64/ia64.c (process_epilogue): Likewise.
	(process_cfa_adjust_cfa): Likewise.
	(process_cfa_register): Likewise.
	(process_cfa_offset): Likewise.
	(ia64_asm_unwind_emit): Likewise.
	* config/s390/s390.c (s390_asm_output_function_label): Likewise.
---
 gcc/config/arm/arm.c    | 46 ++++++++++++++---------------
 gcc/config/darwin.c     | 34 +++++++++++-----------
 gcc/config/i386/i386.c  | 12 ++++----
 gcc/config/i386/winnt.c | 12 ++++----
 gcc/config/ia64/ia64.c  | 64 ++++++++++++++++++++---------------------
 gcc/config/s390/s390.c  | 46 ++++++++++++++---------------
 6 files changed, 106 insertions(+), 108 deletions(-)

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 6c6e77fab66..1a7b47d236e 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -844,8 +844,6 @@  static char *         minipool_startobj;
    will be conditionalised if possible.  */
 static int max_insns_skipped = 5;
 
-extern FILE * asm_out_file;
-
 /* True if we are currently building a constant table.  */
 int making_const_table;
 
@@ -29452,7 +29450,7 @@  arm_dwarf_register_span (rtx rtl)
    epilogue.  */
 
 static void
-arm_unwind_emit_sequence (FILE * asm_out_file, rtx p)
+arm_unwind_emit_sequence (FILE * out_file, rtx p)
 {
   int i;
   HOST_WIDE_INT offset;
@@ -29496,14 +29494,14 @@  arm_unwind_emit_sequence (FILE * asm_out_file, rtx p)
 	padlast = offset - 4;
       gcc_assert (padlast == 0 || padlast == 4);
       if (padlast == 4)
-	fprintf (asm_out_file, "\t.pad #4\n");
+	fprintf (out_file, "\t.pad #4\n");
       reg_size = 4;
-      fprintf (asm_out_file, "\t.save {");
+      fprintf (out_file, "\t.save {");
     }
   else if (IS_VFP_REGNUM (reg))
     {
       reg_size = 8;
-      fprintf (asm_out_file, "\t.vsave {");
+      fprintf (out_file, "\t.vsave {");
     }
   else
     /* Unknown register type.  */
@@ -29529,13 +29527,13 @@  arm_unwind_emit_sequence (FILE * asm_out_file, rtx p)
       gcc_assert (reg >= lastreg);
 
       if (i != 1)
-	fprintf (asm_out_file, ", ");
+	fprintf (out_file, ", ");
       /* We can't use %r for vfp because we need to use the
 	 double precision register names.  */
       if (IS_VFP_REGNUM (reg))
-	asm_fprintf (asm_out_file, "d%d", (reg - FIRST_VFP_REGNUM) / 2);
+	asm_fprintf (out_file, "d%d", (reg - FIRST_VFP_REGNUM) / 2);
       else
-	asm_fprintf (asm_out_file, "%r", reg);
+	asm_fprintf (out_file, "%r", reg);
 
       if (flag_checking)
 	{
@@ -29553,15 +29551,15 @@  arm_unwind_emit_sequence (FILE * asm_out_file, rtx p)
 	  offset += reg_size;
 	}
     }
-  fprintf (asm_out_file, "}\n");
+  fprintf (out_file, "}\n");
   if (padfirst)
-    fprintf (asm_out_file, "\t.pad #%d\n", padfirst);
+    fprintf (out_file, "\t.pad #%d\n", padfirst);
 }
 
 /*  Emit unwind directives for a SET.  */
 
 static void
-arm_unwind_emit_set (FILE * asm_out_file, rtx p)
+arm_unwind_emit_set (FILE * out_file, rtx p)
 {
   rtx e0;
   rtx e1;
@@ -29578,12 +29576,12 @@  arm_unwind_emit_set (FILE * asm_out_file, rtx p)
 	  || REGNO (XEXP (XEXP (e0, 0), 0)) != SP_REGNUM)
 	abort ();
 
-      asm_fprintf (asm_out_file, "\t.save ");
+      asm_fprintf (out_file, "\t.save ");
       if (IS_VFP_REGNUM (REGNO (e1)))
-	asm_fprintf(asm_out_file, "{d%d}\n",
+	asm_fprintf(out_file, "{d%d}\n",
 		    (REGNO (e1) - FIRST_VFP_REGNUM) / 2);
       else
-	asm_fprintf(asm_out_file, "{%r}\n", REGNO (e1));
+	asm_fprintf(out_file, "{%r}\n", REGNO (e1));
       break;
 
     case REG:
@@ -29596,7 +29594,7 @@  arm_unwind_emit_set (FILE * asm_out_file, rtx p)
 	      || !CONST_INT_P (XEXP (e1, 1)))
 	    abort ();
 
-	  asm_fprintf (asm_out_file, "\t.pad #%wd\n",
+	  asm_fprintf (out_file, "\t.pad #%wd\n",
 		       -INTVAL (XEXP (e1, 1)));
 	}
       else if (REGNO (e0) == HARD_FRAME_POINTER_REGNUM)
@@ -29610,14 +29608,14 @@  arm_unwind_emit_set (FILE * asm_out_file, rtx p)
 		abort ();
 	      reg = REGNO (XEXP (e1, 0));
 	      offset = INTVAL (XEXP (e1, 1));
-	      asm_fprintf (asm_out_file, "\t.setfp %r, %r, #%wd\n",
+	      asm_fprintf (out_file, "\t.setfp %r, %r, #%wd\n",
 			   HARD_FRAME_POINTER_REGNUM, reg,
 			   offset);
 	    }
 	  else if (REG_P (e1))
 	    {
 	      reg = REGNO (e1);
-	      asm_fprintf (asm_out_file, "\t.setfp %r, %r\n",
+	      asm_fprintf (out_file, "\t.setfp %r, %r\n",
 			   HARD_FRAME_POINTER_REGNUM, reg);
 	    }
 	  else
@@ -29626,7 +29624,7 @@  arm_unwind_emit_set (FILE * asm_out_file, rtx p)
       else if (REG_P (e1) && REGNO (e1) == SP_REGNUM)
 	{
 	  /* Move from sp to reg.  */
-	  asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0));
+	  asm_fprintf (out_file, "\t.movsp %r\n", REGNO (e0));
 	}
      else if (GET_CODE (e1) == PLUS
 	      && REG_P (XEXP (e1, 0))
@@ -29634,7 +29632,7 @@  arm_unwind_emit_set (FILE * asm_out_file, rtx p)
 	      && CONST_INT_P (XEXP (e1, 1)))
 	{
 	  /* Set reg to offset from sp.  */
-	  asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n",
+	  asm_fprintf (out_file, "\t.movsp %r, #%d\n",
 		       REGNO (e0), (int)INTVAL(XEXP (e1, 1)));
 	}
       else
@@ -29650,7 +29648,7 @@  arm_unwind_emit_set (FILE * asm_out_file, rtx p)
 /* Emit unwind directives for the given insn.  */
 
 static void
-arm_unwind_emit (FILE * asm_out_file, rtx_insn *insn)
+arm_unwind_emit (FILE * out_file, rtx_insn *insn)
 {
   rtx note, pat;
   bool handled_one = false;
@@ -29693,7 +29691,7 @@  arm_unwind_emit (FILE * asm_out_file, rtx_insn *insn)
 
 	    gcc_assert (src == stack_pointer_rtx);
 	    reg = REGNO (dest);
-	    asm_fprintf (asm_out_file, "\t.unwind_raw 0, 0x%x @ vsp = r%d\n",
+	    asm_fprintf (out_file, "\t.unwind_raw 0, 0x%x @ vsp = r%d\n",
 			 reg + 0x90, reg);
 	  }
 	  handled_one = true;
@@ -29726,12 +29724,12 @@  arm_unwind_emit (FILE * asm_out_file, rtx_insn *insn)
   switch (GET_CODE (pat))
     {
     case SET:
-      arm_unwind_emit_set (asm_out_file, pat);
+      arm_unwind_emit_set (out_file, pat);
       break;
 
     case SEQUENCE:
       /* Store multiple.  */
-      arm_unwind_emit_sequence (asm_out_file, pat);
+      arm_unwind_emit_sequence (out_file, pat);
       break;
 
     default:
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 781742fe46f..abcbdb1e028 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1058,7 +1058,7 @@  machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
 
 int
 machopic_output_data_section_indirection (machopic_indirection **slot,
-					  FILE *asm_out_file)
+					  FILE *out_file)
 {
   machopic_indirection *p = *slot;
 
@@ -1073,7 +1073,7 @@  machopic_output_data_section_indirection (machopic_indirection **slot,
 
   switch_to_section (data_section);
   assemble_align (GET_MODE_ALIGNMENT (Pmode));
-  assemble_label (asm_out_file, ptr_name);
+  assemble_label (out_file, ptr_name);
   assemble_integer (gen_rtx_SYMBOL_REF (Pmode, sym_name),
 		    GET_MODE_SIZE (Pmode),
 		    GET_MODE_ALIGNMENT (Pmode), 1);
@@ -1083,7 +1083,7 @@  machopic_output_data_section_indirection (machopic_indirection **slot,
 
 int
 machopic_output_stub_indirection (machopic_indirection **slot,
-				  FILE *asm_out_file)
+				  FILE *out_file)
 {
   machopic_indirection *p = *slot;
 
@@ -1121,13 +1121,13 @@  machopic_output_stub_indirection (machopic_indirection **slot,
   else
     sprintf (stub, "%s%s", user_label_prefix, ptr_name);
 
-  machopic_output_stub (asm_out_file, sym, stub);
+  machopic_output_stub (out_file, sym, stub);
 
   return 1;
 }
 
 int
-machopic_output_indirection (machopic_indirection **slot, FILE *asm_out_file)
+machopic_output_indirection (machopic_indirection **slot, FILE *out_file)
 {
   machopic_indirection *p = *slot;
 
@@ -1159,18 +1159,18 @@  machopic_output_indirection (machopic_indirection **slot, FILE *asm_out_file)
 	     storage has been allocated.  */
 	  && !TREE_STATIC (decl))
 	{
-	  fputs ("\t.weak_reference ", asm_out_file);
-	  assemble_name (asm_out_file, sym_name);
-	  fputc ('\n', asm_out_file);
+	  fputs ("\t.weak_reference ", out_file);
+	  assemble_name (out_file, sym_name);
+	  fputc ('\n', out_file);
 	}
     }
 
-  assemble_name (asm_out_file, ptr_name);
-  fprintf (asm_out_file, ":\n");
+  assemble_name (out_file, ptr_name);
+  fprintf (out_file, ":\n");
 
-  fprintf (asm_out_file, "\t.indirect_symbol ");
-  assemble_name (asm_out_file, sym_name);
-  fprintf (asm_out_file, "\n");
+  fprintf (out_file, "\t.indirect_symbol ");
+  assemble_name (out_file, sym_name);
+  fprintf (out_file, "\n");
 
   /* Variables that are marked with MACHO_SYMBOL_FLAG_STATIC need to
      have their symbol name instead of 0 in the second entry of
@@ -1190,7 +1190,7 @@  machopic_output_indirection (machopic_indirection **slot, FILE *asm_out_file)
 }
 
 static void
-machopic_finish (FILE *asm_out_file)
+machopic_finish (FILE *out_file)
 {
   if (!machopic_indirections)
     return;
@@ -1198,13 +1198,13 @@  machopic_finish (FILE *asm_out_file)
   /* First output an symbol indirections that have been placed into .data
      (we don't expect these now).  */
   machopic_indirections->traverse_noresize
-    <FILE *, machopic_output_data_section_indirection> (asm_out_file);
+    <FILE *, machopic_output_data_section_indirection> (out_file);
 
   machopic_indirections->traverse_noresize
-    <FILE *, machopic_output_stub_indirection> (asm_out_file);
+    <FILE *, machopic_output_stub_indirection> (out_file);
 
   machopic_indirections->traverse_noresize
-    <FILE *, machopic_output_indirection> (asm_out_file);
+    <FILE *, machopic_output_indirection> (out_file);
 }
 
 int
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index d7abff0f396..a5c4fa857a7 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1567,7 +1567,7 @@  ix86_function_naked (const_tree fn)
 /* Write the extra assembler code needed to declare a function properly.  */
 
 void
-ix86_asm_output_function_label (FILE *asm_out_file, const char *fname,
+ix86_asm_output_function_label (FILE *out_file, const char *fname,
 				tree decl)
 {
   bool is_ms_hook = ix86_function_ms_hook_prologue (decl);
@@ -1581,14 +1581,14 @@  ix86_asm_output_function_label (FILE *asm_out_file, const char *fname,
       unsigned int filler_cc = 0xcccccccc;
 
       for (i = 0; i < filler_count; i += 4)
-        fprintf (asm_out_file, ASM_LONG " %#x\n", filler_cc);
+	fprintf (out_file, ASM_LONG " %#x\n", filler_cc);
     }
 
 #ifdef SUBTARGET_ASM_UNWIND_INIT
-  SUBTARGET_ASM_UNWIND_INIT (asm_out_file);
+  SUBTARGET_ASM_UNWIND_INIT (out_file);
 #endif
 
-  ASM_OUTPUT_LABEL (asm_out_file, fname);
+  ASM_OUTPUT_LABEL (out_file, fname);
 
   /* Output magic byte marker, if hot-patch attribute is set.  */
   if (is_ms_hook)
@@ -1597,14 +1597,14 @@  ix86_asm_output_function_label (FILE *asm_out_file, const char *fname,
 	{
 	  /* leaq [%rsp + 0], %rsp  */
 	  fputs (ASM_BYTE "0x48, 0x8d, 0xa4, 0x24, 0x00, 0x00, 0x00, 0x00\n",
-		 asm_out_file);
+		 out_file);
 	}
       else
 	{
           /* movl.s %edi, %edi
 	     push   %ebp
 	     movl.s %esp, %ebp */
-	  fputs (ASM_BYTE "0x8b, 0xff, 0x55, 0x8b, 0xec\n", asm_out_file);
+	  fputs (ASM_BYTE "0x8b, 0xff, 0x55, 0x8b, 0xec\n", out_file);
 	}
     }
 }
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index 4158a45ac31..7c0ea4f731c 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -1231,7 +1231,7 @@  seh_frame_related_expr (FILE *f, struct seh_frame_state *seh, rtx pat)
    required for unwind of this insn.  */
 
 void
-i386_pe_seh_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
+i386_pe_seh_unwind_emit (FILE *out_file, rtx_insn *insn)
 {
   rtx note, pat;
   bool handled_one = false;
@@ -1246,8 +1246,8 @@  i386_pe_seh_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
       /* See ix86_seh_fixup_eh_fallthru for the rationale.  */
       rtx_insn *prev = prev_active_insn (insn);
       if (prev && !insn_nothrow_p (prev))
-	fputs ("\tnop\n", asm_out_file);
-      fputs ("\t.seh_endproc\n", asm_out_file);
+	fputs ("\tnop\n", out_file);
+      fputs ("\t.seh_endproc\n", out_file);
       seh->in_cold_section = true;
       return;
     }
@@ -1286,7 +1286,7 @@  i386_pe_seh_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
 	      if (GET_CODE (pat) == PARALLEL)
 		pat = XVECEXP (pat, 0, 0);
 	    }
-	  seh_cfa_adjust_cfa (asm_out_file, seh, pat);
+	  seh_cfa_adjust_cfa (out_file, seh, pat);
 	  handled_one = true;
 	  break;
 
@@ -1294,7 +1294,7 @@  i386_pe_seh_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
 	  pat = XEXP (note, 0);
 	  if (pat == NULL)
 	    pat = single_set (insn);
-	  seh_cfa_offset (asm_out_file, seh, pat);
+	  seh_cfa_offset (out_file, seh, pat);
 	  handled_one = true;
 	  break;
 
@@ -1306,7 +1306,7 @@  i386_pe_seh_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
     return;
   pat = PATTERN (insn);
  found:
-  seh_frame_related_expr (asm_out_file, seh, pat);
+  seh_frame_related_expr (out_file, seh, pat);
 }
 
 void
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 632b9df1761..cdf78cdc518 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -10044,7 +10044,7 @@  static bool need_copy_state;
 /* The function emits unwind directives for the start of an epilogue.  */
 
 static void
-process_epilogue (FILE *asm_out_file, rtx insn ATTRIBUTE_UNUSED,
+process_epilogue (FILE *out_file, rtx insn ATTRIBUTE_UNUSED,
 		  bool unwind, bool frame ATTRIBUTE_UNUSED)
 {
   /* If this isn't the last block of the function, then we need to label the
@@ -10053,19 +10053,19 @@  process_epilogue (FILE *asm_out_file, rtx insn ATTRIBUTE_UNUSED,
   if (!last_block)
     {
       if (unwind)
-	fprintf (asm_out_file, "\t.label_state %d\n",
+	fprintf (out_file, "\t.label_state %d\n",
 		 ++cfun->machine->state_num);
       need_copy_state = true;
     }
 
   if (unwind)
-    fprintf (asm_out_file, "\t.restore sp\n");
+    fprintf (out_file, "\t.restore sp\n");
 }
 
 /* This function processes a SET pattern for REG_CFA_ADJUST_CFA.  */
 
 static void
-process_cfa_adjust_cfa (FILE *asm_out_file, rtx pat, rtx insn,
+process_cfa_adjust_cfa (FILE *out_file, rtx pat, rtx insn,
 			bool unwind, bool frame)
 {
   rtx dest = SET_DEST (pat);
@@ -10084,17 +10084,17 @@  process_cfa_adjust_cfa (FILE *asm_out_file, rtx pat, rtx insn,
 	    {
 	      gcc_assert (!frame_pointer_needed);
 	      if (unwind)
-		fprintf (asm_out_file,
+		fprintf (out_file,
 			 "\t.fframe " HOST_WIDE_INT_PRINT_DEC"\n",
 			 -INTVAL (op1));
 	    }
 	  else
-	    process_epilogue (asm_out_file, insn, unwind, frame);
+	    process_epilogue (out_file, insn, unwind, frame);
 	}
       else
 	{
 	  gcc_assert (src == hard_frame_pointer_rtx);
-	  process_epilogue (asm_out_file, insn, unwind, frame);
+	  process_epilogue (out_file, insn, unwind, frame);
 	}
     }
   else if (dest == hard_frame_pointer_rtx)
@@ -10103,7 +10103,7 @@  process_cfa_adjust_cfa (FILE *asm_out_file, rtx pat, rtx insn,
       gcc_assert (frame_pointer_needed);
 
       if (unwind)
-	fprintf (asm_out_file, "\t.vframe r%d\n",
+	fprintf (out_file, "\t.vframe r%d\n",
 		 ia64_dbx_register_number (REGNO (dest)));
     }
   else
@@ -10113,7 +10113,7 @@  process_cfa_adjust_cfa (FILE *asm_out_file, rtx pat, rtx insn,
 /* This function processes a SET pattern for REG_CFA_REGISTER.  */
 
 static void
-process_cfa_register (FILE *asm_out_file, rtx pat, bool unwind)
+process_cfa_register (FILE *out_file, rtx pat, bool unwind)
 {
   rtx dest = SET_DEST (pat);
   rtx src = SET_SRC (pat);
@@ -10124,7 +10124,7 @@  process_cfa_register (FILE *asm_out_file, rtx pat, bool unwind)
     {
       /* Saving return address pointer.  */
       if (unwind)
-	fprintf (asm_out_file, "\t.save rp, r%d\n",
+	fprintf (out_file, "\t.save rp, r%d\n",
 		 ia64_dbx_register_number (dest_regno));
       return;
     }
@@ -10136,21 +10136,21 @@  process_cfa_register (FILE *asm_out_file, rtx pat, bool unwind)
     case PR_REG (0):
       gcc_assert (dest_regno == current_frame_info.r[reg_save_pr]);
       if (unwind)
-	fprintf (asm_out_file, "\t.save pr, r%d\n",
+	fprintf (out_file, "\t.save pr, r%d\n",
 		 ia64_dbx_register_number (dest_regno));
       break;
 
     case AR_UNAT_REGNUM:
       gcc_assert (dest_regno == current_frame_info.r[reg_save_ar_unat]);
       if (unwind)
-	fprintf (asm_out_file, "\t.save ar.unat, r%d\n",
+	fprintf (out_file, "\t.save ar.unat, r%d\n",
 		 ia64_dbx_register_number (dest_regno));
       break;
 
     case AR_LC_REGNUM:
       gcc_assert (dest_regno == current_frame_info.r[reg_save_ar_lc]);
       if (unwind)
-	fprintf (asm_out_file, "\t.save ar.lc, r%d\n",
+	fprintf (out_file, "\t.save ar.lc, r%d\n",
 		 ia64_dbx_register_number (dest_regno));
       break;
 
@@ -10163,7 +10163,7 @@  process_cfa_register (FILE *asm_out_file, rtx pat, bool unwind)
 /* This function processes a SET pattern for REG_CFA_OFFSET.  */
 
 static void
-process_cfa_offset (FILE *asm_out_file, rtx pat, bool unwind)
+process_cfa_offset (FILE *out_file, rtx pat, bool unwind)
 {
   rtx dest = SET_DEST (pat);
   rtx src = SET_SRC (pat);
@@ -10203,35 +10203,35 @@  process_cfa_offset (FILE *asm_out_file, rtx pat, bool unwind)
     case BR_REG (0):
       gcc_assert (!current_frame_info.r[reg_save_b0]);
       if (unwind)
-	fprintf (asm_out_file, "\t%s rp, " HOST_WIDE_INT_PRINT_DEC "\n",
+	fprintf (out_file, "\t%s rp, " HOST_WIDE_INT_PRINT_DEC "\n",
 		 saveop, off);
       break;
 
     case PR_REG (0):
       gcc_assert (!current_frame_info.r[reg_save_pr]);
       if (unwind)
-	fprintf (asm_out_file, "\t%s pr, " HOST_WIDE_INT_PRINT_DEC "\n",
+	fprintf (out_file, "\t%s pr, " HOST_WIDE_INT_PRINT_DEC "\n",
 		 saveop, off);
       break;
 
     case AR_LC_REGNUM:
       gcc_assert (!current_frame_info.r[reg_save_ar_lc]);
       if (unwind)
-	fprintf (asm_out_file, "\t%s ar.lc, " HOST_WIDE_INT_PRINT_DEC "\n",
+	fprintf (out_file, "\t%s ar.lc, " HOST_WIDE_INT_PRINT_DEC "\n",
 		 saveop, off);
       break;
 
     case AR_PFS_REGNUM:
       gcc_assert (!current_frame_info.r[reg_save_ar_pfs]);
       if (unwind)
-	fprintf (asm_out_file, "\t%s ar.pfs, " HOST_WIDE_INT_PRINT_DEC "\n",
+	fprintf (out_file, "\t%s ar.pfs, " HOST_WIDE_INT_PRINT_DEC "\n",
 		 saveop, off);
       break;
 
     case AR_UNAT_REGNUM:
       gcc_assert (!current_frame_info.r[reg_save_ar_unat]);
       if (unwind)
-	fprintf (asm_out_file, "\t%s ar.unat, " HOST_WIDE_INT_PRINT_DEC "\n",
+	fprintf (out_file, "\t%s ar.unat, " HOST_WIDE_INT_PRINT_DEC "\n",
 		 saveop, off);
       break;
 
@@ -10240,7 +10240,7 @@  process_cfa_offset (FILE *asm_out_file, rtx pat, bool unwind)
     case GR_REG (6):
     case GR_REG (7):
       if (unwind)
-	fprintf (asm_out_file, "\t.save.g 0x%x\n",
+	fprintf (out_file, "\t.save.g 0x%x\n",
 		 1 << (src_regno - GR_REG (4)));
       break;
 
@@ -10250,7 +10250,7 @@  process_cfa_offset (FILE *asm_out_file, rtx pat, bool unwind)
     case BR_REG (4):
     case BR_REG (5):
       if (unwind)
-	fprintf (asm_out_file, "\t.save.b 0x%x\n",
+	fprintf (out_file, "\t.save.b 0x%x\n",
 		 1 << (src_regno - BR_REG (1)));
       break;
 
@@ -10259,7 +10259,7 @@  process_cfa_offset (FILE *asm_out_file, rtx pat, bool unwind)
     case FR_REG (4):
     case FR_REG (5):
       if (unwind)
-	fprintf (asm_out_file, "\t.save.f 0x%x\n",
+	fprintf (out_file, "\t.save.f 0x%x\n",
 		 1 << (src_regno - FR_REG (2)));
       break;
 
@@ -10268,7 +10268,7 @@  process_cfa_offset (FILE *asm_out_file, rtx pat, bool unwind)
     case FR_REG (24): case FR_REG (25): case FR_REG (26): case FR_REG (27):
     case FR_REG (28): case FR_REG (29): case FR_REG (30): case FR_REG (31):
       if (unwind)
-	fprintf (asm_out_file, "\t.save.gf 0x0, 0x%x\n",
+	fprintf (out_file, "\t.save.gf 0x0, 0x%x\n",
 		 1 << (src_regno - FR_REG (12)));
       break;
 
@@ -10283,7 +10283,7 @@  process_cfa_offset (FILE *asm_out_file, rtx pat, bool unwind)
    required to unwind this insn.  */
 
 static void
-ia64_asm_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
+ia64_asm_unwind_emit (FILE *out_file, rtx_insn *insn)
 {
   bool unwind = ia64_except_unwind_info (&global_options) == UI_TARGET;
   bool frame = dwarf2out_do_frame ();
@@ -10303,8 +10303,8 @@  ia64_asm_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
 	{
 	  if (unwind)
 	    {
-	      fprintf (asm_out_file, "\t.body\n");
-	      fprintf (asm_out_file, "\t.copy_state %d\n",
+	      fprintf (out_file, "\t.body\n");
+	      fprintf (out_file, "\t.copy_state %d\n",
 		       cfun->machine->state_num);
 	    }
 	  need_copy_state = false;
@@ -10325,7 +10325,7 @@  ia64_asm_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
       if (dest_regno == current_frame_info.r[reg_save_ar_pfs])
 	{
 	  if (unwind)
-	    fprintf (asm_out_file, "\t.save ar.pfs, r%d\n",
+	    fprintf (out_file, "\t.save ar.pfs, r%d\n",
 		     ia64_dbx_register_number (dest_regno));
 	}
       else
@@ -10338,9 +10338,9 @@  ia64_asm_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
 	     sp" now.  */
 	  if (current_frame_info.total_size == 0 && !frame_pointer_needed)
 	    /* if haven't done process_epilogue() yet, do it now */
-	    process_epilogue (asm_out_file, insn, unwind, frame);
+	    process_epilogue (out_file, insn, unwind, frame);
 	  if (unwind)
-	    fprintf (asm_out_file, "\t.prologue\n");
+	    fprintf (out_file, "\t.prologue\n");
 	}
       return;
     }
@@ -10353,7 +10353,7 @@  ia64_asm_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
 	pat = XEXP (note, 0);
 	if (pat == NULL)
 	  pat = PATTERN (insn);
-	process_cfa_adjust_cfa (asm_out_file, pat, insn, unwind, frame);
+	process_cfa_adjust_cfa (out_file, pat, insn, unwind, frame);
 	handled_one = true;
 	break;
 
@@ -10361,7 +10361,7 @@  ia64_asm_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
 	pat = XEXP (note, 0);
 	if (pat == NULL)
 	  pat = PATTERN (insn);
-	process_cfa_offset (asm_out_file, pat, unwind);
+	process_cfa_offset (out_file, pat, unwind);
 	handled_one = true;
 	break;
 
@@ -10369,7 +10369,7 @@  ia64_asm_unwind_emit (FILE *asm_out_file, rtx_insn *insn)
 	pat = XEXP (note, 0);
 	if (pat == NULL)
 	  pat = PATTERN (insn);
-	process_cfa_register (asm_out_file, pat, unwind);
+	process_cfa_register (out_file, pat, unwind);
 	handled_one = true;
 	break;
 
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 54dd6332c3a..3e422f045c9 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -7798,7 +7798,7 @@  s390_asm_declare_function_size (FILE *asm_out_file,
 /* Write the extra assembler code needed to declare a function properly.  */
 
 void
-s390_asm_output_function_label (FILE *asm_out_file, const char *fname,
+s390_asm_output_function_label (FILE *out_file, const char *fname,
 				tree decl)
 {
   int hw_before, hw_after;
@@ -7812,11 +7812,11 @@  s390_asm_output_function_label (FILE *asm_out_file, const char *fname,
       /* Add a trampoline code area before the function label and initialize it
 	 with two-byte nop instructions.  This area can be overwritten with code
 	 that jumps to a patched version of the function.  */
-      asm_fprintf (asm_out_file, "\tnopr\t%%r0"
+      asm_fprintf (out_file, "\tnopr\t%%r0"
 		   "\t# pre-label NOPs for hotpatch (%d halfwords)\n",
 		   hw_before);
       for (i = 1; i < hw_before; i++)
-	fputs ("\tnopr\t%r0\n", asm_out_file);
+	fputs ("\tnopr\t%r0\n", out_file);
 
       /* Note:  The function label must be aligned so that (a) the bytes of the
 	 following nop do not cross a cacheline boundary, and (b) a jump address
@@ -7833,35 +7833,35 @@  s390_asm_output_function_label (FILE *asm_out_file, const char *fname,
 	function_alignment
 	  = MAX (function_alignment,
 		 (unsigned int) align_functions.levels[0].get_value ());
-      fputs ("\t# alignment for hotpatch\n", asm_out_file);
-      ASM_OUTPUT_ALIGN (asm_out_file, align_functions.levels[0].log);
+      fputs ("\t# alignment for hotpatch\n", out_file);
+      ASM_OUTPUT_ALIGN (out_file, align_functions.levels[0].log);
     }
 
   if (S390_USE_TARGET_ATTRIBUTE && TARGET_DEBUG_ARG)
     {
-      asm_fprintf (asm_out_file, "\t# fn:%s ar%d\n", fname, s390_arch);
-      asm_fprintf (asm_out_file, "\t# fn:%s tu%d\n", fname, s390_tune);
-      asm_fprintf (asm_out_file, "\t# fn:%s sg%d\n", fname, s390_stack_guard);
-      asm_fprintf (asm_out_file, "\t# fn:%s ss%d\n", fname, s390_stack_size);
-      asm_fprintf (asm_out_file, "\t# fn:%s bc%d\n", fname, s390_branch_cost);
-      asm_fprintf (asm_out_file, "\t# fn:%s wf%d\n", fname,
+      asm_fprintf (out_file, "\t# fn:%s ar%d\n", fname, s390_arch);
+      asm_fprintf (out_file, "\t# fn:%s tu%d\n", fname, s390_tune);
+      asm_fprintf (out_file, "\t# fn:%s sg%d\n", fname, s390_stack_guard);
+      asm_fprintf (out_file, "\t# fn:%s ss%d\n", fname, s390_stack_size);
+      asm_fprintf (out_file, "\t# fn:%s bc%d\n", fname, s390_branch_cost);
+      asm_fprintf (out_file, "\t# fn:%s wf%d\n", fname,
 		   s390_warn_framesize);
-      asm_fprintf (asm_out_file, "\t# fn:%s ba%d\n", fname, TARGET_BACKCHAIN);
-      asm_fprintf (asm_out_file, "\t# fn:%s hd%d\n", fname, TARGET_HARD_DFP);
-      asm_fprintf (asm_out_file, "\t# fn:%s hf%d\n", fname, !TARGET_SOFT_FLOAT);
-      asm_fprintf (asm_out_file, "\t# fn:%s ht%d\n", fname, TARGET_OPT_HTM);
-      asm_fprintf (asm_out_file, "\t# fn:%s vx%d\n", fname, TARGET_OPT_VX);
-      asm_fprintf (asm_out_file, "\t# fn:%s ps%d\n", fname,
+      asm_fprintf (out_file, "\t# fn:%s ba%d\n", fname, TARGET_BACKCHAIN);
+      asm_fprintf (out_file, "\t# fn:%s hd%d\n", fname, TARGET_HARD_DFP);
+      asm_fprintf (out_file, "\t# fn:%s hf%d\n", fname, !TARGET_SOFT_FLOAT);
+      asm_fprintf (out_file, "\t# fn:%s ht%d\n", fname, TARGET_OPT_HTM);
+      asm_fprintf (out_file, "\t# fn:%s vx%d\n", fname, TARGET_OPT_VX);
+      asm_fprintf (out_file, "\t# fn:%s ps%d\n", fname,
 		   TARGET_PACKED_STACK);
-      asm_fprintf (asm_out_file, "\t# fn:%s se%d\n", fname, TARGET_SMALL_EXEC);
-      asm_fprintf (asm_out_file, "\t# fn:%s mv%d\n", fname, TARGET_MVCLE);
-      asm_fprintf (asm_out_file, "\t# fn:%s zv%d\n", fname, TARGET_ZVECTOR);
-      asm_fprintf (asm_out_file, "\t# fn:%s wd%d\n", fname,
+      asm_fprintf (out_file, "\t# fn:%s se%d\n", fname, TARGET_SMALL_EXEC);
+      asm_fprintf (out_file, "\t# fn:%s mv%d\n", fname, TARGET_MVCLE);
+      asm_fprintf (out_file, "\t# fn:%s zv%d\n", fname, TARGET_ZVECTOR);
+      asm_fprintf (out_file, "\t# fn:%s wd%d\n", fname,
 		   s390_warn_dynamicstack_p);
     }
-  ASM_OUTPUT_LABEL (asm_out_file, fname);
+  ASM_OUTPUT_LABEL (out_file, fname);
   if (hw_after > 0)
-    asm_fprintf (asm_out_file,
+    asm_fprintf (out_file,
 		 "\t# post-label NOPs for hotpatch (%d halfwords)\n",
 		 hw_after);
 }
-- 
2.33.0