On 01-07-14 21:47, Jeff Law wrote:
On 07/01/14 13:27, Tom de Vries wrote:
So my question is: is the combination of '&' and '+' supported ? If so,
what is the exact semantics ? If not, should we warn or give an error ?
>
I don't think we can define any reasonable semantics for &+. My recommendation
would be for this to be considered a hard error.
[ move discussion from gcc ml to gcc-patches ml ]
Attached patch detects the combination of + and & constrains during genrecog,
and generates an error like this:
...
/home/vries/gcc_versions/devel/src/gcc/config/aarch64/aarch64-simd.md:1020:
operand 0 has in-out reload, incompatible with earlyclobber
/home/vries/gcc_versions/devel/src/gcc/config/aarch64/aarch64-simd.md:1020:
operand 0 has in-out reload, incompatible with earlyclobber
/home/vries/gcc_versions/devel/src/gcc/config/aarch64/aarch64-simd.md:1020:
operand 0 has in-out reload, incompatible with earlyclobber
make[2]: *** [s-recog] Error 1
...
The error triggers three times, once for each mode iterator element.
OK if x86_64 bootstrap succeeds ?
Thanks,
- Tom
2014-07-02 Tom de Vries <t...@codesourcery.com>
* genrecog.c (validate_pattern): Don't allow earlyclobber constraint
modifier with read/write constraint modifier.
diff --git a/gcc/genrecog.c b/gcc/genrecog.c
index 457b59c..ad709ee 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -481,6 +481,13 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code)
rtx_name[GET_CODE (insn)]);
}
+ if (constraints0 == '+'
+ && strchr (XSTR (pattern, 2), '&') != NULL)
+ error_with_line (pattern_lineno,
+ "operand %d has in-out reload, incompatible with"
+ " earlyclobber",
+ XINT (pattern, 0));
+
/* A MATCH_OPERAND that is a SET should have an output reload. */
else if (set && constraints0)
{
--
1.9.1