mflr
Move From Link Register
mflr RT
Moves LR to GPR. (Alias for 'mfspr RT, 8').
Details
Moves the Link Register (LR) to a general-purpose register. This is an alias for mfspr RT, 8 and is commonly used to save the return address before modifying LR. No status registers are affected.
Pseudocode Operation
RT ← LR
Programming Note
Use mflr to save the return address before making a function call, ensuring you can return correctly afterward. Ensure the target register (RT) is not reserved and is properly aligned for your architecture.
Example
mflr r3
Encoding
Binary Layout
31
0
RT
6
8
11
339
21
/
31
Operands
-
RT
Target