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
 
Format XFX-form
Opcode 0x7C0803A6
Extension Base

Operands

  • RS
    Source

Example

mtlr r3

Registers Altered

LR

Related

More in Base

Reference

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.