aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Wood <wood@gnu.org>1992-08-13 20:48:40 +0000
committerTom Wood <wood@gnu.org>1992-08-13 20:48:40 +0000
commite5ed215546e9bdc14a4ae1b537822ecfd6a708b6 (patch)
tree5c1d07cc562a6f05d21ca675d3fd34694d62658f
parente913669934c6399060a41e6c0d82b559b6b99c53 (diff)
downloadgcc-e5ed215546e9bdc14a4ae1b537822ecfd6a708b6.zip
gcc-e5ed215546e9bdc14a4ae1b537822ecfd6a708b6.tar.gz
gcc-e5ed215546e9bdc14a4ae1b537822ecfd6a708b6.tar.bz2
(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
-rw-r--r--gcc/regclass.c5
1 files changed, 3 insertions, 2 deletions
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]))
{