aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2006-01-23 15:16:19 +0000
committerZack Weinberg <zack@gcc.gnu.org>2006-01-23 15:16:19 +0000
commit6e7a4706fdf5641516cd85b20d5ac9070a348e15 (patch)
treeffc73708bd6be59b11ab8a71a9537d0d6289dced /gcc/config
parent6ff09968f1d0f5523b026701374f4a0386eb054c (diff)
downloadgcc-6e7a4706fdf5641516cd85b20d5ac9070a348e15.zip
gcc-6e7a4706fdf5641516cd85b20d5ac9070a348e15.tar.gz
gcc-6e7a4706fdf5641516cd85b20d5ac9070a348e15.tar.bz2
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
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/predicates.md21
1 files changed, 8 insertions, 13 deletions
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 2d423d4..acc01ee 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -931,21 +931,16 @@
;; ??? It seems likely that this will only work because cmpsi is an
;; expander, and no actual insns use this.
-(define_predicate "cmpsi_operand_1"
- (match_code "and")
-{
- return (GET_MODE (op) == SImode
- && GET_CODE (XEXP (op, 0)) == ZERO_EXTRACT
- && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT
- && GET_CODE (XEXP (XEXP (op, 0), 2)) == CONST_INT
- && INTVAL (XEXP (XEXP (op, 0), 1)) == 8
- && INTVAL (XEXP (XEXP (op, 0), 2)) == 8
- && GET_CODE (XEXP (op, 1)) == CONST_INT);
-})
-
(define_predicate "cmpsi_operand"
(ior (match_operand 0 "nonimmediate_operand")
- (match_operand 0 "cmpsi_operand_1")))
+ (and (match_code "and")
+ (match_code "zero_extract" "0")
+ (match_code "const_int" "1")
+ (match_code "const_int" "01")
+ (match_code "const_int" "02")
+ (match_test "INTVAL (XEXP (XEXP (op, 0), 1)) == 8")
+ (match_test "INTVAL (XEXP (XEXP (op, 0), 2)) == 8")
+ )))
(define_predicate "compare_operator"
(match_code "compare"))