mips.c (inside_function): Delete.

* config/mips/mips.c (inside_function): Delete.
	(file_in_function_warning, ignore_line_number): Delete.
	(mips_output_filename): Don't warn about changing filenames within
	a function.
	(mips_output_lineno): Update accordingly.
	(mips_output_function_prologue): Don't reset the deleted variables.
	* config/mips/mips.h (inside_function): Delete.
	(file_in_function_warning, ignore_line_number): Delete.

From-SVN: r69348
This commit is contained in:
Richard Sandiford 2003-07-14 20:15:47 +00:00 committed by Richard Sandiford
parent f088510d96
commit d82783b609
3 changed files with 16 additions and 49 deletions

View File

@ -1,5 +1,14 @@
2003-07-14 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.c (inside_function): Delete.
(file_in_function_warning, ignore_line_number): Delete.
(mips_output_filename): Don't warn about changing filenames within
a function.
(mips_output_lineno): Update accordingly.
(mips_output_function_prologue): Don't reset the deleted variables.
* config/mips/mips.h (inside_function): Delete.
(file_in_function_warning, ignore_line_number): Delete.
* config/mips/elf.h (OBJECT_FORMAT_COFF, EXTENDED_COFF): Remove undefs.
* config/mips/elf64.h: Likewise.
* config/mips/openbsd.h: Likewise.

View File

@ -465,10 +465,6 @@ int sdb_label_count = 0;
/* Next label # for each statement for Silicon Graphics IRIS systems. */
int sym_lineno = 0;
/* Nonzero if inside of a function, because the stupid MIPS asm can't
handle .files inside of functions. */
int inside_function = 0;
/* Linked list of all externals that are to be emitted when optimizing
for the global pointer if they haven't been declared by the end of
the program with an appropriate .comm or initialization. */
@ -485,14 +481,6 @@ static GTY (()) struct extern_list *extern_head = 0;
/* Name of the file containing the current function. */
const char *current_function_file = "";
/* Warning given that Mips ECOFF can't support changing files
within a function. */
int file_in_function_warning = FALSE;
/* Whether to suppress issuing .loc's because the user attempted
to change the filename within a function. */
int ignore_line_number = FALSE;
/* Number of nested .set noreorder, noat, nomacro, and volatile requests. */
int set_noreorder;
int set_noat;
@ -5972,8 +5960,7 @@ mips_output_external_libcall (file, name)
}
#endif
/* Emit a new filename to a stream. If this is MIPS ECOFF, watch out
for .file's that start within a function. If we are smuggling stabs, try to
/* Emit a new filename to a stream. If we are smuggling stabs, try to
put out a MIPS ECOFF file and a stab. */
void
@ -6007,23 +5994,11 @@ mips_output_filename (stream, name)
}
else if (name != current_function_file
&& strcmp (name, current_function_file) != 0)
&& strcmp (name, current_function_file) != 0)
{
if (inside_function && !TARGET_GAS)
{
if (!file_in_function_warning)
{
file_in_function_warning = 1;
ignore_line_number = 1;
warning ("MIPS ECOFF format does not allow changing filenames within functions with #line");
}
}
else
{
SET_FILE_NUMBER ();
current_function_file = name;
ASM_OUTPUT_FILENAME (stream, num_source_filenames, name);
}
SET_FILE_NUMBER ();
current_function_file = name;
ASM_OUTPUT_FILENAME (stream, num_source_filenames, name);
}
}
@ -6046,10 +6021,7 @@ mips_output_lineno (stream, line)
}
else
{
fprintf (stream, "\n\t%s.loc\t%d %d\n",
(ignore_line_number) ? "#" : "",
num_source_filenames, line);
fprintf (stream, "\n\t.loc\t%d %d\n", num_source_filenames, line);
LABEL_AFTER_LOC (stream);
}
}
@ -6935,8 +6907,6 @@ mips_output_function_prologue (file, size)
&& current_function_args_info.fp_code != 0)
build_mips16_function_stub (file);
inside_function = 1;
#ifndef FUNCTION_NAME_ALREADY_DECLARED
/* Get the function name the same way that toplev.c does before calling
assemble_start_function. This is needed so that the name used here
@ -7542,10 +7512,6 @@ mips_output_function_epilogue (file, size)
}
#endif
/* Reset state info for each function. */
inside_function = 0;
ignore_line_number = 0;
while (string_constants != NULL)
{
struct string_constant *next;

View File

@ -114,9 +114,6 @@ extern char mips_reg_names[][8]; /* register names (a0 vs. $4). */
extern char mips_print_operand_punct[256]; /* print_operand punctuation chars */
extern const char *current_function_file; /* filename current function is in */
extern int num_source_filenames; /* current .file # */
extern int inside_function; /* != 0 if inside of a function */
extern int ignore_line_number; /* != 0 if we are to ignore next .loc */
extern int file_in_function_warning; /* warning given about .file in func */
extern int mips_section_threshold; /* # bytes of data/sdata cutoff */
extern int sym_lineno; /* sgi next label # for each stmt */
extern int set_noreorder; /* # of nested .set noreorder's */
@ -3570,12 +3567,7 @@ do \
while (0)
/* How to tell the debugger about changes of source files. Note, the
mips ECOFF format cannot deal with changes of files inside of
functions, which means the output of parser generators like bison
is generally not debuggable without using the -l switch. Lose,
lose, lose. Silicon graphics seems to want all .file's hardwired
to 1. */
/* How to tell the debugger about changes of source files. */
#ifndef SET_FILE_NUMBER
#define SET_FILE_NUMBER() ++num_source_filenames