+Thu Oct 14 18:48:54 1999 Richard Henderson <rth@cygnus.com>
+
+ * 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.
+
Thu Oct 14 19:38:42 1999 Jeffrey A Law (law@cygnus.com)
Sylvian Pion <Sylvain.Pion@sophia.inria.fr>
{"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}},
#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 *));
/* 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?",
case 'u':
if (XEXP (in_rtx, i) != NULL)
{
- if (GET_CODE (XEXP (in_rtx, i)) != CODE_LABEL)
+ rtx sub = XEXP (in_rtx, i);
+ enum rtx_code subc = GET_CODE (sub);
+
+ if (subc != CODE_LABEL
+ && subc != NOTE
+ && GET_RTX_CLASS (subc) != 'i')
goto do_e;
if (flag_dump_unnumbered)
fputc ('#', outfile);
else
- fprintf (outfile, " %d", INSN_UID (XEXP (in_rtx, i)));
+ fprintf (outfile, " %d", INSN_UID (sub));
}
else
- fputs (" 0", outfile);
+ fputs (" (nil)", outfile);
sawclose = 0;
break;
|| REGNO_REG_CLASS (REGNO (op)) != NO_REGS));
}
+/* Return 1 for a register in Pmode; ignore the tested mode. */
+
+int
+pmode_register_operand (op, mode)
+ rtx op;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
+{
+ return register_operand (op, Pmode);
+}
+
/* Return 1 if OP should match a MATCH_SCRATCH, i.e., if it is a SCRATCH
or a hard register. */
extern int general_operand PROTO((rtx, enum machine_mode));
extern int address_operand PROTO((rtx, enum machine_mode));
extern int register_operand PROTO((rtx, enum machine_mode));
+extern int pmode_register_operand PROTO((rtx, enum machine_mode));
extern int scratch_operand PROTO((rtx, enum machine_mode));
extern int immediate_operand PROTO((rtx, enum machine_mode));
extern int const_int_operand PROTO((rtx, enum machine_mode));