[ Previous |
Next |
Contents |
Home |
Search ]
AIX Version 4.3 Assembler Language Reference
rldicl (Rotate Left Double Word Immediate then Clear Left) Instruction
Purpose
Rotate the contents of a general purpose register left
by a specified number of bits, clearing a specified number
of high-order bits. The result is placed in another general
purpose register.
Description
The contents of general purpose register RS are rotated
left the number of bits specified by operand SH. A mask is
generated containing 1 bits from bit MB through bit 63 and 0 bits
elsewhere. The rotated data is ANDed with the generated mask
and the result is placed into GPR RA.
Note that rldicl can be used to extract, rotate, shift, and clear bit fields using the methods shown below:
- To extract an n-bit field, which starts at bit position b
in RS, right-justified into GPR RA (clearing the
remaining 64 - n bits of GPR RA), set SH = b + n and MB = 64 - n.
- To rotate the contents of a register left by n bits, set
SH = n and MB = 0; to rotate the contents of a register right
by n bits, set SH = (64 - n), and MB = 0.
- To shift the contents of a register right by n bits, set SH = 64 - n and MB = n.
- To clear the high-order n bits of a register, set SH = 0 and MB = n.
Other registers altered:
Condition Register (CR0 field):
Affected: LT, GT, EQ, SO (if Rc = 1)
Parameters
RA |
Specifies the target general purpose register
for the result of the instruction. |
RS |
Specifies the source general purpose register
containing the operand. |
SH |
Specifies the (immediate) shift value for the operation. |
MB |
Specifies the begin value (bit number)
of the mask for the operation. |
Implementation
This instruction is defined only for 64-bit implementations. Using it on a 32-bit implementation will cause the system illegal instruction error handler to be invoked.
[ Previous |
Next |
Contents |
Home |
Search ]