From e5ed215546e9bdc14a4ae1b537822ecfd6a708b6 Mon Sep 17 00:00:00 2001 From: Tom Wood Date: Thu, 13 Aug 1992 20:48:40 +0000 Subject: (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 --- gcc/regclass.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/regclass.c') diff --git a/gcc/regclass.c b/gcc/regclass.c index 6c6e029..cb88cf8 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -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])) { -- cgit v1.1