mtmsr
Move To Machine State Register
mtmsr RS
Sets the Machine State Register (MSR) based on the contents of a source register and a control bit.
Details
The MSR is set based on the contents of register RS and the L field. If L=0, specific bits are modified based on logical operations involving RS and the current state of the MSR. If L=1, only certain bits (48 and 62) from RS are placed into the corresponding bits of the MSR.
Pseudocode Operation
if L = 0 then
MSR48 ← (RS)48 | (RS)49 & ¬(MSR41 & MSR3 & (¬(RS)49))
MSR58 ← ((RS)58 | (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
['If this instruction sets MSRPR to 1, it also sets MSREE, MSRIR, and MSRDR to 1.', 'If this instruction results in MSRS HV PR being equal to 0b110, it also sets MSRIR and MSRDR to 0.', 'This instruction does not alter MSRS, MSRME, or MSRLE.', 'If the only MSR bits to be altered are MSREE RI, to obtain the best performance L=1 should be used.', 'mtmsr serves as both a basic and an extended mnemonic. The Assembler will recognize an mtmsr mnemonic with two operands as the basic form, and an mtmsr mnemonic with one operand as the extended form. In the extended form the L operand is omitted and assumed to be 0.']
Extended Mnemonics
| Extended Mnemonic | Equivalent Instruction |
|---|---|
| mtmsr |
Example
Encoding
Operands
-
RS
Source -
L
Load (32/64)