aboutsummaryrefslogtreecommitdiff
path: root/gcc/regmove.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-10-11 00:07:30 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-10-11 00:07:30 -0700
commit84b7230235972947f92045e6281d2a18099b415e (patch)
tree65279fa1cd98240f2ba4d2902ef69c88fa458bd8 /gcc/regmove.c
parent592188a538c1993640b27f0788f382e282dddbb6 (diff)
downloadgcc-84b7230235972947f92045e6281d2a18099b415e.zip
gcc-84b7230235972947f92045e6281d2a18099b415e.tar.gz
gcc-84b7230235972947f92045e6281d2a18099b415e.tar.bz2
c-parse.in (asm_operand): Allow named operands.
* c-parse.in (asm_operand): Allow named operands. * genconfig.c (max_recog_operands): Set to 29. * local-alloc.c (requires_inout): Skip multiple digits. * recog.c (asm_operand_ok): Likewise. (preprocess_constraints): Use strtoul for matching constraints. (constrain_operands): Likewise. * regmove.c (find_matches): Likewise. * reload.c (find_reloads): Likewise. * stmt.c (parse_output_constraint): Don't reject in-out constraint on operands > 9. Reject '[' in constraint. (expand_asm_operands): Handle named operands. Use strtoul for matching constraints. (check_operand_nalternatives): Split out from expand_asm_operands. (check_unique_operand_names): New. (resolve_operand_names, resolve_operand_name_1): New. * doc/extend.texi (Extended Asm): Document named operands. * doc/md.texi (Simple Constraints): Document matching constraints on operands > 9. * parse.y (asm_operand): Allow named operands. * semantics.c (finish_asm_stmt): Tweek for changed location of the operand constrant. From-SVN: r46179
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r--gcc/regmove.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c
index ce62cce..89a55ca 100644
--- a/gcc/regmove.c
+++ b/gcc/regmove.c
@@ -1576,16 +1576,23 @@ find_matches (insn, matchp)
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':
- c -= '0';
- if (c < op_no && likely_spilled[(unsigned char) c])
- break;
- matchp->with[op_no] = c;
- any_matches = 1;
- if (matchp->commutative[op_no] >= 0)
- matchp->with[matchp->commutative[op_no]] = c;
+ {
+ char *end;
+ unsigned long match = strtoul (p - 1, &end, 10);
+ p = end;
+
+ 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;
+
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':