diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-09-19 16:50:43 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-09-19 16:50:43 +0000 |
commit | 89e706a453d9e060b03e2a050d531a47a507bea4 (patch) | |
tree | b85b84891d74fec154c818cde6cdb39f33610fcf /gcc/genrecog.c | |
parent | 8fe0deab2857b70ea284aa9114ec0788aef46b05 (diff) | |
download | gcc-89e706a453d9e060b03e2a050d531a47a507bea4.tar.gz |
(preds): Correct typo in name of `comparison_operator'.
(add_to_sequence): If PREDICATE_CODES specified, warn if we find a predicate
not in that list.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5364 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genrecog.c')
-rw-r--r-- | gcc/genrecog.c | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 2480ea91a4e..19c0f0d4dcd 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -1,5 +1,5 @@ /* Generate code from machine description to recognize rtl as insns. - Copyright (C) 1987, 1988, 1992 Free Software Foundation, Inc. + Copyright (C) 1987, 1988, 1992, 1993 Free Software Foundation, Inc. This file is part of GNU CC. @@ -158,7 +158,7 @@ static struct pred_table {"push_operand", {MEM}}, {"memory_operand", {SUBREG, MEM}}, {"indirect_operand", {SUBREG, MEM}}, - {"comparison_operation", {EQ, NE, LE, LT, GE, LT, LEU, LTU, GEU, GTU}}, + {"comparison_operator", {EQ, NE, LE, LT, GE, LT, LEU, LTU, GEU, GTU}}, {"mode_independent_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, LABEL_REF, SUBREG, REG, MEM}}}; @@ -378,30 +378,40 @@ add_to_sequence (pattern, last, position) considerably simplify the generated code. */ if (new->tests) - for (i = 0; i < NUM_KNOWN_PREDS; i++) - if (! strcmp (preds[i].name, new->tests)) - { - int j; - int allows_const_int = 0; + { + for (i = 0; i < NUM_KNOWN_PREDS; i++) + if (! strcmp (preds[i].name, new->tests)) + { + int j; + int allows_const_int = 0; - new->pred = i; + new->pred = i; - if (preds[i].codes[1] == 0 && new->code == UNKNOWN) - { - new->code = preds[i].codes[0]; - if (! strcmp ("const_int_operand", new->tests)) - new->tests = 0, new->pred = -1; - } + if (preds[i].codes[1] == 0 && new->code == UNKNOWN) + { + new->code = preds[i].codes[0]; + if (! strcmp ("const_int_operand", new->tests)) + new->tests = 0, new->pred = -1; + } - for (j = 0; j < NUM_RTX_CODE && preds[i].codes[j] != 0; j++) - if (preds[i].codes[j] == CONST_INT) - allows_const_int = 1; + for (j = 0; j < NUM_RTX_CODE && preds[i].codes[j] != 0; j++) + if (preds[i].codes[j] == CONST_INT) + allows_const_int = 1; - if (! allows_const_int) - new->enforce_mode = new->ignore_mode= 1; + if (! allows_const_int) + new->enforce_mode = new->ignore_mode= 1; - break; - } + break; + } + +#ifdef PREDICATE_CODES + /* If the port has a list of the predicates it uses but omits + one, warn. */ + if (i == NUM_KNOWN_PREDS) + fprintf (stderr, "Warning: `%s' not in PREDICATE_CODES\n", + new->tests); +#endif + } if (code == MATCH_OPERATOR || code == MATCH_PARALLEL) { |