Commit 57d4f65c by Zack Weinberg

dwarf2out.c (loclabel_num): Move outside #ifdef DWARF2_DEBUGGING_INFO and mark with GTY(()).

	* dwarf2out.c (loclabel_num): Move outside #ifdef
	DWARF2_DEBUGGING_INFO and mark with GTY(()).
	* config/ia64/ia64.c (struct extern_func_list,extern_func_head):
	Mark with GTY(()).
	(ia64_hpux_add_extern_decl): Save the decl, not the name string.
	Allocate memory with ggc_alloc.  No need to copy anything.
	(ia64_hpux_file_end): Update to match.

From-SVN: r78061
parent 3fec9fa9
2004-02-18 Zack Weinberg <zack@codesourcery.com>
* dwarf2out.c (loclabel_num): Move outside #ifdef
DWARF2_DEBUGGING_INFO and mark with GTY(()).
* config/ia64/ia64.c (struct extern_func_list,extern_func_head):
Mark with GTY(()).
(ia64_hpux_add_extern_decl): Save the decl, not the name string.
Allocate memory with ggc_alloc. No need to copy anything.
(ia64_hpux_file_end): Update to match.
2004-02-18 Jakub Jelinek <jakub@redhat.com> 2004-02-18 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.c (override_options): Don't imply 3DNow! for -m64 * config/i386/i386.c (override_options): Don't imply 3DNow! for -m64
......
...@@ -257,7 +257,7 @@ static void ia64_rwreloc_select_rtx_section (enum machine_mode, rtx, ...@@ -257,7 +257,7 @@ static void ia64_rwreloc_select_rtx_section (enum machine_mode, rtx,
static unsigned int ia64_rwreloc_section_type_flags (tree, const char *, int) static unsigned int ia64_rwreloc_section_type_flags (tree, const char *, int)
ATTRIBUTE_UNUSED; ATTRIBUTE_UNUSED;
static void ia64_hpux_add_extern_decl (const char *name) static void ia64_hpux_add_extern_decl (tree decl)
ATTRIBUTE_UNUSED; ATTRIBUTE_UNUSED;
static void ia64_hpux_file_end (void) static void ia64_hpux_file_end (void)
ATTRIBUTE_UNUSED; ATTRIBUTE_UNUSED;
...@@ -4627,7 +4627,7 @@ ia64_asm_output_external (FILE *file, tree decl, const char *name) ...@@ -4627,7 +4627,7 @@ ia64_asm_output_external (FILE *file, tree decl, const char *name)
return; return;
if (TARGET_HPUX_LD) if (TARGET_HPUX_LD)
ia64_hpux_add_extern_decl (name); ia64_hpux_add_extern_decl (decl);
else else
{ {
/* assemble_name will set TREE_SYMBOL_REFERENCED, so we must save and /* assemble_name will set TREE_SYMBOL_REFERENCED, so we must save and
...@@ -8653,20 +8653,20 @@ ia64_hpux_function_arg_padding (enum machine_mode mode, tree type) ...@@ -8653,20 +8653,20 @@ ia64_hpux_function_arg_padding (enum machine_mode mode, tree type)
We output the name if and only if TREE_SYMBOL_REFERENCED is set in We output the name if and only if TREE_SYMBOL_REFERENCED is set in
order to avoid putting out names that are never really used. */ order to avoid putting out names that are never really used. */
struct extern_func_list struct extern_func_list GTY(())
{ {
struct extern_func_list *next; /* next external */ struct extern_func_list *next;
char *name; /* name of the external */ tree decl;
} *extern_func_head = 0; };
static GTY(()) struct extern_func_list *extern_func_head;
static void static void
ia64_hpux_add_extern_decl (const char *name) ia64_hpux_add_extern_decl (tree decl)
{ {
struct extern_func_list *p; struct extern_func_list *p = ggc_alloc (sizeof (struct extern_func_list));
p = (struct extern_func_list *) xmalloc (sizeof (struct extern_func_list)); p->decl = decl;
p->name = xmalloc (strlen (name) + 1);
strcpy(p->name, name);
p->next = extern_func_head; p->next = extern_func_head;
extern_func_head = p; extern_func_head = p;
} }
...@@ -8676,29 +8676,29 @@ ia64_hpux_add_extern_decl (const char *name) ...@@ -8676,29 +8676,29 @@ ia64_hpux_add_extern_decl (const char *name)
static void static void
ia64_hpux_file_end (void) ia64_hpux_file_end (void)
{ {
while (extern_func_head) struct extern_func_list *p;
for (p = extern_func_head; p; p = p->next)
{ {
const char *real_name; tree decl = p->decl;
tree decl; tree id = DECL_NAME (decl);
real_name = (* targetm.strip_name_encoding) (extern_func_head->name); if (!id)
decl = maybe_get_identifier (real_name); abort ();
if (!decl if (!TREE_ASM_WRITTEN (decl) && TREE_SYMBOL_REFERENCED (id))
|| (! TREE_ASM_WRITTEN (decl) && TREE_SYMBOL_REFERENCED (decl)))
{ {
if (decl) const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
TREE_ASM_WRITTEN (decl) = 1; TREE_ASM_WRITTEN (decl) = 1;
(*targetm.asm_out.globalize_label) (asm_out_file, (*targetm.asm_out.globalize_label) (asm_out_file, name);
extern_func_head->name);
fputs (TYPE_ASM_OP, asm_out_file); fputs (TYPE_ASM_OP, asm_out_file);
assemble_name (asm_out_file, extern_func_head->name); assemble_name (asm_out_file, name);
putc (',', asm_out_file); fprintf (asm_out_file, "," TYPE_OPERAND_FMT "\n", "function");
fprintf (asm_out_file, TYPE_OPERAND_FMT, "function");
putc ('\n', asm_out_file);
} }
extern_func_head = extern_func_head->next;
} }
extern_func_head = 0;
} }
/* Rename all the TFmode libfuncs using the HPUX conventions. */ /* Rename all the TFmode libfuncs using the HPUX conventions. */
......
...@@ -3592,12 +3592,12 @@ static GTY(()) unsigned ranges_table_in_use; ...@@ -3592,12 +3592,12 @@ static GTY(()) unsigned ranges_table_in_use;
/* Whether we have location lists that need outputting */ /* Whether we have location lists that need outputting */
static GTY(()) unsigned have_location_lists; static GTY(()) unsigned have_location_lists;
/* Unique label counter. */
static GTY(()) unsigned int loclabel_num;
#ifdef DWARF2_DEBUGGING_INFO #ifdef DWARF2_DEBUGGING_INFO
/* Record whether the function being analyzed contains inlined functions. */ /* Record whether the function being analyzed contains inlined functions. */
static int current_function_has_inlines; static int current_function_has_inlines;
/* Unique label counter. */
static unsigned int loclabel_num = 0;
#endif #endif
#if 0 && defined (MIPS_DEBUGGING_INFO) #if 0 && defined (MIPS_DEBUGGING_INFO)
static int comp_unit_has_inlines; static int comp_unit_has_inlines;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment