recog.c (constrain_operands): Ignore unary operators when matching operands.

* recog.c (constrain_operands): Ignore unary operators when
        matching operands.  Recognize '5'..'9' as well.

From-SVN: r26342
This commit is contained in:
Jan Hubicka 1999-04-11 00:16:29 +02:00 committed by Richard Henderson
parent 83f4345f44
commit 62674ffe2b
2 changed files with 20 additions and 7 deletions

View File

@ -1,3 +1,8 @@
Sat Apr 10 22:12:12 1999 Jan Hubicka <hubicka@freesoft.cz>
* recog.c (constrain_operands): Ignore unary operators when
matching operands. Recognize '5'..'9' as well.
Sat Apr 10 21:53:02 1999 Philipp Thomas (kthomas@gwdg.de) Sat Apr 10 21:53:02 1999 Philipp Thomas (kthomas@gwdg.de)
Richard Henderson <rth@cygnus.com> Richard Henderson <rth@cygnus.com>

View File

@ -2303,11 +2303,8 @@ constrain_operands (strict)
earlyclobber[opno] = 1; earlyclobber[opno] = 1;
break; break;
case '0': case '0': case '1': case '2': case '3': case '4':
case '1': case '5': case '6': case '7': case '8': case '9':
case '2':
case '3':
case '4':
/* This operand must be the same as a previous one. /* This operand must be the same as a previous one.
This kind of constraint is used for instructions such This kind of constraint is used for instructions such
as add when they take only two operands. as add when they take only two operands.
@ -2319,8 +2316,19 @@ constrain_operands (strict)
if (strict < 0) if (strict < 0)
val = 1; val = 1;
else 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[opno] = c - '0';
matching_operands[c - '0'] = opno; matching_operands[c - '0'] = opno;