0
0
ARM Architectureknowledge~10 mins

Subroutine call convention (AAPCS) in ARM Architecture - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to identify the register used for the first argument in AAPCS.

ARM Architecture
The first argument to a subroutine is passed in register [1] according to AAPCS.
Drag options to blanks, or click blank then click option'
Ar4
Br12
Cr0
Dr7
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing argument registers with callee-saved registers.
Assuming arguments start from r4 or higher.
2fill in blank
medium

Complete the code to specify how many registers are used for passing arguments in AAPCS.

ARM Architecture
AAPCS uses up to [1] registers to pass arguments before using the stack.
Drag options to blanks, or click blank then click option'
A2
B8
C6
D4
Attempts:
3 left
💡 Hint
Common Mistakes
Assuming all arguments are passed in registers.
Confusing the number of argument registers with total registers.
3fill in blank
hard

Fix the error in the statement about callee-saved registers in AAPCS.

ARM Architecture
Registers [1] to r7 are callee-saved according to AAPCS.
Drag options to blanks, or click blank then click option'
Ar1
Br4
Cr0
Dr3
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing caller-saved and callee-saved registers.
Assuming r0 is callee-saved.
4fill in blank
hard

Fill both blanks to complete the rule about the stack pointer and link register in AAPCS.

ARM Architecture
The [1] register holds the return address, and the [2] register points to the top of the stack.
Drag options to blanks, or click blank then click option'
Alr
Bpc
Csp
Dr0
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the program counter (pc) with the link register (lr).
Confusing general-purpose registers with special registers.
5fill in blank
hard

Fill all three blanks to complete the dictionary comprehension that maps argument registers to their usage in AAPCS.

ARM Architecture
arg_registers = [1]: 'first', [2]: 'second', [3]: 'third'}
Drag options to blanks, or click blank then click option'
Ar0
Br1
Cr2
Dr3
Attempts:
3 left
💡 Hint
Common Mistakes
Using registers out of order.
Including registers beyond the third argument.