From 73f793e3bb4e0a2bd04536f8bbc861c34cfec945 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 28 May 2014 19:49:18 +0000 Subject: 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 (add3, mulsi3, andsi3, iorsi3) (xorsi3): Likewise. From-SVN: r211031 --- gcc/doc/md.texi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/doc') diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 3bd1c56..7c3d714 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -1589,7 +1589,10 @@ See, for example, the @samp{mulsi3} insn of the ARM@. Declares the instruction to be commutative for this operand and the following operand. This means that the compiler may interchange the two operands if that is the cheapest way to make all operands fit the -constraints. +constraints. @samp{%} applies to all alternatives and must appear as +the first character in the constraint. Only input operands can use +@samp{%}. + @ifset INTERNALS This is often used in patterns for addition instructions that really have only two operands: the result must go in one of the -- cgit v1.1