rldimi
Rotate Left Doubleword Immediate Mask Insert
Rotates 64-bit value and inserts into target under mask.
Details
The Rotate Left Doubleword Immediate Mask Insert (rldimi) instruction rotates the contents of register RS left by a specified number of bits (SH). A mask is generated with 1-bits from bit MB through bit 63 and 0-bits elsewhere. The rotated data are ANDed with this mask, and the result is placed into register RA.
Pseudocode Operation
Programming Note
The rldimi instruction is useful for performing masked left rotations on 64-bit values. Ensure that the shift amount (SH) and mask bits (MB) are within valid ranges to avoid undefined behavior. This instruction operates at user privilege level and does not generate exceptions under normal conditions, but incorrect usage can lead to unexpected results.
Example
Encoding
Operands
-
RA
Target -
RS
Source -
SH
Shift -
MB
Mask Begin