On Tue, Dec 17, 2019 at 05:29:44PM -0500, Michael Meissner wrote:
> On Tue, Dec 17, 2019 at 11:15:29AM -0600, Segher Boessenkool wrote:
> > > +;; 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?
>
> You can't just invert !address_is_prefixed, because it would all things that
> may not be valid memory addresses.
Yes, so test that *explicitly*, in the "prefixed_memory" predicate as
well please. Make the two predicates as much the same as possible.
And what is with the INSN_FORM_PCREL_EXTERNAL?
Segher