diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-12 21:22:20 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-12 21:22:20 +0000 |
commit | 429b0b3fc31249134632d66f2d553c3066675eb6 (patch) | |
tree | 10c82eb5d9145ce0ef5ca69ca57f847a95fa9f2c /gcc/genattrtab.c | |
parent | 68b930c4a2e7d7aa8141e726cccde16f9e281f07 (diff) | |
download | gcc-429b0b3fc31249134632d66f2d553c3066675eb6.tar.gz |
PR other/31778
* genattrtab.c (filename): Add.
(convert_set_attr_alternative): Improve error message.
(check_defs): Restore read_md_filename for error messages.
(gen_insn): Save filename.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210340 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r-- | gcc/genattrtab.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 99b1b83f4cb..0f14b4deda7 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -139,6 +139,7 @@ struct insn_def rtx def; /* The DEFINE_... */ int insn_code; /* Instruction number. */ int insn_index; /* Expression number in file, for errors. */ + const char *filename; /* Filename. */ int lineno; /* Line number. */ int num_alternatives; /* Number of alternatives. */ int vec_idx; /* Index of attribute vector in `def'. */ @@ -1066,7 +1067,8 @@ convert_set_attr_alternative (rtx exp, struct insn_def *id) if (XVECLEN (exp, 1) != num_alt) { error_with_line (id->lineno, - "bad number of entries in SET_ATTR_ALTERNATIVE"); + "bad number of entries in SET_ATTR_ALTERNATIVE, was %d expected %d", + XVECLEN (exp, 1), num_alt); return NULL_RTX; } @@ -1137,6 +1139,7 @@ check_defs (void) if (XVEC (id->def, id->vec_idx) == NULL) continue; + read_md_filename = id->filename; for (i = 0; i < XVECLEN (id->def, id->vec_idx); i++) { value = XVECEXP (id->def, id->vec_idx, i); @@ -3280,6 +3283,7 @@ gen_insn (rtx exp, int lineno) id->next = defs; defs = id; id->def = exp; + id->filename = read_md_filename; id->lineno = lineno; switch (GET_CODE (exp)) |