I need to Reverse these PowerPC instructions here they are:
clrrwi r10, r10, 7
clrrwi r31, r11, 7
R10 = 64
R11 = b3
I dont know the instruction clrrwi
and i cant find it on the internet.
I need to Reverse these PowerPC instructions here they are:
clrrwi r10, r10, 7
clrrwi r31, r11, 7
R10 = 64
R11 = b3
I dont know the instruction clrrwi
and i cant find it on the internet.
I don't have an expert understanding of the instruction set, but I believe it works as follows:
clrrwi is a simplified mnemonic that can be used instead of
rlwinm rA, rS, 0, 0, 31 - n.
The standard rlwinm takes the following form:
rlwinm rA, rS, SH, MB, ME
n.b. rlwinm stands for Rotate Left Word Immediate then aNd with Mask
Where;
With your example;
clrrwi r10, r10, 7
the contents of register r10 are rotated left by 0 bits (no rotation)
A mask is created; with 1's from bit (0 + 32) to ((31 - 7) + 32) and 0's everywhere else. [32 - 56]
then r10 (after its rotation of 0 bits) is logically ANDed with this mask
the result is stored in r10
Most of this can be read from the IBM documentation available at: http://www.ibm.com/developerworks/systems/library/es-archguide-v2-pdf.pdf