aboutsummaryrefslogtreecommitdiff
path: root/gcc/genoutput.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2000-11-28 13:31:47 -0800
committerRichard Henderson <rth@gcc.gnu.org>2000-11-28 13:31:47 -0800
commitc77e04ae3ae833109b0aab9ff62f1882879abefd (patch)
tree8c0dafd2db80242046249de676749f4a85109006 /gcc/genoutput.c
parent79bc466955ec6dcbb4ba0be4c5f8b8924801275d (diff)
downloadgcc-c77e04ae3ae833109b0aab9ff62f1882879abefd.zip
gcc-c77e04ae3ae833109b0aab9ff62f1882879abefd.tar.gz
gcc-c77e04ae3ae833109b0aab9ff62f1882879abefd.tar.bz2
genoutput.c (validate_insn_operands): New.
* 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. From-SVN: r37828
Diffstat (limited to 'gcc/genoutput.c')
-rw-r--r--gcc/genoutput.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/genoutput.c b/gcc/genoutput.c
index 57a9028..a5674c9 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));