Better tabselect

David Miller davem at
Fri Apr 12 21:53:10 CEST 2013

From: Torbjorn Granlund <tg at>
Date: Fri, 12 Apr 2013 17:14:41 +0200

> I'd suggest to use the loop below for sparc64.  It limits `which' to be <
> 2^32 by creating the mask based on 32-bit comparison.  It would be
> possible to replace "subcc o1,1,o1; subc ..." by "addcc o1,-1,o1; addxc
> ..." for newer chips, but I think that's no use.

Looks good.

> I sincerely apologise for the odd number of insns in the loop.  :-)

Easily solved by using the pointer trick on 'tp' and making 'i'
instead be 'i * stride'.  That'll get us down to 16 instructions.

I'll try to find time to play with this over the weekend, thanks!

More information about the gmp-devel mailing list