Rotate Left Doubleword then Clear Right
MDS-form
rldcr RA,RS,RB,ME (Rc=0)
rldcr. RA,RS,RB,ME (Rc=1)
n <= (RB)58:63
r <= ROTL64((RS), n)
e <= me5 || me0:4
m <= MASK(0, e)
RA <= r & m
The contents of register RS are rotated64 left 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.
Special Registers Altered:
CR0 (if Rc=1)
Programming Note:
rldcr can be used to extract an n-bit field that starts
at variable bit position b in register RS, left-justified
into register RA (clearing the remaining 64-n bits
of RA), by setting RB58:63=b and ME=n-1. It can
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.
Extended mnemonics are provided for some of
these uses (some devolve to rldcl); see
Appendix C, "assembler Extended Mnemonics" on
page 795.
No comments:
Post a Comment