06-26-2021, 05:04 PM
(06-26-2021, 11:40 AM)Seeky Wrote: Personally I tend to ignore the macros and just use rlwinm itself, so I can't really comment on the others. Firstly, the operands of the fundamental rlwinm don't change their usage based on the operation, at the low level they still mean the same thing. I think it's worth specifying that it's specifically a *rotation* and not a shift for SH, since in a shift just discards bits that flow out of the end of the register, while rotation re-inserts them at the other end (and also specifically rotation left). 'Mask Value' doesn't really mean anything, it's the bit where the mask starts (indexed with 0 as the MSB and 31 as the LSB) like how ME is the bit where the mask ends. Probably worth mentioning too that the mask can 'loop around', so having it start at 31 and end at 29 would include every bit apart from bit 30. I'd guess you've already read Vega's thread on this, but in case you didn't know about it here's a link https://mkwii.com/showthread.php?tid=1262
I'll be honest, I have no idea what most of this means. I think I have to start with the basics, what exactly does it mean to "rotate" a bit? shifting right/left multiplied and divided it when tested. Is "rotating" a bit putting it to "the power of" a value?