Hi! On Wed, Dec 11, 2019 at 07:29:05PM -0500, Michael Meissner wrote: > +(define_memory_constraint "em" > + "A memory operand that does not contain a prefixed address." > + (and (match_code "mem") > + (match_operand 0 "non_prefixed_memory"))) > + > +(define_memory_constraint "ep" > + "A memory operand that does contains a prefixed address." > + (and (match_code "mem") > + (match_operand 0 "prefixed_memory")))
"does contain". Or maybe just say "with a non-prefixed address" and "with a prefixed address"? > +;; Return true if the operand is a valid memory address that does not use a > +;; prefixed address. > +(define_predicate "non_prefixed_memory" > + (match_code "mem") > +{ > + enum insn_form iform > + = address_to_insn_form (XEXP (op, 0), mode, NON_PREFIXED_DEFAULT); > + > + return (iform != INSN_FORM_BAD > + && iform != INSN_FORM_PREFIXED_NUMERIC > + && iform != INSN_FORM_PCREL_LOCAL > + && iform != INSN_FORM_PCREL_EXTERNAL); > +}) Why can this not use just !address_is_prefixed? Why is an INSN_FORM_PCREL_EXTERNAL address neither prefixed nor non-prefixed? What does "BAD" mean, really? Should that ever happen, should that not ICE? It is very confusing if any valid memory is neither "prefixed_memory" nor "non_prefixed_memory"! > --- gcc/doc/md.texi (revision 279182) > +++ gcc/doc/md.texi (working copy) > @@ -3373,6 +3373,12 @@ asm ("st %1,%0" : "=m<>" (mem) : "r" (va > > is not. > > +@item em > +A memory operand that does not contain a prefixed address. > + > +@item ep > +A memory operand that does contains a prefixed address. Same comments as above. Segher