diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-28 21:31:47 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-28 21:31:47 +0000 |
commit | dd193d7c5e89b30310ed9f150baf494d4b164317 (patch) | |
tree | 8c0dafd2db80242046249de676749f4a85109006 /gcc/genoutput.c | |
parent | 59de4d8b7dd03038338d76d0999d320bca5f1c1e (diff) | |
download | gcc-dd193d7c5e89b30310ed9f150baf494d4b164317.tar.gz |
* genoutput.c (validate_insn_operands): New.
(gen_insn): Call it.
* config/alpha/alpha.md (divmodsi_internal): Renumber operands.
(divmoddi_internal): Likewise.
* config/arm/arm.md (andsi3_compare0_scratch): Likewise.
* config/i960/i960.md (branch patterns): Likewise.
* config/ia64/ia64.md (tbit_and_0): Likewise.
(tbit_and_1, tbit_or_0, tbit_or_1): Likewise.
* config/m68k/m68k.md (zero_extract memory patterns): Likewise.
* config/mips/mips.md (divmodsi4_internal): Likewise.
(divmoddi4_internal): Likewise.
* config/rs6000/rs6000.md (call patterns): Likewise.
* config/sh/sh.md (movsi_y): Likewise.
* config/sparc/sparc.md: Comment out if 0 v8p shift pattern.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37828 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genoutput.c')
-rw-r--r-- | gcc/genoutput.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/genoutput.c b/gcc/genoutput.c index 57a9028aee8..a5674c95279 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -182,6 +182,7 @@ static int compare_operands PARAMS ((struct operand_data *, static void place_operands PARAMS ((struct data *)); static void process_template PARAMS ((struct data *, const char *)); static void validate_insn_alternatives PARAMS ((struct data *)); +static void validate_insn_operands PARAMS ((struct data *)); static void gen_insn PARAMS ((rtx, int)); static void gen_peephole PARAMS ((rtx, int)); static void gen_expand PARAMS ((rtx, int)); @@ -737,6 +738,22 @@ validate_insn_alternatives (d) /* Record the insn's overall number of alternatives. */ d->n_alternatives = n; } + +/* Verify that there are no gaps in operand numbers for INSNs. */ + +static void +validate_insn_operands (d) + struct data *d; +{ + int i; + + for (i = 0; i < d->n_operands; ++i) + if (d->operand[i].seen == 0) + { + message_with_line (d->lineno, "missing operand %d", i); + have_error = 1; + } +} /* Look at a define_insn just read. Assign its code number. Record on idata the template and the number of arguments. If the insn has @@ -774,6 +791,7 @@ gen_insn (insn, lineno) d->n_operands = max_opno + 1; d->n_dups = num_dups; + validate_insn_operands (d); validate_insn_alternatives (d); place_operands (d); process_template (d, XSTR (insn, 3)); |