I read other posts here, but still have a question about PPC and rlwinm.
An example I'm looking at:
li r0, 0x100 clrlslwi r9, r0, 27,5 (which afaik is the same as rlwinm r9, r0,5,22,26)
First I load r0 = 0x100 Then Left Shift r0 to 5, so r0 = 0x2000 (There is no overflow, so no rotation is required)
Make a mask with bits 22 to 26 set = 0x3e0
And r0 with mask = 0x2000 AND 0x3E0 = 0
I have to do something wrong ... it will always be 0 What am I missing?
source share