On Mon, Oct 14, 2019 at 05:16:03PM -0400, Michael Meissner wrote:
> On Fri, Oct 11, 2019 at 04:17:02PM -0500, Segher Boessenkool wrote:
> > >   * config/rs6000/predicates.md (lwa_operand): Allow using PLWA to
> > >   generate sign extend with odd offsets.
> > 
> > I don't understand what this means.  "Odd offsets" isn't correct, in any
> > case?
> 
> Non-zero in the bottom 2/4 bits.  I'll try to come up with different words.

Ah.  "If prefixed is allowed, allow addresses not a multiple of 4."?

> > > +  /* The LWA instruction uses the DS-form format where the bottom two 
> > > bits of
> > > +     the offset must be 0.  The prefixed PLWA does not have this
> > > +     restriction.  */
> > > +  if (address_is_prefixed (addr, DImode, NON_PREFIXED_DS))
> > > +    return true;
> > 
> > DImode?
> 
> Yes, because LWA converts SImode to DImode.

Well, the access is to a SImode datum.  But you want DImode here so it uses
the code for ld (the DS-mode code) also for lwa.  Hrm, address_to_insn_form
needs a comment for that then, and so do callers like this one.  Should be
fine with that, it's just an irregularity in the ISA.

> > > +;; Return 1 if op is either a register operand or a memory operand that 
> > > does
> > > +;; not use a prefixed address.
> > > +(define_predicate "reg_or_non_prefixed_memory"
> > > +  (match_code "reg,subreg,mem")
> > > +{
> > > +  return (gpc_reg_operand (op, mode) || non_prefixed_memory (op, mode));
> > > +})
> > 
> > This never allows subreg.
> 
> Gpc_reg_operand allows subreg, assuming that register_operand allows subreg.

It does, and I have no idea what I thought here now.  Sorry.


Segher

Reply via email to