On 09/18/14 04:19, James Greenhalgh wrote:

Hi,

As discussed in https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01334.html
The construct

   (clobber (match_scratch 0 "r"))

is invalid - operand 0 must be marked either write or read/write.

Likewise

   (match_* 0 "&r")

is invalid, marking an operand earlyclobber does not remove the need to
also mark it write or read/write.

This patch adds checking for these two error conditions to the generator
programs and documents the restriction.

Bootstrapped on x86, ARM and AArch64 with no new issues.

Ok?

Thanks,
James

---
2014-09-17  James Greenhalgh  <james.greenha...@arm.com>

        * doc/md.texi (Modifiers): Consistently use "read/write"
        nomenclature rather than "input/output".
        * genrecog.c (constraints_supported_in_insn_p): New.
        (validate_pattern): If needed, also check constraints on
        MATCH_SCRATCH operands.
        * genoutput.c (validate_insn_alternatives): Catch earlyclobber
        operands with no '=' or '+' modifier.
OK.
Jeff

Reply via email to