Messages in this thread | | | Date | Sat, 19 Apr 2008 12:05:23 +0200 | From | Mikael Pettersson <> | Subject | Re: Alternative implementation of the generic __ffs |
| |
dean gaudet writes: > On Fri, 18 Apr 2008, Joe Perches wrote: > > > On Fri, 2008-04-18 at 18:11 -0700, dean gaudet wrote: > > > have you benchmarked it? > > > > I modified Alexander's benchmark: > > http://lkml.org/lkml/2008/4/18/267 > > to include 32 and 64 bit variants called smallest. > > > > On an old ARM: > > i'm guessing the 32-bit constants suck :( > > the code could be modified to use 16-bit constants only
16-bit immediates don't help, as ARMs express immediate operands in arithmetic instructions as 8-bit values plus a 4-bit rotation count (which is multiplied by 2).
Very new ARMs can construct full 16-bit immediates, but that still takes an additional instruction and an additional register.
| |