diff options
author | Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> | 1998-10-07 22:07:40 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-10-07 22:07:40 -0600 |
commit | 2a230e9dc40fd0a9ffe86e0548a935350dd39459 (patch) | |
tree | d2ffc449a3863172f26daaab2384f9276cc31454 /gcc/reload.c | |
parent | f1da1729434a302ca11b19ffcddf07902465b951 (diff) | |
download | gcc-2a230e9dc40fd0a9ffe86e0548a935350dd39459.zip gcc-2a230e9dc40fd0a9ffe86e0548a935350dd39459.tar.gz gcc-2a230e9dc40fd0a9ffe86e0548a935350dd39459.tar.bz2 |
stmt.c (n_occurrences): New static function.
* stmt.c (n_occurrences): New static function.
(expand_asm_operands): Verify that all constrains match in the
number of alternatives.
Verify that '+' or '=' are at the beginning of an output constraint.
Don't allow '&' for input operands.
Verify that '%' isn't written for the last operand.
* reload.c (find_reloads): Abort if an asm is found with invalid
constraints; all possible problems ought to be checked for earlier.
From-SVN: r22911
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 428ce87..32ee0f5 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -2442,15 +2442,6 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) bcopy ((char *) constraints, (char *) constraints1, noperands * sizeof (char *)); n_alternatives = n_occurrences (',', constraints[0]) + 1; - for (i = 1; i < noperands; i++) - if (n_alternatives != n_occurrences (',', constraints[i]) + 1) - { - error_for_asm (insn, "operand constraints differ in number of alternatives"); - /* Avoid further trouble with this insn. */ - PATTERN (insn) = gen_rtx_USE (VOIDmode, const0_rtx); - n_reloads = 0; - return; - } } break; } @@ -2510,15 +2501,9 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) { /* The last operand should not be marked commutative. */ if (i == noperands - 1) - { - if (this_insn_is_asm) - warning_for_asm (this_insn, - "`%%' constraint used with last operand"); - else - abort (); - } - else - commutative = i; + abort (); + + commutative = i; } else if (c >= '0' && c <= '9') { @@ -2528,13 +2513,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) /* An operand may not match itself. */ if (c == i) - { - if (this_insn_is_asm) - warning_for_asm (this_insn, - "operand %d has constraint %d", i, c); - else - abort (); - } + abort (); /* If C can be commuted with C+1, and C might need to match I, then C+1 might also need to match I. */ @@ -3372,14 +3351,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) early_data = decompose (recog_operand[i]); if (modified[i] == RELOAD_READ) - { - if (this_insn_is_asm) - warning_for_asm (this_insn, - "`&' constraint used with input operand"); - else - abort (); - continue; - } + abort (); if (this_alternative[i] == NO_REGS) { |