mtlr
Move To Link Register
mtlr RS
Moves GPR to LR. (Alias for 'mtspr 8, RS').
Encoding
Binary Layout
31
0:5
RS
6:10
8
11:20
467
21:30
/
31
Operands
-
RS
Source
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Move To Link Register. Extended mnemonic for MTSPR (mtspr 8,RS). Copies the contents of register RS into the Link Register (LR).
Operation
LR ← RS
Programming Note
The mtlr instruction is commonly used to update the Link Register with a new value, often during function calls or branch operations. Ensure that the source register contains the correct address or value before executing this instruction. This operation does not require any special privileges and will not generate exceptions under normal circumstances.