06-26-2021, 10:38 PM
(06-26-2021, 10:25 PM)Vega Wrote: rlwinm r3, r12, 5, 15, 16
r12 = 0x80000004 before the instruction is executed. result will go into r3 ofc.
--
1: Rotate 0x80000004 counter clockwise by 5 bits
Before rotation: 1000 0000 0000 0000 0000 0000 0000 0100
After rotation: 0000 0000 0000 0000 0000 0000 1001 0000
Temporary rotated value is 0x00000090
2. 15,16 = AND mask of 0000 0000 0000 0001 1000 0000 0000 0000
The MB and ME marks which bits are high in the ANDing mask
3. 0x00000090 AND'd with 0x00018000 = 0x00000000
4. r3 = 0
Apologize for any more typos, in a rush multitasking with other things atm
Thanks for trying to help me understand this, but unfortunately I still dont really get it. I think I need to do some more research and testing. This instruction turned out to be much harder than I thought it would be to understand. But thanks for trying to help!