Bird
0
0

What happens to the LR (Link Register) when a subroutine is called using the BL instruction in ARM AAPCS?

medium📝 Analysis Q5 of 15
ARM Architecture - Subroutines and Stack
What happens to the LR (Link Register) when a subroutine is called using the BL instruction in ARM AAPCS?
ALR stores the return address
BLR is cleared to zero
CLR stores the first argument
DLR is used as stack pointer
Step-by-Step Solution
Solution:
  1. Step 1: Understand BL instruction effect

    BL branches to subroutine and saves return address in LR.
  2. Step 2: Identify LR role

    LR holds the address to return to after subroutine finishes.
  3. Final Answer:

    LR stores the return address -> Option A
  4. Quick Check:

    LR = return address after BL [OK]
Quick Trick: BL saves return address in LR register [OK]
Common Mistakes:
  • Thinking LR is cleared
  • Confusing LR with argument registers
  • Using LR as stack pointer

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes