sradi
Shift Right Algebraic Doubleword Immediate
Performs an arithmetic right shift on a 64-bit doubleword by a constant amount.
Details
The sradi instruction shifts the contents of the low-order 32 bits of register RS to the right by a specified number of bits, determined by the value in (RB)58:63. Bits shifted out of position 63 are lost, and bit 32 of RS is replicated to fill the vacated positions on the left. The 32-bit result is placed into RA32:63, with RA0:31 also filled by replicating bit 32 of RS. CA and CA32 are set based on whether any 1-bits are shifted out of position 63 when (RS) contains a negative number.
Pseudocode Operation
RA <- (RS) >>a SH
Programming Note
When Rc=1 (dot form), CR0 is updated with the signed comparison of the result against zero (LT, GT, EQ) and the current SO bit from XER.
Example
Encoding
Operands
-
RA
Target Register -
RS
Source Register -
SH
Shift Amount (0-63, Split field)