diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-04-10 22:16:29 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-04-10 22:16:29 +0000 |
commit | 3c37d7ad7198395e2493e849dfb402b61ce7b0c9 (patch) | |
tree | 0d11b9b740ce0204ceafaeff59828f8f5e19b8fd /gcc/recog.c | |
parent | fafd71e7d98e3c12be1dc3dd0987615ed2e116b6 (diff) | |
download | ppe42-gcc-3c37d7ad7198395e2493e849dfb402b61ce7b0c9.tar.gz ppe42-gcc-3c37d7ad7198395e2493e849dfb402b61ce7b0c9.zip |
* recog.c (constrain_operands): Ignore unary operators when
matching operands. Recognize '5'..'9' as well.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26342 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 6bceae85a9e..94e7abbffff 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -2303,11 +2303,8 @@ constrain_operands (strict) earlyclobber[opno] = 1; break; - case '0': - case '1': - case '2': - case '3': - case '4': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': /* This operand must be the same as a previous one. This kind of constraint is used for instructions such as add when they take only two operands. @@ -2319,8 +2316,19 @@ constrain_operands (strict) if (strict < 0) val = 1; else - val = operands_match_p (recog_operand[c - '0'], - recog_operand[opno]); + { + rtx op1 = recog_operand[c - '0']; + rtx op2 = recog_operand[opno]; + + /* A unary operator may be accepted by the predicate, + but it is irrelevant for matching constraints. */ + if (GET_RTX_CLASS (GET_CODE (op1)) == '1') + op1 = XEXP (op1, 0); + if (GET_RTX_CLASS (GET_CODE (op2)) == '1') + op2 = XEXP (op2, 0); + + val = operands_match_p (op1, op2); + } matching_operands[opno] = c - '0'; matching_operands[c - '0'] = opno; |