This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Handle extrdi and large register rotate values
On Fri, Aug 28, 2009 at 09:45:01AM +0930, Alan Modra wrote:
> On Thu, Aug 27, 2009 at 05:29:36PM -0500, Peter Bergner wrote:
> > -{"extrdi", 4, PPC64, "rldicl %0,%1,(%2)+(%3),64-(%2)"},
> > -{"extrdi.", 4, PPC64, "rldicl. %0,%1,(%2)+(%3),64-(%2)"},
> > +{"extrdi", 4, PPC64, "rldicl %0,%1,((%2)+(%3))&0x3f,64-(%2)"},
> > +{"extrdi.", 4, PPC64, "rldicl. %0,%1,((%2)+(%3))&0x3f,64-(%2)"},
> >
> > but that would mean updating quite a few other ops similarly. Is the
> > following patch acceptable to catch them all in one shot or do you
> > prefer a change like the above?
>
> I prefer this. For your other patch, you'd need to argue that the
> current warning on plain rldicl shift counts isn't useful.
Hmm, extrdi ra,rs,n,b has number of bits n = [1,64] and bit position
b = [0,63]. Also, the bit field ends at bit 63, so n+b = [1,64]
So I think you should have
{"extrdi", 4, PPC64, "rldicl %0,%1,((%2)+(%3))&((%2)+(%3)<>64),64-(%2)"},
--
Alan Modra
Australia Development Lab, IBM