On Thu, May 10, 2018 at 05:49:12PM -0400, Michael Meissner wrote:
> > > -/* Return true if we have D-form addressing in altivec registers. */
> > > +/* Return true if we have D-form addressing (register+offset) in either a
> > > + specific reload register class or whether some reload register class
> > > + supports d-form addressing. */
> > > static inline bool
> > > -mode_supports_vmx_dform (machine_mode mode)
> > > +mode_supports_d_form (machine_mode mode,
> > > + enum rs6000_reload_reg_type rt = RELOAD_REG_ANY)
> > > {
> > > - return ((reg_addr[mode].addr_mask[RELOAD_REG_VMX] & RELOAD_REG_OFFSET)
> > > != 0);
> > > + return ((reg_addr[mode].addr_mask[rt] & RELOAD_REG_OFFSET) != 0);
> > > }
> >
> > Will this overload help anything? It does not look that way, all current
> > callers use a different argument (and all the same).
>
> All current callers just use the ANY option (except for these calls). However
> in the future, I'm planning on calling these functions with the specific
> reload
> register class (hence the change).
No, they use RELOAD_REG_VMX. Unless there is something extra tricky
about your patch?
> > Overloads are nice if they make things *easier* for the reader, not harder.
> > Same as with all other syntactic sugar.
Segher