From 6e7a4706fdf5641516cd85b20d5ac9070a348e15 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Mon, 23 Jan 2006 15:16:19 +0000 Subject: r110130@banpei: zack | 2006-01-22 14:52:43 -0800 r110130@banpei: zack | 2006-01-22 14:52:43 -0800 * rtl.def (match_code): Add second argument. * genpreds.c (write_extract_subexp): New function. (write_match_code): Add path argument. Use write_extract_subexp. (write_predicate_expr): Pass path to write_match_code. (mark_mode_tests): MATCH_CODE applied to a subexpression does not perform a mode test. * genrecog.c (compute_predicate_codes): MATCH_CODE applied to a subexpression does not constrain the top-level code set. * read-rtl.c (read_rtx_variadic): New function. (read_rtx_1): Use it; allow AND and IOR to be variadic. * doc/md.texi: Document new notation. * config/i386/predicates.md (cmpsi_operand_1): Fold into ... (cmpsi_operand): ... here, using new notation. From-SVN: r110126 --- gcc/genrecog.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gcc/genrecog.c') diff --git a/gcc/genrecog.c b/gcc/genrecog.c index cb86849..56d6598 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -270,7 +270,15 @@ compute_predicate_codes (rtx exp, char codes[NUM_RTX_CODE]) break; case MATCH_CODE: - /* MATCH_CODE allows a specified list of codes. */ + /* MATCH_CODE allows a specified list of codes. However, if it + does not apply to the top level of the expression, it does not + constrain the set of codes for the top level. */ + if (XSTR (exp, 1)[0] != '\0') + { + memset (codes, Y, NUM_RTX_CODE); + break; + } + memset (codes, N, NUM_RTX_CODE); { const char *next_code = XSTR (exp, 0); -- cgit v1.1