This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[incremental] Patch: FYI: delay all assembly output


I'm checking this in on the incremental-compiler branch.

The plan for the incremental code generation requires us to defer
assembly output until rather late.  As the first step toward this,
this patch postpones all output until the server has forked for code
generation.  This is enforced by having asm_out_file be NULL until it
is time.

I removed the assertion from assemble_external, because the whole idea
is not to have asm_out_file be set.  I considered deferring all calls
to assemble_external -- but since assemble_external already implements
deferral, this would just be a rearrangement, without any real point.

I only converted the dwarf debug output code to work properly.  I made
dbxout compile, but that's it.

Tom

ChangeLog:
2007-10-19  Tom Tromey  <tromey@redhat.com>

	* dbxout.c (dbx_debug_hooks): Update.
	* varasm.c (assemble_external): Remove assert.
	* dwarf2out.c (dw_asm_out_file): New global.
	Changed all users of asm_out_file to use dw_asm_out_file.
	(dwarf2out_init): Update.
	(dwarf2out_set_output_file): New function.
	* debug.h (struct gcc_debug_hooks) <set_output_file>: New hook.
	(debug_nothing_filestar): Declare.
	* debug.c (do_nothing_debug_hooks): Update.
	(debug_nothing_filestar): New.
	* toplev.c (server_asm_out_file): New global.
	(compile_file): Don't flush asm_out_file.  Call init_asm_output in
	server mode.  Call set_output_file debug hook.
	(lang_dependent_init): Conditionally call init_asm_output and
	set_output_file debug hook.
	(finalize): Close server_asm_out_file.
	(start_as): Set server_asm_out_file, not asm_out_file.

Index: toplev.c
===================================================================
--- toplev.c	(revision 129239)
+++ toplev.c	(working copy)
@@ -387,6 +387,11 @@
 FILE *dump_file = NULL;
 const char *dump_file_name;
 
+/* In server mode we want to ensure that nothing is written to the
+   assembler before we're ready for it.  So, we store the pipe to the
+   assembler here, and we don't set asm_out_file until relatively
+   late.  */
+static FILE *server_asm_out_file;
 
 typedef const char *cchar_p;
 DEF_VEC_P(cchar_p);
@@ -1070,13 +1075,19 @@
   if (flag_syntax_only)
     return false;
 
-  /* Make sure output file is flushed before forking.  */
-  if (asm_out_file)
-    fflush (asm_out_file);
-
   if (server_mode && server_start_back_end ())
     return false;
 
+  if (server_mode)
+    {
+      gcc_assert (server_asm_out_file && !asm_out_file);
+      asm_out_file = server_asm_out_file;
+      server_asm_out_file = NULL;
+      init_asm_output (main_input_filename);
+    }
+  if (flag_unit_at_a_time)
+    (*debug_hooks->set_output_file) (asm_out_file);
+
   cgraph_finalize_compilation_unit ();
 
   lang_hooks.decls.final_write_globals ();
@@ -2071,7 +2082,8 @@
     return 0;
   input_location = save_loc;
 
-  init_asm_output (name);
+  if (!server_mode)
+    init_asm_output (name);
 
   /* These create various _DECL nodes, so need to be called after the
      front end is initialized.  */
@@ -2102,6 +2114,8 @@
      debug output.  */
   (*debug_hooks->init) (name);
   dw2_initialize ();
+  if (!flag_unit_at_a_time)
+    (*debug_hooks->set_output_file) (asm_out_file);
 
   timevar_pop (TV_SYMOUT);
 
@@ -2147,6 +2161,12 @@
       asm_out_file = NULL;
     }
 
+  if (server_asm_out_file)
+    {
+      fclose (server_asm_out_file);
+      server_asm_out_file = NULL;
+    }
+
   finish_optimization_passes ();
 
   if (mem_report)
@@ -2214,7 +2234,7 @@
 
       /* Note that asm_out_file is conditional on BUFSIZ and is
 	 redeclared in a number of files.  Yay.  */
-      asm_out_file = pex_input_pipe (px, 0);
+      server_asm_out_file = pex_input_pipe (px, 0);
 
       errstr = pex_run (px, PEX_LAST | PEX_SEARCH, as_argv[0], as_argv,
 			NULL, NULL, &pxerr);
Index: debug.c
===================================================================
--- debug.c	(revision 127650)
+++ debug.c	(working copy)
@@ -26,6 +26,7 @@
 {
   debug_nothing_charstar,
   debug_nothing_charstar,
+  debug_nothing_filestar,
   debug_nothing_int_charstar,
   debug_nothing_int_charstar,
   debug_nothing_int_charstar,
@@ -109,3 +110,8 @@
 			int local ATTRIBUTE_UNUSED)
 {
 }
+
+void
+debug_nothing_filestar (FILE *output ATTRIBUTE_UNUSED)
+{
+}
Index: debug.h
===================================================================
--- debug.h	(revision 127650)
+++ debug.h	(working copy)
@@ -30,6 +30,10 @@
   /* Output debug symbols.  */
   void (* finish) (const char *main_filename);
 
+  /* Set the output file.  No output should be written until this is
+     called.  */
+  void (* set_output_file) (FILE *output_file);
+
   /* Macro defined on line LINE with name and expansion TEXT.  */
   void (* define) (unsigned int line, const char *text);
 
@@ -142,6 +146,7 @@
 extern void debug_nothing_tree_tree (tree, tree);
 extern bool debug_true_tree (tree);
 extern void debug_nothing_rtx (rtx);
+extern void debug_nothing_filestar (FILE *);
 
 /* Hooks for various debug formats.  */
 extern const struct gcc_debug_hooks do_nothing_debug_hooks;
Index: dbxout.c
===================================================================
--- dbxout.c	(revision 127650)
+++ dbxout.c	(working copy)
@@ -347,6 +347,7 @@
 {
   dbxout_init,
   dbxout_finish,
+  debug_nothing_filestar,
   debug_nothing_int_charstar,
   debug_nothing_int_charstar,
   dbxout_start_source_file,
Index: dwarf2out.c
===================================================================
--- dwarf2out.c	(revision 128735)
+++ dwarf2out.c	(working copy)
@@ -103,6 +103,9 @@
 # endif
 #endif
 
+/* The output file.  */
+static FILE *dw_asm_out_file;
+
 /* Map register numbers held in the call frame info that gcc has
    collected using DWARF_FRAME_REGNUM to those that should be output in
    .debug_frame and .eh_frame.  */
@@ -620,7 +623,7 @@
   static char label[20];
 
   ASM_GENERATE_INTERNAL_LABEL (label, "LCFI", dwarf2out_cfi_label_num++);
-  ASM_OUTPUT_LABEL (asm_out_file, label);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, label);
   return label;
 }
 
@@ -2065,10 +2068,10 @@
 	 the data section and emit special labels to guide collect2.  */
       switch_to_section (data_section);
       label = get_file_function_name ("F");
-      ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
-      targetm.asm_out.globalize_label (asm_out_file,
+      ASM_OUTPUT_ALIGN (dw_asm_out_file, floor_log2 (PTR_SIZE));
+      targetm.asm_out.globalize_label (dw_asm_out_file,
 				       IDENTIFIER_POINTER (label));
-      ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (label));
+      ASM_OUTPUT_LABEL (dw_asm_out_file, IDENTIFIER_POINTER (label));
     }
 }
 
@@ -2231,7 +2234,7 @@
       if ((fde_table[i].nothrow || fde_table[i].all_throwers_are_sibcalls)
 	  && !fde_table[i].uses_eh_lsda
 	  && ! DECL_WEAK (fde_table[i].decl))
-	targetm.asm_out.unwind_label (asm_out_file, fde_table[i].decl,
+	targetm.asm_out.unwind_label (dw_asm_out_file, fde_table[i].decl,
 				      for_eh, /* empty */ 1);
 
   /* If we don't have any functions we'll want to unwind out of, don't
@@ -2270,7 +2273,7 @@
     }
 
   ASM_GENERATE_INTERNAL_LABEL (section_start_label, FRAME_BEGIN_LABEL, for_eh);
-  ASM_OUTPUT_LABEL (asm_out_file, section_start_label);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, section_start_label);
 
   /* Output the CIE.  */
   ASM_GENERATE_INTERNAL_LABEL (l1, CIE_AFTER_SIZE_LABEL, for_eh);
@@ -2280,7 +2283,7 @@
       "Initial length escape value indicating 64-bit DWARF extension");
   dw2_asm_output_delta (for_eh ? 4 : DWARF_OFFSET_SIZE, l2, l1,
 			"Length of Common Information Entry");
-  ASM_OUTPUT_LABEL (asm_out_file, l1);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, l1);
 
   /* Now that the CIE pointer is PC-relative for EH,
      use 0 to identify the CIE.  */
@@ -2391,9 +2394,9 @@
     output_cfi (cfi, NULL, for_eh);
 
   /* Pad the CIE out to an address sized boundary.  */
-  ASM_OUTPUT_ALIGN (asm_out_file,
+  ASM_OUTPUT_ALIGN (dw_asm_out_file,
 		    floor_log2 (for_eh ? PTR_SIZE : DWARF2_ADDR_SIZE));
-  ASM_OUTPUT_LABEL (asm_out_file, l2);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, l2);
 
   /* Loop through all of the FDE's.  */
   for (i = 0; i < fde_table_in_use; i++)
@@ -2407,8 +2410,8 @@
 	  && !fde->uses_eh_lsda)
 	continue;
 
-      targetm.asm_out.unwind_label (asm_out_file, fde->decl, for_eh, /* empty */ 0);
-      targetm.asm_out.internal_label (asm_out_file, FDE_LABEL, for_eh + i * 2);
+      targetm.asm_out.unwind_label (dw_asm_out_file, fde->decl, for_eh, /* empty */ 0);
+      targetm.asm_out.internal_label (dw_asm_out_file, FDE_LABEL, for_eh + i * 2);
       ASM_GENERATE_INTERNAL_LABEL (l1, FDE_AFTER_SIZE_LABEL, for_eh + i * 2);
       ASM_GENERATE_INTERNAL_LABEL (l2, FDE_END_LABEL, for_eh + i * 2);
       if (DWARF_INITIAL_LENGTH_SIZE - DWARF_OFFSET_SIZE == 4 && !for_eh)
@@ -2416,7 +2419,7 @@
 			     "Initial length escape value indicating 64-bit DWARF extension");
       dw2_asm_output_delta (for_eh ? 4 : DWARF_OFFSET_SIZE, l2, l1,
 			    "FDE Length");
-      ASM_OUTPUT_LABEL (asm_out_file, l1);
+      ASM_OUTPUT_LABEL (dw_asm_out_file, l1);
 
       if (for_eh)
 	dw2_asm_output_delta (4, l1, section_start_label, "FDE CIE offset");
@@ -2516,7 +2519,7 @@
 	      else
 		{
 		  if (lsda_encoding == DW_EH_PE_aligned)
-		    ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
+		    ASM_OUTPUT_ALIGN (dw_asm_out_file, floor_log2 (PTR_SIZE));
 		  dw2_asm_output_data
 		    (size_of_encoded_value (lsda_encoding), 0,
 		     "Language Specific Data Area (none)");
@@ -2533,9 +2536,9 @@
 	output_cfi (cfi, fde, for_eh);
 
       /* Pad the FDE out to an address sized boundary.  */
-      ASM_OUTPUT_ALIGN (asm_out_file,
+      ASM_OUTPUT_ALIGN (dw_asm_out_file,
 			floor_log2 ((for_eh ? PTR_SIZE : DWARF2_ADDR_SIZE)));
-      ASM_OUTPUT_LABEL (asm_out_file, l2);
+      ASM_OUTPUT_LABEL (dw_asm_out_file, l2);
     }
 
   if (for_eh && targetm.terminate_dw2_eh_frame_info)
@@ -2543,7 +2546,7 @@
 #ifdef MIPS_DEBUGGING_INFO
   /* Work around Irix 6 assembler bug whereby labels at the end of a section
      get a value of 0.  Putting .align 0 after the label fixes it.  */
-  ASM_OUTPUT_ALIGN (asm_out_file, 0);
+  ASM_OUTPUT_ALIGN (dw_asm_out_file, 0);
 #endif
 
   /* Turn off app to make assembly quicker.  */
@@ -2579,7 +2582,7 @@
   switch_to_section (function_section (current_function_decl));
   ASM_GENERATE_INTERNAL_LABEL (label, FUNC_BEGIN_LABEL,
 			       current_function_funcdef_no);
-  ASM_OUTPUT_DEBUG_LABEL (asm_out_file, FUNC_BEGIN_LABEL,
+  ASM_OUTPUT_DEBUG_LABEL (dw_asm_out_file, FUNC_BEGIN_LABEL,
 			  current_function_funcdef_no);
   dup_label = xstrdup (label);
   current_function_func_begin_label = dup_label;
@@ -2645,7 +2648,7 @@
      function.  */
   ASM_GENERATE_INTERNAL_LABEL (label, FUNC_END_LABEL,
 			       current_function_funcdef_no);
-  ASM_OUTPUT_LABEL (asm_out_file, label);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, label);
   fde = &fde_table[fde_table_in_use - 1];
   fde->dw_fde_end = xstrdup (label);
 }
@@ -3433,10 +3436,10 @@
     case INTERNAL_DW_OP_tls_addr:
       if (targetm.asm_out.output_dwarf_dtprel)
 	{
-	  targetm.asm_out.output_dwarf_dtprel (asm_out_file,
+	  targetm.asm_out.output_dwarf_dtprel (dw_asm_out_file,
 					       DWARF2_ADDR_SIZE,
 					       val1->v.val_addr);
-	  fputc ('\n', asm_out_file);
+	  fputc ('\n', dw_asm_out_file);
 	}
       else
 	gcc_unreachable ();
@@ -3648,6 +3651,7 @@
 
 static void dwarf2out_init (const char *);
 static void dwarf2out_finish (const char *);
+static void dwarf2out_set_output_file (FILE *);
 static void dwarf2out_define (unsigned int, const char *);
 static void dwarf2out_undef (unsigned int, const char *);
 static void dwarf2out_start_source_file (unsigned, const char *);
@@ -3669,6 +3673,7 @@
 {
   dwarf2out_init,
   dwarf2out_finish,
+  dwarf2out_set_output_file,
   dwarf2out_define,
   dwarf2out_undef,
   dwarf2out_start_source_file,
@@ -7065,9 +7070,9 @@
     /* We make these global, not weak; if the target doesn't support
        .linkonce, it doesn't support combining the sections, so debugging
        will break.  */
-    targetm.asm_out.globalize_label (asm_out_file, sym);
+    targetm.asm_out.globalize_label (dw_asm_out_file, sym);
 
-  ASM_OUTPUT_LABEL (asm_out_file, sym);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, sym);
 }
 
 /* Return a new location list, given the begin and end range, and the
@@ -7148,7 +7153,7 @@
 {
   dw_loc_list_ref curr = list_head;
 
-  ASM_OUTPUT_LABEL (asm_out_file, list_head->ll_symbol);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, list_head->ll_symbol);
 
   /* Walk the location list, and output each range + expression.  */
   for (curr = list_head; curr != NULL; curr = curr->dw_loc_next)
@@ -8151,11 +8156,11 @@
       "Initial length escape value indicating 64-bit DWARF extension");
   dw2_asm_output_delta (DWARF_OFFSET_SIZE, l2, l1,
 			"Length of Source Line Info");
-  ASM_OUTPUT_LABEL (asm_out_file, l1);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, l1);
 
   dw2_asm_output_data (2, DWARF_VERSION, "DWARF Version");
   dw2_asm_output_delta (DWARF_OFFSET_SIZE, p2, p1, "Prolog Length");
-  ASM_OUTPUT_LABEL (asm_out_file, p1);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, p1);
 
   /* Define the architecture-dependent minimum instruction length (in
    bytes).  In this implementation of DWARF, this field is used for
@@ -8199,7 +8204,7 @@
 
   /* Write out the information about the files we use.  */
   output_file_names ();
-  ASM_OUTPUT_LABEL (asm_out_file, p2);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, p2);
 
   /* We used to set the address register to the first location in the text
      section here, but that didn't accomplish anything since we already
@@ -8434,7 +8439,7 @@
     }
 
   /* Output the marker for the end of the line number info.  */
-  ASM_OUTPUT_LABEL (asm_out_file, l2);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, l2);
 }
 
 /* Given a pointer to a tree node for some base type, return a pointer to
@@ -13972,7 +13977,7 @@
 		       unsigned int blocknum)
 {
   switch_to_section (current_function_section ());
-  ASM_OUTPUT_DEBUG_LABEL (asm_out_file, BLOCK_BEGIN_LABEL, blocknum);
+  ASM_OUTPUT_DEBUG_LABEL (dw_asm_out_file, BLOCK_BEGIN_LABEL, blocknum);
 }
 
 /* Output a marker (i.e. a label) for the end of the generated code for a
@@ -13982,7 +13987,7 @@
 dwarf2out_end_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int blocknum)
 {
   switch_to_section (current_function_section ());
-  ASM_OUTPUT_DEBUG_LABEL (asm_out_file, BLOCK_END_LABEL, blocknum);
+  ASM_OUTPUT_DEBUG_LABEL (dw_asm_out_file, BLOCK_END_LABEL, blocknum);
 }
 
 /* Returns nonzero if it is appropriate not to emit any debugging
@@ -14078,10 +14083,10 @@
 
       if (DWARF2_ASM_LINE_DEBUG_INFO)
 	{
-	  fprintf (asm_out_file, "\t.file %u ", fd->emitted_number);
-	  output_quoted_string (asm_out_file,
+	  fprintf (dw_asm_out_file, "\t.file %u ", fd->emitted_number);
+	  output_quoted_string (dw_asm_out_file,
 				remap_debug_filename (fd->filename));
-	  fputc ('\n', asm_out_file);
+	  fputc ('\n', dw_asm_out_file);
 	}
     }
 
@@ -14120,7 +14125,7 @@
   else
     {
       ASM_GENERATE_INTERNAL_LABEL (loclabel, "LVL", loclabel_num);
-      ASM_OUTPUT_DEBUG_LABEL (asm_out_file, "LVL", loclabel_num);
+      ASM_OUTPUT_DEBUG_LABEL (dw_asm_out_file, "LVL", loclabel_num);
       loclabel_num++;
       newloc->label = ggc_strdup (loclabel);
     }
@@ -14170,13 +14175,13 @@
 
       /* If requested, emit something human-readable.  */
       if (flag_debug_asm)
-	fprintf (asm_out_file, "\t%s %s:%d\n", ASM_COMMENT_START,
+	fprintf (dw_asm_out_file, "\t%s %s:%d\n", ASM_COMMENT_START,
 		 filename, line);
 
       if (DWARF2_ASM_LINE_DEBUG_INFO)
 	{
 	  /* Emit the .loc directive understood by GNU as.  */
-	  fprintf (asm_out_file, "\t.loc %d %d 0\n", file_num, line);
+	  fprintf (dw_asm_out_file, "\t.loc %d %d 0\n", file_num, line);
 
 	  /* Indicate that line number info exists.  */
 	  line_info_table_in_use++;
@@ -14184,7 +14189,7 @@
       else if (function_section (current_function_decl) != text_section)
 	{
 	  dw_separate_line_info_ref line_info;
-	  targetm.asm_out.internal_label (asm_out_file,
+	  targetm.asm_out.internal_label (dw_asm_out_file,
 					  SEPARATE_LINE_CODE_LABEL,
 					  separate_line_info_table_in_use);
 
@@ -14215,7 +14220,7 @@
 	{
 	  dw_line_info_ref line_info;
 
-	  targetm.asm_out.internal_label (asm_out_file, LINE_CODE_LABEL,
+	  targetm.asm_out.internal_label (dw_asm_out_file, LINE_CODE_LABEL,
 				     line_info_table_in_use);
 
 	  /* Expand the line info table if necessary.  */
@@ -14326,6 +14331,7 @@
   next_die_offset = 0;
   current_function_has_inlines = false;
 #endif
+  dw_asm_out_file = NULL;
   limbo_die_list = NULL;
   line_info_table_in_use = 0;
   have_multiple_function_sections = false;
@@ -14438,32 +14444,46 @@
 			       DEBUG_LINE_SECTION_LABEL, 0);
   ASM_GENERATE_INTERNAL_LABEL (ranges_section_label,
 			       DEBUG_RANGES_SECTION_LABEL, 0);
+
+  if (debug_info_level >= DINFO_LEVEL_VERBOSE)
+    ASM_GENERATE_INTERNAL_LABEL (macinfo_section_label,
+				 DEBUG_MACINFO_SECTION_LABEL, 0);
+
+  if (flag_reorder_blocks_and_partition)
+    cold_text_section = unlikely_text_section ();
+
+  /* Initialize the set of seen decls.  */
+  seen_decls = htab_create_ggc (20, htab_hash_pointer, htab_eq_pointer, NULL);
+}
+
+/* Set the output file and prepare for writing.  */
+static void
+dwarf2out_set_output_file (FILE *out)
+{
+  gcc_assert (!dw_asm_out_file);
+
+  dw_asm_out_file = out;
+
   switch_to_section (debug_abbrev_section);
-  ASM_OUTPUT_LABEL (asm_out_file, abbrev_section_label);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, abbrev_section_label);
   switch_to_section (debug_info_section);
-  ASM_OUTPUT_LABEL (asm_out_file, debug_info_section_label);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, debug_info_section_label);
   switch_to_section (debug_line_section);
-  ASM_OUTPUT_LABEL (asm_out_file, debug_line_section_label);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, debug_line_section_label);
 
   if (debug_info_level >= DINFO_LEVEL_VERBOSE)
     {
       switch_to_section (debug_macinfo_section);
-      ASM_GENERATE_INTERNAL_LABEL (macinfo_section_label,
-				   DEBUG_MACINFO_SECTION_LABEL, 0);
-      ASM_OUTPUT_LABEL (asm_out_file, macinfo_section_label);
+      ASM_OUTPUT_LABEL (dw_asm_out_file, macinfo_section_label);
     }
 
   switch_to_section (text_section);
-  ASM_OUTPUT_LABEL (asm_out_file, text_section_label);
+  ASM_OUTPUT_LABEL (dw_asm_out_file, text_section_label);
   if (flag_reorder_blocks_and_partition)
     {
-      cold_text_section = unlikely_text_section ();
       switch_to_section (cold_text_section);
-      ASM_OUTPUT_LABEL (asm_out_file, cold_text_section_label);
+      ASM_OUTPUT_LABEL (dw_asm_out_file, cold_text_section_label);
     }
-
-  /* Initialize the set of seen decls.  */
-  seen_decls = htab_create_ggc (20, htab_hash_pointer, htab_eq_pointer, NULL);
 }
 
 /* Mark DECL as having been written.   */
@@ -14492,7 +14512,7 @@
   if (node->form == DW_FORM_strp)
     {
       switch_to_section (debug_str_section);
-      ASM_OUTPUT_LABEL (asm_out_file, node->label);
+      ASM_OUTPUT_LABEL (dw_asm_out_file, node->label);
       assemble_string (node->str, strlen (node->str) + 1);
     }
 
@@ -14867,11 +14887,11 @@
 
   /* Output a terminator label for the .text section.  */
   switch_to_section (text_section);
-  targetm.asm_out.internal_label (asm_out_file, TEXT_END_LABEL, 0);
+  targetm.asm_out.internal_label (dw_asm_out_file, TEXT_END_LABEL, 0);
   if (flag_reorder_blocks_and_partition)
     {
       switch_to_section (unlikely_text_section ());
-      targetm.asm_out.internal_label (asm_out_file, COLD_END_LABEL, 0);
+      targetm.asm_out.internal_label (dw_asm_out_file, COLD_END_LABEL, 0);
     }
 
   /* We can only use the low/high_pc attributes if all of the code was
@@ -14927,7 +14947,7 @@
       switch_to_section (debug_loc_section);
       ASM_GENERATE_INTERNAL_LABEL (loc_section_label,
 				   DEBUG_LOC_SECTION_LABEL, 0);
-      ASM_OUTPUT_LABEL (asm_out_file, loc_section_label);
+      ASM_OUTPUT_LABEL (dw_asm_out_file, loc_section_label);
       output_location_lists (die);
     }
 
@@ -14977,7 +14997,7 @@
   if (ranges_table_in_use)
     {
       switch_to_section (debug_ranges_section);
-      ASM_OUTPUT_LABEL (asm_out_file, ranges_section_label);
+      ASM_OUTPUT_LABEL (dw_asm_out_file, ranges_section_label);
       output_ranges ();
     }
 
Index: varasm.c
===================================================================
--- varasm.c	(revision 127650)
+++ varasm.c	(working copy)
@@ -2249,12 +2249,6 @@
 void
 assemble_external (tree decl ATTRIBUTE_UNUSED)
 {
-  /* Because most platforms do not define ASM_OUTPUT_EXTERNAL, the
-     main body of this code is only rarely exercised.  To provide some
-     testing, on all platforms, we make sure that the ASM_OUT_FILE is
-     open.  If it's not, we should not be calling this function.  */
-  gcc_assert (asm_out_file);
-
 #ifdef ASM_OUTPUT_EXTERNAL
   if (!DECL_P (decl) || !DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl))
     return;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]