From: Geoffrey Keating Date: Fri, 10 Sep 2004 19:03:13 +0000 (+0000) Subject: dbxout.c (dbxout_block): Update for current_function_func_begin_label a string. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=375d2edc9f376bd6bb0e102075744664edb0c6c3;p=gcc.git dbxout.c (dbxout_block): Update for current_function_func_begin_label a string. * dbxout.c (dbxout_block): Update for current_function_func_begin_label a string. * dwarf2out.c (dwarf2out_begin_prologue): Likewise. * except.c (dw2_output_call_site_table): Likewise. * toplev.c (current_function_func_begin_label): Likewise. * tree.h (current_function_func_begin_label): Likewise. * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Likewise. From-SVN: r87317 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 172adf37d86..ca41511f1c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2004-09-10 Geoffrey Keating + * dbxout.c (dbxout_block): Update for + current_function_func_begin_label a string. + * dwarf2out.c (dwarf2out_begin_prologue): Likewise. + * except.c (dw2_output_call_site_table): Likewise. + * toplev.c (current_function_func_begin_label): Likewise. + * tree.h (current_function_func_begin_label): Likewise. + * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Likewise. + * final.c (output_asm_insn): Use strtoul instead of atoi, save a loop. diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index 410f31ee49b..bdd0b98babf 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -499,10 +499,9 @@ while (0) fprintf (FILE, "%s%d,0,0,", ASM_STABN_OP, BRAC); \ assemble_name (FILE, NAME); \ putc ('-', FILE); \ - if (current_function_func_begin_label != NULL_TREE) \ + if (current_function_func_begin_label != NULL) \ { \ - s = IDENTIFIER_POINTER (current_function_func_begin_label); \ - assemble_name (FILE, s); \ + assemble_name (FILE, current_function_func_begin_label); \ } \ else \ { \ diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 110ed6b3543..9527c1de26d 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -3174,8 +3174,8 @@ static void dbxout_block (tree block, int depth, tree args) { const char *begin_label; - if (current_function_func_begin_label != NULL_TREE) - begin_label = IDENTIFIER_POINTER (current_function_func_begin_label); + if (current_function_func_begin_label != NULL) + begin_label = current_function_func_begin_label; else begin_label = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 8b60c26c17a..25f4b2523da 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -2334,9 +2334,10 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED, const char *file ATTRIBUTE_UNUSED) { char label[MAX_ARTIFICIAL_LABEL_BYTES]; + char * dup_label; dw_fde_ref fde; - current_function_func_begin_label = 0; + current_function_func_begin_label = NULL; #ifdef TARGET_UNWIND_INFO /* ??? current_function_func_begin_label is also used by except.c @@ -2355,7 +2356,8 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED, current_function_funcdef_no); ASM_OUTPUT_DEBUG_LABEL (asm_out_file, FUNC_BEGIN_LABEL, current_function_funcdef_no); - current_function_func_begin_label = get_identifier (label); + dup_label = xstrdup (label); + current_function_func_begin_label = dup_label; #ifdef TARGET_UNWIND_INFO /* We can elide the fde allocation if we're not emitting debug info. */ @@ -2379,7 +2381,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED, /* Add the new FDE at the end of the fde_table. */ fde = &fde_table[fde_table_in_use++]; fde->decl = current_function_decl; - fde->dw_fde_begin = xstrdup (label); + fde->dw_fde_begin = dup_label; fde->dw_fde_current_label = NULL; fde->dw_fde_end = NULL; fde->dw_fde_cfi = NULL; diff --git a/gcc/except.c b/gcc/except.c index b09ff8338a7..9e3c06df18a 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -3476,8 +3476,6 @@ sjlj_size_of_call_site_table (void) static void dw2_output_call_site_table (void) { - const char *const function_start_lab - = IDENTIFIER_POINTER (current_function_func_begin_label); int n = cfun->eh->call_site_data_used; int i; @@ -3500,21 +3498,25 @@ dw2_output_call_site_table (void) /* ??? Perhaps use attr_length to choose data1 or data2 instead of data4 if the function is small enough. */ #ifdef HAVE_AS_LEB128 - dw2_asm_output_delta_uleb128 (reg_start_lab, function_start_lab, + dw2_asm_output_delta_uleb128 (reg_start_lab, + current_function_func_begin_label, "region %d start", i); dw2_asm_output_delta_uleb128 (reg_end_lab, reg_start_lab, "length"); if (cs->landing_pad) - dw2_asm_output_delta_uleb128 (landing_pad_lab, function_start_lab, + dw2_asm_output_delta_uleb128 (landing_pad_lab, + current_function_func_begin_label, "landing pad"); else dw2_asm_output_data_uleb128 (0, "landing pad"); #else - dw2_asm_output_delta (4, reg_start_lab, function_start_lab, + dw2_asm_output_delta (4, reg_start_lab, + current_function_func_begin_label, "region %d start", i); dw2_asm_output_delta (4, reg_end_lab, reg_start_lab, "length"); if (cs->landing_pad) - dw2_asm_output_delta (4, landing_pad_lab, function_start_lab, + dw2_asm_output_delta (4, landing_pad_lab, + current_function_func_begin_label, "landing pad"); else dw2_asm_output_data (4, 0, "landing pad"); diff --git a/gcc/toplev.c b/gcc/toplev.c index 79094e2e039..bf7ae20b0d9 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -220,9 +220,9 @@ int optimize_size = 0; or 0 if between functions. */ tree current_function_decl; -/* Set to the FUNC_BEGIN label of the current function, or NULL_TREE +/* Set to the FUNC_BEGIN label of the current function, or NULL if none. */ -tree current_function_func_begin_label; +const char * current_function_func_begin_label; /* Temporarily suppress certain warnings. This is set while reading code from a system header file. */ diff --git a/gcc/tree.h b/gcc/tree.h index 20adc7ffd4e..461b8676978 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3350,7 +3350,7 @@ extern int pedantic_lvalues; extern GTY(()) tree current_function_decl; /* Nonzero means a FUNC_BEGIN label was emitted. */ -extern GTY(()) tree current_function_func_begin_label; +extern GTY(()) const char * current_function_func_begin_label; /* In tree.c */ extern unsigned crc32_string (unsigned, const char *);