Handle extrdi and large register rotate values

Alan Modra amodra@bigpond.net.au
Sat Aug 29 09:44:00 GMT 2009


On Fri, Aug 28, 2009 at 04:29:22PM -0500, Peter Bergner wrote:
> On Fri, 2009-08-28 at 10:09 +0930, Alan Modra wrote:
> > {"extrdi",   4,	PPC64,	"rldicl %0,%1,((%2)+(%3))&((%2)+(%3)<>64),64-(%2)"},
> 
> This wouldn't allow something like:
> 
>   extrdi 10,24,6,60   (ie, want [60,61,62,63,0,1] bits)
> 
> which mine would correctly translate to:
> 
>   rldicl 10,24,2,58
> 
> Do we even want to support extrdi's like that or not?  If not, I'll whip
> up a patch using your patch idea and add some testcases.

I'd rather not support wrap around fields in the extended mnemonics.
On 64-bit hardware the 32-bit insns have some pitfalls for novice
programmers.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list