rldcr.
Rotate Left Doubleword then Clear Right (Record)
rldcr. RT,RS,RB,ME
Rotates the contents of register RS left by a variable number of bits specified by (RB)58:63, and clears the rightmost bits.
Encoding
Binary Layout
0
0:5
RS
6:10
RA
11:15
RB
16:20
ME
21:26
9
27:30
Rc
31
Operands
-
RT
Target General Purpose Register -
RS
Source General Purpose Register -
RB
Source General Purpose Register -
ME
Mask End bit position
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
The contents of register RS are rotated 64 bits to the left by the number of bits specified by (RB)58:63. A mask is generated having 1-bits from bit 0 through bit ME and 0-bits elsewhere. The rotated data are ANDed with the generated mask, and the result is placed into register RA.
Operation
if 'rldcr' then
n ← (RB)58:63
r ← ROTL64((RS), n)
ME ← me5 || me0:4
m ← MASK(0, ME)
RA ← r & m
if 'rldcr.' then
CR0 <- updated based on result
Extended Mnemonics
| Extended Mnemonic | Equivalent Instruction |
|---|---|
Programming Note
rldcr can be used to extract an n-bit field that starts at variable bit position b in register RS, left-justified RA), by setting RB58:63=b and ME=n-1. It can also be used to rotate the contents of a register left (right) by variable n bits, by setting RB58:63=n (64-n) and ME=63.