diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-05-28 19:49:18 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-05-28 19:49:18 +0000 |
commit | 73f793e3bb4e0a2bd04536f8bbc861c34cfec945 (patch) | |
tree | 18194c4ebc03529b7414e609111af0e8e670d580 /gcc/ira.c | |
parent | 5a7555ab101f5796bc51f9175552d7c77f79754b (diff) | |
download | gcc-73f793e3bb4e0a2bd04536f8bbc861c34cfec945.zip gcc-73f793e3bb4e0a2bd04536f8bbc861c34cfec945.tar.gz gcc-73f793e3bb4e0a2bd04536f8bbc861c34cfec945.tar.bz2 |
md.texi: Document that the % constraint character must be at the beginning of the string.
gcc/
* doc/md.texi: Document that the % constraint character must
be at the beginning of the string.
* genoutput.c (validate_insn_alternatives): Check that '=',
'+' and '%' only appear at the beginning of a constraint.
* ira.c (commutative_constraint_p): Delete.
(ira_get_dup_out_num): Expect the '%' commutativity marker to be
at the start of the string.
* config/alpha/alpha.md (*movmemdi_1, *clrmemdi_1): Remove
duplicate '='s.
* config/arm/neon.md (bicdi3_neon): Likewise.
* config/iq2000/iq2000.md (addsi3_internal, subsi3_internal, sgt_si)
(slt_si, sltu_si): Likewise.
* config/vax/vax.md (sbcdi3): Likewise.
* config/h8300/h8300.md (*cmpstz): Remove duplicate '+'.
* config/arc/arc.md (mulsi_600, mulsidi_600, umulsidi_600)
(mul64): Move '%' to beginning of constraint.
* config/arm/arm.md (*xordi3_insn): Likewise.
* config/nds32/nds32.md (add<mode>3, mulsi3, andsi3, iorsi3)
(xorsi3): Likewise.
From-SVN: r211031
Diffstat (limited to 'gcc/ira.c')
-rw-r--r-- | gcc/ira.c | 33 |
1 files changed, 2 insertions, 31 deletions
@@ -1770,34 +1770,6 @@ setup_prohibited_mode_move_regs (void) -/* Return TRUE if the operand constraint STR is commutative. */ -static bool -commutative_constraint_p (const char *str) -{ - int c; - - alternative_mask enabled = recog_data.enabled_alternatives; - for (;;) - { - c = *str; - if (c == '\0') - break; - str += CONSTRAINT_LEN (c, str); - if (c == '#') - enabled &= ~ALTERNATIVE_BIT (0); - else if (c == ',') - enabled >>= 1; - else if (enabled & 1) - { - /* Usually `%' is the first constraint character but the - documentation does not require this. */ - if (c == '%') - return true; - } - } - return false; -} - /* Setup possible alternatives in ALTS for INSN. */ void ira_setup_alts (rtx insn, HARD_REG_SET &alts) @@ -2099,10 +2071,9 @@ ira_get_dup_out_num (int op_num, HARD_REG_SET &alts) if (use_commut_op_p) break; use_commut_op_p = true; - if (commutative_constraint_p (recog_data.constraints[op_num])) + if (recog_data.constraints[op_num][0] == '%') str = recog_data.constraints[op_num + 1]; - else if (op_num > 0 && commutative_constraint_p (recog_data.constraints - [op_num - 1])) + else if (op_num > 0 && recog_data.constraints[op_num - 1][0] == '%') str = recog_data.constraints[op_num - 1]; else break; |