rldicl
Rotate Left Doubleword Immediate Clear Left
Rotates the contents of a register left by a specified number of bits and clears higher-order bits.
Details
The contents of register RS are rotated 64 left SH bits. A mask is generated having 1-bits from bit MB through bit 63 and 0-bits elsewhere. The rotated data are ANDed with the generated mask and the result is placed into register RA.
Pseudocode Operation
Programming Note
rldicl can be used to extract an n-bit field that starts at bit position b in register RS, right-justified into register RA (clearing the remaining 64-n bits of RA), by setting SH=b+n and MB=64-n. It can be used to rotate the contents of a register left by n bits, by setting SH=n and MB=0. It can be used to shift the contents of a register right by n bits, by setting SH=64-n and MB=n. It can be used to clear the high-order n bits of a register, by setting SH=0 and MB=n.
Extended Mnemonics
| Extended Mnemonic | Equivalent Instruction |
|---|---|
| extrdi | |
| srdi | |
| clrldi |
Example
Encoding
Operands
-
RA
Target -
RS
Source -
SH
Shift -
MB
Mask Begin