On Wed, 2009-11-11 at 02:06 +0100, Alexander Graf wrote: > On 11.11.2009, at 02:03, Benjamin Herrenschmidt wrote: > > > > >>>> + li r4,0 > >>>> mfspr r5,SPRN_HID5 > >> > >> r5 = *HID5 > > > > So far so good... > > > >>>> - rldimi r5,r5,6,56 > >> > >> Take r5, remove some bits, write into r5 > > > > Hrm... nope :-) > > > > rldimi will insert into the destination (r5) bits 56..57 > > the corresponding bits from the source (r5) after that source has been > > rotated left by 6 bits. > > > > That means inserting the 2 low bits of r5 into r5[56:57] afaik :-) > > > >>>> + rldimi r5,r4,6,56 > >> > >> Take r4, remove some bits, write into r5. > > > > My variant will insert the bits from r4 which is 0, means it's going > > to > > insert 0's in r5[56:57] which is what you want (clear the two dcbz > > special bits) right ? > > > >> Or did I miss anything? > > > > I think you did :-) > > Wow, and there I thought I finally mastered the rotate instructions :-). Well, that's a rotate-and-insert in fact :-) But please dbl check the doco to make sure I didn't get it wrong. Also sadly, you cannot use rlwinm in this case to clear bits because that would put crap into the top half of the register Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html