(regclass): Don't scan the constraints if there aren't any operands.

(regclass): Don't scan the constraints if there aren't
        any operands.  Don't look for a commutative constraint in the last
        operand.

From-SVN: r1813
This commit is contained in:
Tom Wood 1992-08-13 20:48:40 +00:00
parent e913669934
commit e5ed215546

View File

@ -561,7 +561,8 @@ regclass (f, nregs)
{
decode_asm_operands (PATTERN (insn), recog_operand, NULL_PTR,
constraints, modes);
nalternatives = n_occurrences (',', constraints[0]) + 1;
nalternatives = (noperands == 0 ? 0
: n_occurrences (',', constraints[0]) + 1);
}
else
{
@ -733,7 +734,7 @@ regclass (f, nregs)
second operand is a constant since that is the case
for which the constraints should have been written. */
for (i = 0; i < noperands; i++)
for (i = 0; i < noperands - 1; i++)
if (constraints[i][0] == '%'
&& ! CONSTANT_P (recog_operand[i+1]))
{