diff options
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r-- | gcc/regmove.c | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c index 653d1587c84..eb5141f8bea 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -1570,47 +1570,50 @@ find_matches (insn, matchp) if (*p == ',') i++; - while ((c = *p++) != '\0' && c != ',') - switch (c) - { - case '=': - break; - case '+': - break; - case '&': - matchp->early_clobber[op_no] = 1; - break; - case '%': - matchp->commutative[op_no] = op_no + 1; - matchp->commutative[op_no + 1] = op_no; - break; - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': + while ((c = *p) != '\0' && c != ',') + { + switch (c) { - char *end; - unsigned long match_ul = strtoul (p - 1, &end, 10); - int match = match_ul; + case '=': + break; + case '+': + break; + case '&': + matchp->early_clobber[op_no] = 1; + break; + case '%': + matchp->commutative[op_no] = op_no + 1; + matchp->commutative[op_no + 1] = op_no; + break; - p = end; + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + char *end; + unsigned long match_ul = strtoul (p, &end, 10); + int match = match_ul; - if (match < op_no && likely_spilled[match]) - break; - matchp->with[op_no] = match; - any_matches = 1; - if (matchp->commutative[op_no] >= 0) - matchp->with[matchp->commutative[op_no]] = match; - } - break; + p = end; + + if (match < op_no && likely_spilled[match]) + continue; + matchp->with[op_no] = match; + any_matches = 1; + if (matchp->commutative[op_no] >= 0) + matchp->with[matchp->commutative[op_no]] = match; + } + continue; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'h': case 'j': case 'k': case 'l': case 'p': case 'q': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case 'A': case 'B': case 'C': case 'D': case 'W': case 'Y': case 'Z': - if (CLASS_LIKELY_SPILLED_P (REG_CLASS_FROM_LETTER ((unsigned char) c))) + if (CLASS_LIKELY_SPILLED_P (REG_CLASS_FROM_CONSTRAINT ((unsigned char) c, p) )) likely_spilled[op_no] = 1; break; } + p += CONSTRAINT_LEN (c, p); + } } return any_matches; } |