On Tue, 2012-04-10 at 17:57 -0700, Linus Torvalds wrote: > On Tue, Apr 10, 2012 at 5:50 PM, Linus Torvalds > <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > > > .. and you don't have a double shift, right? So you'd need to do two > > shifts and the or for each word. > > Actually, if sparc has a "rotate" instruction, you can do with a > single shift (rotate) per word loop. > > You need to set up a mask register based on the alignment, and > pre-load the first word, but if you do have a rotate you can rotate > and then use "and mask" first to generate the "high bits" of the > current word, and then use the "andn mask" to generate the low bits of > the next word. So then you just need a single rotate per loop, and > some (very minor) loop prep. > > Of course, RISC people tended to throw out rotate too, so maybe you > don't have even that. Well, we do have a very nice & flexible rotate & mask on ppc at least :-) Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html