On Nov 22, 2013, at 3:43 AM, Richard Sandiford <[email protected]>
wrote:
> genrecog does some useful sanity checks on the .md files. At the moment
> it only reports most of the problems as warnings though, which means you
> won't notice them unless you specifically look.
>
> I think the only message in validate_pattern that deserves to be a
> warning is the one about missing modes, since the current code does
> warn about valid cases. It would be good to tighten that up at some
> point, but not today.
>
> Tested by building cc1 with and without the warning for each backend
> (picking an arbitrary configuration triple in each case). The patch
> below updates backends for which the fix was truly obvious:
> removing constraints from things that don't allow constraints,
> replacing one target-independent predicate with another that
> doesn't accept immediates, or using match_operand rather than
> match_test to test subpredicates. I've posted separate patches
> for the backends that need changing in other ways.
>
> Also tested in the normal way on x86_64-linux-gnu. OK to install?
>
> Thanks,
> Richard
>
>
> gcc/
> * genrecog.c (validate_pattern): Treat all messages except missing
> modes as errors.
> * config/epiphany/epiphany.md: Remove constraints from
> define_peephole2s.
> * config/h8300/h8300.md: Remove constraints from define_splits.
> * config/msp430/msp430.md: Likewise.
> * config/mcore/mcore.md (movdi_i, movsf_i, movdf_k): Use
> nonimmediate_operand rather than general_operand for operand 0.
> * config/moxie/moxie.md (*movsi, *movqi, *movhi): Likewise.
> * config/pdp11/predicates.md (float_operand, float_nonimm_operand):
> Use match_operator rather than match_test to invoke general_operand.
> * config/v850/v850.md (*movqi_internal, *movhi_internal)
> (*movsi_internal_v850e, *movsi_internal, *movsf_internal): Likewise.
I think you meant "use match_operand rather than ..." (in
config/pdp11/predicates.md).
paul