summaryrefslogtreecommitdiff
path: root/gcc/genoutput.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-13 16:43:04 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-13 16:43:04 +0000
commitc192dab3e1740d02c9fba4bfc6b90589a26d6ed5 (patch)
treebb94b947de49dc4151bc99a73621177f77fa655e /gcc/genoutput.c
parent33f88b1c70435e9803c2dbeffc56522f23484f57 (diff)
downloadgcc-c192dab3e1740d02c9fba4bfc6b90589a26d6ed5.tar.gz
* genattrtab.c (insn_ent): Replace insn_code, insn_index and lineno
fields with a pointer to the instruction definition. (get_attr_value, fill_attr, make_length_attrs, remove_insn_ent) (insert_insn_ent, simplify_test_exp, optimize_attrs, write_attr_get) (write_attr_case, write_const_num_delay_slots): Update accordingly. (write_attr_case, write_const_num_delay_slots): Write the name of an insn next to its case statement. * genoutput.c (data): Add a filename field. (gen_insn, gen_peephole, gen_expand, gen_split): Set it. (output_insn_data): Print the location of each insn definition. * genrecog.c (write_action): Print the name of an insn above the statement that returns its code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85947 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genoutput.c')
-rw-r--r--gcc/genoutput.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/genoutput.c b/gcc/genoutput.c
index 112017d8cbd..e21fc7fd86d 100644
--- a/gcc/genoutput.c
+++ b/gcc/genoutput.c
@@ -160,6 +160,7 @@ struct data
const char *template;
int code_number;
int index_number;
+ const char *filename;
int lineno;
int n_operands; /* Number of operands this insn recognizes */
int n_dups; /* Number times match_dup appears in pattern */
@@ -291,6 +292,7 @@ output_insn_data (void)
for (d = idata; d; d = d->next)
{
+ printf (" /* %s:%d */\n", d->filename, d->lineno);
printf (" {\n");
if (d->name)
@@ -823,6 +825,7 @@ gen_insn (rtx insn, int lineno)
d->code_number = next_code_number;
d->index_number = next_index_number;
+ d->filename = read_rtx_filename;
d->lineno = lineno;
if (XSTR (insn, 0)[0])
d->name = XSTR (insn, 0);
@@ -864,6 +867,7 @@ gen_peephole (rtx peep, int lineno)
d->code_number = next_code_number;
d->index_number = next_index_number;
+ d->filename = read_rtx_filename;
d->lineno = lineno;
d->name = 0;
@@ -902,6 +906,7 @@ gen_expand (rtx insn, int lineno)
d->code_number = next_code_number;
d->index_number = next_index_number;
+ d->filename = read_rtx_filename;
d->lineno = lineno;
if (XSTR (insn, 0)[0])
d->name = XSTR (insn, 0);
@@ -945,6 +950,7 @@ gen_split (rtx split, int lineno)
d->code_number = next_code_number;
d->index_number = next_index_number;
+ d->filename = read_rtx_filename;
d->lineno = lineno;
d->name = 0;