Bird
0
0

In ARM calling conventions, which registers are designated to hold the first two integer parameters when a function is called?

easy📝 Conceptual Q1 of 15
ARM Architecture - Subroutines and Stack
In ARM calling conventions, which registers are designated to hold the first two integer parameters when a function is called?
AR0 and R1
BR2 and R3
CR4 and R5
DR6 and R7
Step-by-Step Solution
Solution:
  1. Step 1: Identify ARM parameter registers

    ARM uses registers R0 to R3 to pass the first four integer or pointer parameters.
  2. Step 2: Determine first two parameters

    The first parameter is passed in R0, the second in R1.
  3. Final Answer:

    R0 and R1 -> Option A
  4. Quick Check:

    First two parameters in R0 and R1 [OK]
Quick Trick: First two parameters go into R0 and R1 registers [OK]
Common Mistakes:
  • Assuming parameters start from R2
  • Using higher registers like R4 for initial parameters
  • Confusing parameter registers with return registers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes