Bird
0
0

Why does ARM architecture limit parameter passing to registers R0-R3 instead of using more registers?

hard📝 Conceptual Q10 of 15
ARM Architecture - Subroutines and Stack
Why does ARM architecture limit parameter passing to registers R0-R3 instead of using more registers?
ATo force all parameters to be passed on the stack
BBecause only four registers exist in ARM
CTo simplify calling conventions and preserve callee-saved registers
DBecause R4-R12 are reserved for system use only
Step-by-Step Solution
Solution:
  1. Step 1: Understand ARM register roles

    ARM has many registers, but only R0-R3 are designated for parameter passing.
  2. Step 2: Reason about design choice

    This limits complexity and preserves other registers (callee-saved) for function use without overwriting.
  3. Final Answer:

    To simplify calling conventions and preserve callee-saved registers -> Option C
  4. Quick Check:

    Limited param registers simplify calls [OK]
Quick Trick: Limited param registers keep calling simple [OK]
Common Mistakes:
  • Thinking ARM has only 4 registers
  • Assuming all params go on stack
  • Believing R4-R12 are system-only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes