srd
Shift Right Doubleword
Logical right shift of 64-bit value.
Details
Logically shifts RS right by the number of bit positions specified in RB (bits 57–63), inserting zeros at the left. If RB ≥ 64, the result is zero. No status registers are affected.
Pseudocode Operation
n ← RB[57:63]
if n < 64 then RA ← RS >> n
else RA ← 0
Programming Note
The srd instruction is used to update the Machine State Register (MSR) based on the contents of a source register and the L field. When L=0, specific bits in the MSR are updated using logical operations involving bits from the source register and the current MSR state. When L=1, only bits 48 and 62 of the MSR are set to match those in the source register, while other bits remain unchanged. This instruction requires supervisor privilege level and can trigger exceptions if not executed properly.
Example
Encoding
Operands
-
RA
Target -
RS
Source -
RB
Shift Reg