diff options
author | Richard Henderson <rth@cygnus.com> | 1999-10-14 18:52:29 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-10-14 18:52:29 -0700 |
commit | 556ffcc55247d9c77e0cca31a764dc56741da789 (patch) | |
tree | a2c9bf0ce2a7fd8466de760ea4c4fdc8aa203a22 /gcc/genrecog.c | |
parent | 104140890ae1b03e68e58122aeb64177ac37f544 (diff) | |
download | gcc-556ffcc55247d9c77e0cca31a764dc56741da789.zip gcc-556ffcc55247d9c77e0cca31a764dc56741da789.tar.gz gcc-556ffcc55247d9c77e0cca31a764dc56741da789.tar.bz2 |
recog.c (pmode_register_operand): New.
* recog.c (pmode_register_operand): New.
* recog.h: Declare it.
* genrecog.c (pred_codes): Likewise.
(special_mode_pred_table): Likewise.
(validate_pattern): Don't warn no mode for address_operand.
* print-rtl.c (print_rtx) [LABEL_REF]: Only do full subexpression
if the operand is not insn-like.
From-SVN: r29995
Diffstat (limited to 'gcc/genrecog.c')
-rw-r--r-- | gcc/genrecog.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 6e1af3a..d12d7c6 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -197,6 +197,7 @@ static struct pred_table {"address_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, LABEL_REF, SUBREG, REG, MEM, PLUS, MINUS, MULT}}, {"register_operand", {SUBREG, REG}}, + {"pmode_register_operand", {SUBREG, REG}}, {"scratch_operand", {SCRATCH, REG}}, {"immediate_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, LABEL_REF}}, @@ -220,11 +221,11 @@ static const char * special_mode_pred_table[] = { #ifdef SPECIAL_MODE_PREDICATES SPECIAL_MODE_PREDICATES #endif - NULL + "pmode_register_operand" }; #define NUM_SPECIAL_MODE_PREDS \ - (sizeof (special_mode_pred_table) / sizeof (const char *) - 1) + (sizeof (special_mode_pred_table) / sizeof (special_mode_pred_table[0])) static struct decision *new_decision PROTO((const char *, struct decision_head *)); @@ -516,15 +517,18 @@ validate_pattern (pattern, insn, set_dest) /* A modeless MATCH_OPERAND can be handy when we can check for multiple modes in the c_test. In most other cases, it is a mistake. Only DEFINE_INSN is eligible, since SPLIT - and PEEP2 can FAIL within the output pattern. */ + and PEEP2 can FAIL within the output pattern. Exclude + address_operand, since its mode is related to the mode of + the memory not the operand. */ if (GET_MODE (pattern) == VOIDmode && code == MATCH_OPERAND - && pred_name[0] != '\0' + && GET_CODE (insn) == DEFINE_INSN && allows_non_const && ! special_mode_pred - && strstr (c_test, "operands") == NULL - && GET_CODE (insn) == DEFINE_INSN) + && pred_name[0] != '\0' + && strcmp (pred_name, "address_operand") != 0 + && strstr (c_test, "operands") == NULL) { message_with_line (pattern_lineno, "warning: operand %d missing mode?", |