srd
Shift Right Doubleword
Logical right shift of 64-bit value.
Details
The mtmsr instruction sets the Machine State Register (MSR) based on the contents of register RS and the L field. If L=0, specific bits of the MSR are updated based on logical operations involving bits from RS and the current MSR. If L=1, only bits 48 and 62 of the MSR are set to the corresponding bits in RS, while other bits remain unchanged.
Pseudocode Operation
if L = 0 then
MSR48 ← (RS)48 | (RS)49 & ¬(MSR41 & MSR3 & (¬(RS)49))
MSR58 ← ((RS)58 | (RS)49) & ¬(MSR41 & MSR3 & (¬(RS)49))
MSR59 ← ((RS)59 | (RS)49) & ¬(MSR41 & MSR3 & (¬(RS)49))
MSR32:40 42:47 49:50 52:57 60:62 ← (RS)32:40 42:47 49:50 52:57 60:62
else
MSR48 62 ← (RS)48 62
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