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
This commit is contained in:
Geoffrey Keating 2004-09-10 19:03:13 +00:00 committed by Geoffrey Keating
parent c383c15f29
commit 375d2edc9f
7 changed files with 28 additions and 17 deletions

View File

@ -1,5 +1,13 @@
2004-09-10 Geoffrey Keating <geoffk@apple.com>
* 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.

View File

@ -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 \
{ \

View File

@ -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);

View File

@ -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;

View File

@ -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");

View File

@ -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. */

View File

@ -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 *);